LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_smb2_lease_struct.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 31 99 31.3 %
Date: 2024-04-21 15:09:00 Functions: 4 11 36.4 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_smb2_lease_struct.h"
       5             : 
       6      452700 : _PUBLIC_ enum ndr_err_code ndr_push_smb2_lease_key(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb2_lease_key *r)
       7             : {
       8        1084 :         uint32_t cntr_data_0;
       9      452700 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      10      452700 :         if (ndr_flags & NDR_SCALARS) {
      11      452700 :                 NDR_CHECK(ndr_push_align(ndr, 8));
      12     1358100 :                 for (cntr_data_0 = 0; cntr_data_0 < (2); cntr_data_0++) {
      13      905400 :                         NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->data[cntr_data_0]));
      14             :                 }
      15      452700 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
      16             :         }
      17      452700 :         if (ndr_flags & NDR_BUFFERS) {
      18        1084 :         }
      19      452700 :         return NDR_ERR_SUCCESS;
      20             : }
      21             : 
      22      959019 : _PUBLIC_ enum ndr_err_code ndr_pull_smb2_lease_key(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb2_lease_key *r)
      23             : {
      24      959019 :         uint32_t size_data_0 = 0;
      25        2219 :         uint32_t cntr_data_0;
      26      959019 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      27      959019 :         if (ndr_flags & NDR_SCALARS) {
      28      959019 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
      29      963457 :                 size_data_0 = 2;
      30     2877057 :                 for (cntr_data_0 = 0; cntr_data_0 < (size_data_0); cntr_data_0++) {
      31     1918038 :                         NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->data[cntr_data_0]));
      32             :                 }
      33      959019 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
      34             :         }
      35      959019 :         if (ndr_flags & NDR_BUFFERS) {
      36        2219 :         }
      37      959019 :         return NDR_ERR_SUCCESS;
      38             : }
      39             : 
      40           0 : static void ndr_print_flags_smb2_lease_key(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct smb2_lease_key *r)
      41             : {
      42           0 :         ndr_print_smb2_lease_key(ndr, name, r);
      43           0 : }
      44             : 
      45           0 : _PUBLIC_ void ndr_print_smb2_lease_key(struct ndr_print *ndr, const char *name, const struct smb2_lease_key *r)
      46             : {
      47           0 :         uint32_t cntr_data_0;
      48           0 :         ndr_print_struct(ndr, name, "smb2_lease_key");
      49           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
      50           0 :         ndr->depth++;
      51           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "data", (uint32_t)(2));
      52           0 :         ndr->depth++;
      53           0 :         for (cntr_data_0 = 0; cntr_data_0 < (2); cntr_data_0++) {
      54           0 :                 ndr_print_hyper(ndr, "data", r->data[cntr_data_0]);
      55             :         }
      56           0 :         ndr->depth--;
      57           0 :         ndr->depth--;
      58             : }
      59             : 
      60        3510 : _PUBLIC_ enum ndr_err_code ndr_push_smb2_lease_state(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
      61             : {
      62        3510 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      63        3510 :         return NDR_ERR_SUCCESS;
      64             : }
      65             : 
      66        9948 : _PUBLIC_ enum ndr_err_code ndr_pull_smb2_lease_state(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
      67             : {
      68           0 :         uint32_t v;
      69        9948 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      70        9948 :         *r = v;
      71        9948 :         return NDR_ERR_SUCCESS;
      72             : }
      73             : 
      74           0 : _PUBLIC_ void ndr_print_smb2_lease_state(struct ndr_print *ndr, const char *name, uint32_t r)
      75             : {
      76           0 :         ndr_print_uint32(ndr, name, r);
      77           0 :         ndr->depth++;
      78           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SMB2_LEASE_READ", SMB2_LEASE_READ, r);
      79           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SMB2_LEASE_HANDLE", SMB2_LEASE_HANDLE, r);
      80           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SMB2_LEASE_WRITE", SMB2_LEASE_WRITE, r);
      81           0 :         ndr->depth--;
      82           0 : }
      83             : 
      84           0 : _PUBLIC_ enum ndr_err_code ndr_push_smb2_lease(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb2_lease *r)
      85             : {
      86           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      87           0 :         if (ndr_flags & NDR_SCALARS) {
      88           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
      89           0 :                 NDR_CHECK(ndr_push_smb2_lease_key(ndr, NDR_SCALARS, &r->lease_key));
      90           0 :                 NDR_CHECK(ndr_push_smb2_lease_state(ndr, NDR_SCALARS, r->lease_state));
      91           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lease_flags));
      92           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lease_duration));
      93           0 :                 NDR_CHECK(ndr_push_smb2_lease_key(ndr, NDR_SCALARS, &r->parent_lease_key));
      94           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lease_version));
      95           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lease_epoch));
      96           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
      97             :         }
      98           0 :         if (ndr_flags & NDR_BUFFERS) {
      99           0 :         }
     100           0 :         return NDR_ERR_SUCCESS;
     101             : }
     102             : 
     103           0 : _PUBLIC_ enum ndr_err_code ndr_pull_smb2_lease(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb2_lease *r)
     104             : {
     105           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     106           0 :         if (ndr_flags & NDR_SCALARS) {
     107           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     108           0 :                 NDR_CHECK(ndr_pull_smb2_lease_key(ndr, NDR_SCALARS, &r->lease_key));
     109           0 :                 NDR_CHECK(ndr_pull_smb2_lease_state(ndr, NDR_SCALARS, &r->lease_state));
     110           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lease_flags));
     111           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lease_duration));
     112           0 :                 NDR_CHECK(ndr_pull_smb2_lease_key(ndr, NDR_SCALARS, &r->parent_lease_key));
     113           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lease_version));
     114           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lease_epoch));
     115           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     116             :         }
     117           0 :         if (ndr_flags & NDR_BUFFERS) {
     118           0 :         }
     119           0 :         return NDR_ERR_SUCCESS;
     120             : }
     121             : 
     122           0 : static void ndr_print_flags_smb2_lease(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct smb2_lease *r)
     123             : {
     124           0 :         ndr_print_smb2_lease(ndr, name, r);
     125           0 : }
     126             : 
     127           0 : _PUBLIC_ void ndr_print_smb2_lease(struct ndr_print *ndr, const char *name, const struct smb2_lease *r)
     128             : {
     129           0 :         ndr_print_struct(ndr, name, "smb2_lease");
     130           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     131           0 :         ndr->depth++;
     132           0 :         ndr_print_smb2_lease_key(ndr, "lease_key", &r->lease_key);
     133           0 :         ndr_print_smb2_lease_state(ndr, "lease_state", r->lease_state);
     134           0 :         ndr_print_uint32(ndr, "lease_flags", r->lease_flags);
     135           0 :         ndr_print_hyper(ndr, "lease_duration", r->lease_duration);
     136           0 :         ndr_print_smb2_lease_key(ndr, "parent_lease_key", &r->parent_lease_key);
     137           0 :         ndr_print_uint16(ndr, "lease_version", r->lease_version);
     138           0 :         ndr_print_uint16(ndr, "lease_epoch", r->lease_epoch);
     139           0 :         ndr->depth--;
     140             : }
     141             : 
     142             : #ifndef SKIP_NDR_TABLE_smb2_lease_struct
     143             : static const struct ndr_interface_public_struct smb2_lease_struct_public_structs[] = {
     144             :         {
     145             :                 .name = "smb2_lease_key",
     146             :                 .struct_size = sizeof(struct smb2_lease_key ),
     147             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_smb2_lease_key,
     148             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smb2_lease_key,
     149             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_smb2_lease_key,
     150             :         },
     151             :         {
     152             :                 .name = "smb2_lease",
     153             :                 .struct_size = sizeof(struct smb2_lease ),
     154             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_smb2_lease,
     155             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smb2_lease,
     156             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_smb2_lease,
     157             :         },
     158             :         { .name = NULL }
     159             : };
     160             : 
     161             : static const struct ndr_interface_call smb2_lease_struct_calls[] = {
     162             :         { .name = NULL }
     163             : };
     164             : 
     165             : static const char * const smb2_lease_struct_endpoint_strings[] = {
     166             :         "ncacn_np:[\\pipe\\smb2_lease_struct]", 
     167             : };
     168             : 
     169             : static const struct ndr_interface_string_array smb2_lease_struct_endpoints = {
     170             :         .count  = 1,
     171             :         .names  = smb2_lease_struct_endpoint_strings
     172             : };
     173             : 
     174             : static const char * const smb2_lease_struct_authservice_strings[] = {
     175             :         "host", 
     176             : };
     177             : 
     178             : static const struct ndr_interface_string_array smb2_lease_struct_authservices = {
     179             :         .count  = 1,
     180             :         .names  = smb2_lease_struct_authservice_strings
     181             : };
     182             : 
     183             : 
     184             : const struct ndr_interface_table ndr_table_smb2_lease_struct = {
     185             :         .name           = "smb2_lease_struct",
     186             :         .num_calls      = 0,
     187             :         .calls          = smb2_lease_struct_calls,
     188             :         .num_public_structs     = 2,
     189             :         .public_structs         = smb2_lease_struct_public_structs,
     190             :         .endpoints      = &smb2_lease_struct_endpoints,
     191             :         .authservices   = &smb2_lease_struct_authservices
     192             : };
     193             : 
     194             : #endif /* SKIP_NDR_TABLE_smb2_lease_struct */

Generated by: LCOV version 1.14