LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_nfs4acl.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 87 129 67.4 %
Date: 2021-09-23 10:06:22 Functions: 4 7 57.1 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_nfs4acl.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_misc.h"
       7             : #include "librpc/gen_ndr/ndr_security.h"
       8        2374 : static enum ndr_err_code ndr_push_nfs4ace(struct ndr_push *ndr, int ndr_flags, const struct nfs4ace *r)
       9             : {
      10             :         {
      11        2374 :                 uint32_t _flags_save_STRUCT = ndr->flags;
      12        2374 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
      13        2374 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      14        2374 :                 if (ndr_flags & NDR_SCALARS) {
      15        2374 :                         NDR_CHECK(ndr_push_align(ndr, 4));
      16        2374 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->e_type));
      17        2374 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->e_flags));
      18        2374 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->e_mask));
      19        2374 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->e_id));
      20             :                         {
      21        2374 :                                 uint32_t _flags_save_string = ndr->flags;
      22        2374 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
      23        2374 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->e_who));
      24        2374 :                                 ndr->flags = _flags_save_string;
      25             :                         }
      26             :                         {
      27        2374 :                                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
      28        2374 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
      29        2374 :                                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
      30        2374 :                                 ndr->flags = _flags_save_DATA_BLOB;
      31             :                         }
      32        2374 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
      33             :                 }
      34        2374 :                 if (ndr_flags & NDR_BUFFERS) {
      35             :                 }
      36        2374 :                 ndr->flags = _flags_save_STRUCT;
      37             :         }
      38        2374 :         return NDR_ERR_SUCCESS;
      39             : }
      40             : 
      41        4970 : static enum ndr_err_code ndr_pull_nfs4ace(struct ndr_pull *ndr, int ndr_flags, struct nfs4ace *r)
      42             : {
      43             :         {
      44        4970 :                 uint32_t _flags_save_STRUCT = ndr->flags;
      45        4970 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
      46        4970 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      47        4970 :                 if (ndr_flags & NDR_SCALARS) {
      48        4970 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
      49        4970 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->e_type));
      50        4970 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->e_flags));
      51        4970 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->e_mask));
      52        4970 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->e_id));
      53             :                         {
      54        4970 :                                 uint32_t _flags_save_string = ndr->flags;
      55        4970 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
      56        4970 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->e_who));
      57        4970 :                                 ndr->flags = _flags_save_string;
      58             :                         }
      59             :                         {
      60        4970 :                                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
      61        4970 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
      62        4970 :                                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
      63        4970 :                                 ndr->flags = _flags_save_DATA_BLOB;
      64             :                         }
      65        4970 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
      66             :                 }
      67        4970 :                 if (ndr_flags & NDR_BUFFERS) {
      68             :                 }
      69        4970 :                 ndr->flags = _flags_save_STRUCT;
      70             :         }
      71        4970 :         return NDR_ERR_SUCCESS;
      72             : }
      73             : 
      74           0 : _PUBLIC_ void ndr_print_nfs4ace(struct ndr_print *ndr, const char *name, const struct nfs4ace *r)
      75             : {
      76           0 :         ndr_print_struct(ndr, name, "nfs4ace");
      77           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
      78             :         {
      79           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
      80           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
      81           0 :                 ndr->depth++;
      82           0 :                 ndr_print_uint16(ndr, "e_type", r->e_type);
      83           0 :                 ndr_print_uint16(ndr, "e_flags", r->e_flags);
      84           0 :                 ndr_print_uint32(ndr, "e_mask", r->e_mask);
      85           0 :                 ndr_print_uint32(ndr, "e_id", r->e_id);
      86             :                 {
      87           0 :                         uint32_t _flags_save_string = ndr->flags;
      88           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
      89           0 :                         ndr_print_string(ndr, "e_who", r->e_who);
      90           0 :                         ndr->flags = _flags_save_string;
      91             :                 }
      92             :                 {
      93           0 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
      94           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
      95           0 :                         ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
      96           0 :                         ndr->flags = _flags_save_DATA_BLOB;
      97             :                 }
      98           0 :                 ndr->depth--;
      99           0 :                 ndr->flags = _flags_save_STRUCT;
     100             :         }
     101             : }
     102             : 
     103        2142 : _PUBLIC_ enum ndr_err_code ndr_push_nfs4acl(struct ndr_push *ndr, int ndr_flags, const struct nfs4acl *r)
     104             : {
     105             :         uint32_t cntr_ace_0;
     106             :         {
     107        2142 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     108        2142 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     109        2142 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     110        2142 :                 if (ndr_flags & NDR_SCALARS) {
     111        2142 :                         NDR_CHECK(ndr_push_align(ndr, 4));
     112        2142 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->a_version));
     113        2142 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->a_flags));
     114        2142 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->a_count));
     115        2142 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->a_owner_mask));
     116        2142 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->a_group_mask));
     117        2142 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->a_other_mask));
     118        4516 :                         for (cntr_ace_0 = 0; cntr_ace_0 < (r->a_count); cntr_ace_0++) {
     119        2374 :                                 NDR_CHECK(ndr_push_nfs4ace(ndr, NDR_SCALARS, &r->ace[cntr_ace_0]));
     120             :                         }
     121        2142 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     122             :                 }
     123        2142 :                 if (ndr_flags & NDR_BUFFERS) {
     124             :                 }
     125        2142 :                 ndr->flags = _flags_save_STRUCT;
     126             :         }
     127        2142 :         return NDR_ERR_SUCCESS;
     128             : }
     129             : 
     130        3762 : _PUBLIC_ enum ndr_err_code ndr_pull_nfs4acl(struct ndr_pull *ndr, int ndr_flags, struct nfs4acl *r)
     131             : {
     132        3762 :         uint32_t size_ace_0 = 0;
     133             :         uint32_t cntr_ace_0;
     134        3762 :         TALLOC_CTX *_mem_save_ace_0 = NULL;
     135             :         {
     136        3762 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     137        3762 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     138        3762 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     139        3762 :                 if (ndr_flags & NDR_SCALARS) {
     140        3762 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
     141        3762 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->a_version));
     142        3762 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->a_flags));
     143        3762 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->a_count));
     144        3762 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->a_owner_mask));
     145        3762 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->a_group_mask));
     146        3762 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->a_other_mask));
     147        3762 :                         size_ace_0 = r->a_count;
     148        3762 :                         NDR_PULL_ALLOC_N(ndr, r->ace, size_ace_0);
     149        3762 :                         _mem_save_ace_0 = NDR_PULL_GET_MEM_CTX(ndr);
     150        3762 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ace, 0);
     151        8732 :                         for (cntr_ace_0 = 0; cntr_ace_0 < (size_ace_0); cntr_ace_0++) {
     152        4970 :                                 NDR_CHECK(ndr_pull_nfs4ace(ndr, NDR_SCALARS, &r->ace[cntr_ace_0]));
     153             :                         }
     154        3762 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ace_0, 0);
     155        3762 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     156             :                 }
     157        3762 :                 if (ndr_flags & NDR_BUFFERS) {
     158             :                 }
     159        3762 :                 ndr->flags = _flags_save_STRUCT;
     160             :         }
     161        3762 :         return NDR_ERR_SUCCESS;
     162             : }
     163             : 
     164           0 : static void ndr_print_flags_nfs4acl(struct ndr_print *ndr, const char *name, int unused, const struct nfs4acl *r)
     165             : {
     166           0 :         ndr_print_nfs4acl(ndr, name, r);
     167           0 : }
     168             : 
     169           0 : _PUBLIC_ void ndr_print_nfs4acl(struct ndr_print *ndr, const char *name, const struct nfs4acl *r)
     170             : {
     171             :         uint32_t cntr_ace_0;
     172           0 :         ndr_print_struct(ndr, name, "nfs4acl");
     173           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     174             :         {
     175           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     176           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     177           0 :                 ndr->depth++;
     178           0 :                 ndr_print_uint8(ndr, "a_version", r->a_version);
     179           0 :                 ndr_print_uint8(ndr, "a_flags", r->a_flags);
     180           0 :                 ndr_print_uint16(ndr, "a_count", r->a_count);
     181           0 :                 ndr_print_uint32(ndr, "a_owner_mask", r->a_owner_mask);
     182           0 :                 ndr_print_uint32(ndr, "a_group_mask", r->a_group_mask);
     183           0 :                 ndr_print_uint32(ndr, "a_other_mask", r->a_other_mask);
     184           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "ace", (int)r->a_count);
     185           0 :                 ndr->depth++;
     186           0 :                 for (cntr_ace_0 = 0; cntr_ace_0 < (r->a_count); cntr_ace_0++) {
     187           0 :                         ndr_print_nfs4ace(ndr, "ace", &r->ace[cntr_ace_0]);
     188             :                 }
     189           0 :                 ndr->depth--;
     190           0 :                 ndr->depth--;
     191           0 :                 ndr->flags = _flags_save_STRUCT;
     192             :         }
     193             : }
     194             : 
     195             : #ifndef SKIP_NDR_TABLE_nfs4acl_interface
     196             : static const struct ndr_interface_public_struct nfs4acl_interface_public_structs[] = {
     197             :         {
     198             :                 .name = "nfs4acl",
     199             :                 .struct_size = sizeof(struct nfs4acl ),
     200             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nfs4acl,
     201             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nfs4acl,
     202             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nfs4acl,
     203             :         },
     204             :         { .name = NULL }
     205             : };
     206             : 
     207             : static const struct ndr_interface_call nfs4acl_interface_calls[] = {
     208             :         { .name = NULL }
     209             : };
     210             : 
     211             : static const char * const nfs4acl_interface_endpoint_strings[] = {
     212             :         "ncacn_np:[\\pipe\\nfs4acl_interface]", 
     213             : };
     214             : 
     215             : static const struct ndr_interface_string_array nfs4acl_interface_endpoints = {
     216             :         .count  = 1,
     217             :         .names  = nfs4acl_interface_endpoint_strings
     218             : };
     219             : 
     220             : static const char * const nfs4acl_interface_authservice_strings[] = {
     221             :         "host", 
     222             : };
     223             : 
     224             : static const struct ndr_interface_string_array nfs4acl_interface_authservices = {
     225             :         .count  = 1,
     226             :         .names  = nfs4acl_interface_authservice_strings
     227             : };
     228             : 
     229             : 
     230             : const struct ndr_interface_table ndr_table_nfs4acl_interface = {
     231             :         .name           = "nfs4acl_interface",
     232             :         .num_calls      = 0,
     233             :         .calls          = nfs4acl_interface_calls,
     234             :         .num_public_structs     = 1,
     235             :         .public_structs         = nfs4acl_interface_public_structs,
     236             :         .endpoints      = &nfs4acl_interface_endpoints,
     237             :         .authservices   = &nfs4acl_interface_authservices
     238             : };
     239             : 
     240             : #endif /* SKIP_NDR_TABLE_nfs4acl_interface */

Generated by: LCOV version 1.13