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 abartlet/fix-coverage dd10fb34 Lines: 27 91 29.7 %
Date: 2021-09-23 10:06:22 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      444072 : _PUBLIC_ enum ndr_err_code ndr_push_smb2_lease_key(struct ndr_push *ndr, int ndr_flags, const struct smb2_lease_key *r)
       7             : {
       8             :         uint32_t cntr_data_0;
       9      444072 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      10      444072 :         if (ndr_flags & NDR_SCALARS) {
      11      444072 :                 NDR_CHECK(ndr_push_align(ndr, 8));
      12     1331464 :                 for (cntr_data_0 = 0; cntr_data_0 < (2); cntr_data_0++) {
      13      888144 :                         NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->data[cntr_data_0]));
      14             :                 }
      15      444072 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
      16             :         }
      17      443320 :         if (ndr_flags & NDR_BUFFERS) {
      18             :         }
      19      444072 :         return NDR_ERR_SUCCESS;
      20             : }
      21             : 
      22      901061 : _PUBLIC_ enum ndr_err_code ndr_pull_smb2_lease_key(struct ndr_pull *ndr, int ndr_flags, struct smb2_lease_key *r)
      23             : {
      24      901061 :         uint32_t size_data_0 = 0;
      25             :         uint32_t cntr_data_0;
      26      901061 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      27      901061 :         if (ndr_flags & NDR_SCALARS) {
      28      901061 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
      29      899470 :                 size_data_0 = 2;
      30     2701592 :                 for (cntr_data_0 = 0; cntr_data_0 < (size_data_0); cntr_data_0++) {
      31     1802122 :                         NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->data[cntr_data_0]));
      32             :                 }
      33      901061 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
      34             :         }
      35      899470 :         if (ndr_flags & NDR_BUFFERS) {
      36             :         }
      37      901061 :         return NDR_ERR_SUCCESS;
      38             : }
      39             : 
      40           0 : static void ndr_print_flags_smb2_lease_key(struct ndr_print *ndr, const char *name, int 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             :         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(%d)", "data", (int)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        3606 : _PUBLIC_ enum ndr_err_code ndr_push_smb2_lease_state(struct ndr_push *ndr, int ndr_flags, uint32_t r)
      61             : {
      62        3606 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      63        3606 :         return NDR_ERR_SUCCESS;
      64             : }
      65             : 
      66       12780 : _PUBLIC_ enum ndr_err_code ndr_pull_smb2_lease_state(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
      67             : {
      68             :         uint32_t v;
      69       12780 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      70       12780 :         *r = v;
      71       12780 :         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, int 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             :         }
     100           0 :         return NDR_ERR_SUCCESS;
     101             : }
     102             : 
     103           0 : _PUBLIC_ enum ndr_err_code ndr_pull_smb2_lease(struct ndr_pull *ndr, int 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             :         }
     119           0 :         return NDR_ERR_SUCCESS;
     120             : }
     121             : 
     122           0 : static void ndr_print_flags_smb2_lease(struct ndr_print *ndr, const char *name, int 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.13