LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_smb3posix.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 72 114 63.2 %
Date: 2024-04-21 15:09:00 Functions: 4 8 50.0 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_smb3posix.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_security.h"
       7        3589 : _PUBLIC_ enum ndr_err_code ndr_push_smb3_posix_cc_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb3_posix_cc_info *r)
       8             : {
       9             :         {
      10        3589 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
      11        3589 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
      12        3589 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      13        3589 :                 if (ndr_flags & NDR_SCALARS) {
      14        3589 :                         NDR_CHECK(ndr_push_align(ndr, 4));
      15        3589 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nlinks));
      16        3589 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reparse_tag));
      17        3589 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_perms));
      18        3589 :                         NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->owner));
      19        3589 :                         NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->group));
      20        3589 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
      21             :                 }
      22        3589 :                 if (ndr_flags & NDR_BUFFERS) {
      23           0 :                 }
      24        3589 :                 ndr->flags = _flags_save_STRUCT;
      25             :         }
      26        3589 :         return NDR_ERR_SUCCESS;
      27             : }
      28             : 
      29        1453 : _PUBLIC_ enum ndr_err_code ndr_pull_smb3_posix_cc_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb3_posix_cc_info *r)
      30             : {
      31             :         {
      32        1453 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
      33        1453 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
      34        1453 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      35        1453 :                 if (ndr_flags & NDR_SCALARS) {
      36        1453 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
      37        1453 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nlinks));
      38        1453 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reparse_tag));
      39        1453 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_perms));
      40        1453 :                         NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->owner));
      41        1453 :                         NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->group));
      42        1453 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
      43             :                 }
      44        1453 :                 if (ndr_flags & NDR_BUFFERS) {
      45           0 :                 }
      46        1453 :                 ndr->flags = _flags_save_STRUCT;
      47             :         }
      48        1453 :         return NDR_ERR_SUCCESS;
      49             : }
      50             : 
      51           0 : static void ndr_print_flags_smb3_posix_cc_info(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct smb3_posix_cc_info *r)
      52             : {
      53           0 :         ndr_print_smb3_posix_cc_info(ndr, name, r);
      54           0 : }
      55             : 
      56           0 : _PUBLIC_ void ndr_print_smb3_posix_cc_info(struct ndr_print *ndr, const char *name, const struct smb3_posix_cc_info *r)
      57             : {
      58           0 :         ndr_print_struct(ndr, name, "smb3_posix_cc_info");
      59           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
      60             :         {
      61           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
      62           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
      63           0 :                 ndr->depth++;
      64           0 :                 ndr_print_uint32(ndr, "nlinks", r->nlinks);
      65           0 :                 ndr_print_uint32(ndr, "reparse_tag", r->reparse_tag);
      66           0 :                 ndr_print_uint32(ndr, "posix_perms", r->posix_perms);
      67           0 :                 ndr_print_dom_sid(ndr, "owner", &r->owner);
      68           0 :                 ndr_print_dom_sid(ndr, "group", &r->group);
      69           0 :                 ndr->depth--;
      70           0 :                 ndr->flags = _flags_save_STRUCT;
      71             :         }
      72             : }
      73             : 
      74        1449 : _PUBLIC_ enum ndr_err_code ndr_push_smb3_file_posix_information(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct smb3_file_posix_information *r)
      75             : {
      76             :         {
      77        1449 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
      78        1449 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
      79        1449 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      80        1449 :                 if (ndr_flags & NDR_SCALARS) {
      81        1449 :                         NDR_CHECK(ndr_push_align(ndr, 8));
      82        1449 :                         NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->creation_time));
      83        1449 :                         NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_access_time));
      84        1449 :                         NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_write_time));
      85        1449 :                         NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->change_time));
      86        1449 :                         NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->end_of_file));
      87        1449 :                         NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->allocation_size));
      88        1449 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->file_attributes));
      89        1449 :                         NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->inode));
      90        1449 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device));
      91        1449 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
      92        1449 :                         NDR_CHECK(ndr_push_smb3_posix_cc_info(ndr, NDR_SCALARS, &r->cc));
      93        1449 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 8));
      94             :                 }
      95        1449 :                 if (ndr_flags & NDR_BUFFERS) {
      96           0 :                 }
      97        1449 :                 ndr->flags = _flags_save_STRUCT;
      98             :         }
      99        1449 :         return NDR_ERR_SUCCESS;
     100             : }
     101             : 
     102        1449 : _PUBLIC_ enum ndr_err_code ndr_pull_smb3_file_posix_information(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct smb3_file_posix_information *r)
     103             : {
     104             :         {
     105        1449 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     106        1449 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     107        1449 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     108        1449 :                 if (ndr_flags & NDR_SCALARS) {
     109        1449 :                         NDR_CHECK(ndr_pull_align(ndr, 8));
     110        1449 :                         NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->creation_time));
     111        1449 :                         NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_access_time));
     112        1449 :                         NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_write_time));
     113        1449 :                         NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->change_time));
     114        1449 :                         NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->end_of_file));
     115        1449 :                         NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->allocation_size));
     116        1449 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->file_attributes));
     117        1449 :                         NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->inode));
     118        1449 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device));
     119        1449 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
     120        1449 :                         NDR_CHECK(ndr_pull_smb3_posix_cc_info(ndr, NDR_SCALARS, &r->cc));
     121        1449 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     122             :                 }
     123        1449 :                 if (ndr_flags & NDR_BUFFERS) {
     124           0 :                 }
     125        1449 :                 ndr->flags = _flags_save_STRUCT;
     126             :         }
     127        1449 :         return NDR_ERR_SUCCESS;
     128             : }
     129             : 
     130           0 : static void ndr_print_flags_smb3_file_posix_information(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct smb3_file_posix_information *r)
     131             : {
     132           0 :         ndr_print_smb3_file_posix_information(ndr, name, r);
     133           0 : }
     134             : 
     135           0 : _PUBLIC_ void ndr_print_smb3_file_posix_information(struct ndr_print *ndr, const char *name, const struct smb3_file_posix_information *r)
     136             : {
     137           0 :         ndr_print_struct(ndr, name, "smb3_file_posix_information");
     138           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     139             :         {
     140           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     141           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     142           0 :                 ndr->depth++;
     143           0 :                 ndr_print_NTTIME(ndr, "creation_time", r->creation_time);
     144           0 :                 ndr_print_NTTIME(ndr, "last_access_time", r->last_access_time);
     145           0 :                 ndr_print_NTTIME(ndr, "last_write_time", r->last_write_time);
     146           0 :                 ndr_print_NTTIME(ndr, "change_time", r->change_time);
     147           0 :                 ndr_print_hyper(ndr, "end_of_file", r->end_of_file);
     148           0 :                 ndr_print_hyper(ndr, "allocation_size", r->allocation_size);
     149           0 :                 ndr_print_uint32(ndr, "file_attributes", r->file_attributes);
     150           0 :                 ndr_print_hyper(ndr, "inode", r->inode);
     151           0 :                 ndr_print_uint32(ndr, "device", r->device);
     152           0 :                 ndr_print_uint32(ndr, "reserved", r->reserved);
     153           0 :                 ndr_print_smb3_posix_cc_info(ndr, "cc", &r->cc);
     154           0 :                 ndr->depth--;
     155           0 :                 ndr->flags = _flags_save_STRUCT;
     156             :         }
     157             : }
     158             : 
     159             : #ifndef SKIP_NDR_TABLE_smb3posix
     160             : static const struct ndr_interface_public_struct smb3posix_public_structs[] = {
     161             :         {
     162             :                 .name = "smb3_posix_cc_info",
     163             :                 .struct_size = sizeof(struct smb3_posix_cc_info ),
     164             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_smb3_posix_cc_info,
     165             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smb3_posix_cc_info,
     166             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_smb3_posix_cc_info,
     167             :         },
     168             :         {
     169             :                 .name = "smb3_file_posix_information",
     170             :                 .struct_size = sizeof(struct smb3_file_posix_information ),
     171             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_smb3_file_posix_information,
     172             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_smb3_file_posix_information,
     173             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_smb3_file_posix_information,
     174             :         },
     175             :         { .name = NULL }
     176             : };
     177             : 
     178             : static const struct ndr_interface_call smb3posix_calls[] = {
     179             :         { .name = NULL }
     180             : };
     181             : 
     182             : static const char * const smb3posix_endpoint_strings[] = {
     183             :         "ncacn_np:[\\pipe\\smb3posix]", 
     184             : };
     185             : 
     186             : static const struct ndr_interface_string_array smb3posix_endpoints = {
     187             :         .count  = 1,
     188             :         .names  = smb3posix_endpoint_strings
     189             : };
     190             : 
     191             : static const char * const smb3posix_authservice_strings[] = {
     192             :         "host", 
     193             : };
     194             : 
     195             : static const struct ndr_interface_string_array smb3posix_authservices = {
     196             :         .count  = 1,
     197             :         .names  = smb3posix_authservice_strings
     198             : };
     199             : 
     200             : 
     201             : const struct ndr_interface_table ndr_table_smb3posix = {
     202             :         .name           = "smb3posix",
     203             :         .num_calls      = 0,
     204             :         .calls          = smb3posix_calls,
     205             :         .num_public_structs     = 2,
     206             :         .public_structs         = smb3posix_public_structs,
     207             :         .endpoints      = &smb3posix_endpoints,
     208             :         .authservices   = &smb3posix_authservices
     209             : };
     210             : 
     211             : #endif /* SKIP_NDR_TABLE_smb3posix */

Generated by: LCOV version 1.14