LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_named_pipe_auth.c (source / functions) Hit Total Coverage
Test: coverage report for vadcx-master-patch-75612 fe003de8 Lines: 299 435 68.7 %
Date: 2024-02-29 22:57:05 Functions: 14 23 60.9 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_named_pipe_auth.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_netlogon.h"
       7             : #include "librpc/gen_ndr/ndr_security.h"
       8             : #include "librpc/gen_ndr/ndr_auth.h"
       9      266158 : _PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_req_info8(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct named_pipe_auth_req_info8 *r)
      10             : {
      11      266158 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      12      266158 :         if (ndr_flags & NDR_SCALARS) {
      13      168736 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      14      168736 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->transport));
      15      168736 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote_client_name));
      16      168736 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote_client_addr));
      17      168736 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->remote_client_port));
      18      168736 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->local_server_name));
      19      168736 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->local_server_addr));
      20      168736 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->local_server_port));
      21      168736 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->session_info));
      22      168736 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
      23             :         }
      24      266158 :         if (ndr_flags & NDR_BUFFERS) {
      25      168736 :                 if (r->remote_client_name) {
      26      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_client_name, CH_UTF8)));
      27      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      28      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_client_name, CH_UTF8)));
      29      168736 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_client_name, ndr_charset_length(r->remote_client_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      30             :                 }
      31      168736 :                 if (r->remote_client_addr) {
      32      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_client_addr, CH_DOS)));
      33      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      34      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_client_addr, CH_DOS)));
      35      168736 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_client_addr, ndr_charset_length(r->remote_client_addr, CH_DOS), sizeof(uint8_t), CH_DOS));
      36             :                 }
      37      168736 :                 if (r->local_server_name) {
      38      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_server_name, CH_UTF8)));
      39      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      40      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_server_name, CH_UTF8)));
      41      168736 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->local_server_name, ndr_charset_length(r->local_server_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      42             :                 }
      43      168736 :                 if (r->local_server_addr) {
      44      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_server_addr, CH_DOS)));
      45      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      46      168736 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_server_addr, CH_DOS)));
      47      168736 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->local_server_addr, ndr_charset_length(r->local_server_addr, CH_DOS), sizeof(uint8_t), CH_DOS));
      48             :                 }
      49      168736 :                 if (r->session_info) {
      50      168736 :                         NDR_CHECK(ndr_push_auth_session_info_transport(ndr, NDR_SCALARS|NDR_BUFFERS, r->session_info));
      51             :                 }
      52             :         }
      53      263678 :         return NDR_ERR_SUCCESS;
      54             : }
      55             : 
      56      158997 : _PUBLIC_ enum ndr_err_code ndr_pull_named_pipe_auth_req_info8(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct named_pipe_auth_req_info8 *r)
      57             : {
      58        1256 :         uint32_t _ptr_remote_client_name;
      59      158997 :         uint32_t size_remote_client_name_1 = 0;
      60      158997 :         uint32_t length_remote_client_name_1 = 0;
      61      158997 :         TALLOC_CTX *_mem_save_remote_client_name_0 = NULL;
      62        1256 :         uint32_t _ptr_remote_client_addr;
      63      158997 :         uint32_t size_remote_client_addr_1 = 0;
      64      158997 :         uint32_t length_remote_client_addr_1 = 0;
      65      158997 :         TALLOC_CTX *_mem_save_remote_client_addr_0 = NULL;
      66        1256 :         uint32_t _ptr_local_server_name;
      67      158997 :         uint32_t size_local_server_name_1 = 0;
      68      158997 :         uint32_t length_local_server_name_1 = 0;
      69      158997 :         TALLOC_CTX *_mem_save_local_server_name_0 = NULL;
      70        1256 :         uint32_t _ptr_local_server_addr;
      71      158997 :         uint32_t size_local_server_addr_1 = 0;
      72      158997 :         uint32_t length_local_server_addr_1 = 0;
      73      158997 :         TALLOC_CTX *_mem_save_local_server_addr_0 = NULL;
      74        1256 :         uint32_t _ptr_session_info;
      75      158997 :         TALLOC_CTX *_mem_save_session_info_0 = NULL;
      76      158997 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      77      158997 :         if (ndr_flags & NDR_SCALARS) {
      78      116142 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
      79      116142 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->transport));
      80      116142 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote_client_name));
      81      116142 :                 if (_ptr_remote_client_name) {
      82      116142 :                         NDR_PULL_ALLOC(ndr, r->remote_client_name);
      83             :                 } else {
      84           0 :                         r->remote_client_name = NULL;
      85             :                 }
      86      116142 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote_client_addr));
      87      116142 :                 if (_ptr_remote_client_addr) {
      88      116142 :                         NDR_PULL_ALLOC(ndr, r->remote_client_addr);
      89             :                 } else {
      90           0 :                         r->remote_client_addr = NULL;
      91             :                 }
      92      116142 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->remote_client_port));
      93      116142 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_local_server_name));
      94      116142 :                 if (_ptr_local_server_name) {
      95      116142 :                         NDR_PULL_ALLOC(ndr, r->local_server_name);
      96             :                 } else {
      97           0 :                         r->local_server_name = NULL;
      98             :                 }
      99      116142 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_local_server_addr));
     100      116142 :                 if (_ptr_local_server_addr) {
     101      116142 :                         NDR_PULL_ALLOC(ndr, r->local_server_addr);
     102             :                 } else {
     103           0 :                         r->local_server_addr = NULL;
     104             :                 }
     105      116142 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->local_server_port));
     106      116142 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_session_info));
     107      116142 :                 if (_ptr_session_info) {
     108      116142 :                         NDR_PULL_ALLOC(ndr, r->session_info);
     109             :                 } else {
     110           0 :                         r->session_info = NULL;
     111             :                 }
     112      116142 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     113             :         }
     114      158997 :         if (ndr_flags & NDR_BUFFERS) {
     115      116142 :                 if (r->remote_client_name) {
     116      116142 :                         _mem_save_remote_client_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
     117      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, r->remote_client_name, 0);
     118      116142 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_client_name));
     119      116142 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_client_name));
     120      116142 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_client_name, &size_remote_client_name_1));
     121      116142 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_client_name, &length_remote_client_name_1));
     122      116142 :                         if (length_remote_client_name_1 > size_remote_client_name_1) {
     123           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_client_name_1, length_remote_client_name_1);
     124             :                         }
     125      116142 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_client_name_1, sizeof(uint8_t)));
     126      116142 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_client_name, length_remote_client_name_1, sizeof(uint8_t), CH_UTF8));
     127      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_client_name_0, 0);
     128             :                 }
     129      116142 :                 if (r->remote_client_addr) {
     130      116142 :                         _mem_save_remote_client_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
     131      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, r->remote_client_addr, 0);
     132      116142 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_client_addr));
     133      116142 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_client_addr));
     134      116142 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_client_addr, &size_remote_client_addr_1));
     135      116142 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_client_addr, &length_remote_client_addr_1));
     136      116142 :                         if (length_remote_client_addr_1 > size_remote_client_addr_1) {
     137           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_client_addr_1, length_remote_client_addr_1);
     138             :                         }
     139      116142 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_client_addr_1, sizeof(uint8_t)));
     140      116142 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_client_addr, length_remote_client_addr_1, sizeof(uint8_t), CH_DOS));
     141      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_client_addr_0, 0);
     142             :                 }
     143      116142 :                 if (r->local_server_name) {
     144      116142 :                         _mem_save_local_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
     145      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, r->local_server_name, 0);
     146      116142 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->local_server_name));
     147      116142 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->local_server_name));
     148      116142 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->local_server_name, &size_local_server_name_1));
     149      116142 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->local_server_name, &length_local_server_name_1));
     150      116142 :                         if (length_local_server_name_1 > size_local_server_name_1) {
     151           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_local_server_name_1, length_local_server_name_1);
     152             :                         }
     153      116142 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_local_server_name_1, sizeof(uint8_t)));
     154      116142 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->local_server_name, length_local_server_name_1, sizeof(uint8_t), CH_UTF8));
     155      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_server_name_0, 0);
     156             :                 }
     157      116142 :                 if (r->local_server_addr) {
     158      116142 :                         _mem_save_local_server_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
     159      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, r->local_server_addr, 0);
     160      116142 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->local_server_addr));
     161      116142 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->local_server_addr));
     162      116142 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->local_server_addr, &size_local_server_addr_1));
     163      116142 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->local_server_addr, &length_local_server_addr_1));
     164      116142 :                         if (length_local_server_addr_1 > size_local_server_addr_1) {
     165           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_local_server_addr_1, length_local_server_addr_1);
     166             :                         }
     167      116142 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_local_server_addr_1, sizeof(uint8_t)));
     168      116142 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->local_server_addr, length_local_server_addr_1, sizeof(uint8_t), CH_DOS));
     169      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_server_addr_0, 0);
     170             :                 }
     171      116142 :                 if (r->session_info) {
     172      116142 :                         _mem_save_session_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
     173      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, r->session_info, 0);
     174      116142 :                         NDR_CHECK(ndr_pull_auth_session_info_transport(ndr, NDR_SCALARS|NDR_BUFFERS, r->session_info));
     175      116142 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_session_info_0, 0);
     176             :                 }
     177             :         }
     178      157741 :         return NDR_ERR_SUCCESS;
     179             : }
     180             : 
     181           0 : static void ndr_print_flags_named_pipe_auth_req_info8(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct named_pipe_auth_req_info8 *r)
     182             : {
     183           0 :         ndr_print_named_pipe_auth_req_info8(ndr, name, r);
     184           0 : }
     185             : 
     186           0 : _PUBLIC_ void ndr_print_named_pipe_auth_req_info8(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_req_info8 *r)
     187             : {
     188           0 :         ndr_print_struct(ndr, name, "named_pipe_auth_req_info8");
     189           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     190           0 :         ndr->depth++;
     191           0 :         ndr_print_uint8(ndr, "transport", r->transport);
     192           0 :         ndr_print_ptr(ndr, "remote_client_name", r->remote_client_name);
     193           0 :         ndr->depth++;
     194           0 :         if (r->remote_client_name) {
     195           0 :                 ndr_print_string(ndr, "remote_client_name", r->remote_client_name);
     196             :         }
     197           0 :         ndr->depth--;
     198           0 :         ndr_print_ptr(ndr, "remote_client_addr", r->remote_client_addr);
     199           0 :         ndr->depth++;
     200           0 :         if (r->remote_client_addr) {
     201           0 :                 ndr_print_string(ndr, "remote_client_addr", r->remote_client_addr);
     202             :         }
     203           0 :         ndr->depth--;
     204           0 :         ndr_print_uint16(ndr, "remote_client_port", r->remote_client_port);
     205           0 :         ndr_print_ptr(ndr, "local_server_name", r->local_server_name);
     206           0 :         ndr->depth++;
     207           0 :         if (r->local_server_name) {
     208           0 :                 ndr_print_string(ndr, "local_server_name", r->local_server_name);
     209             :         }
     210           0 :         ndr->depth--;
     211           0 :         ndr_print_ptr(ndr, "local_server_addr", r->local_server_addr);
     212           0 :         ndr->depth++;
     213           0 :         if (r->local_server_addr) {
     214           0 :                 ndr_print_string(ndr, "local_server_addr", r->local_server_addr);
     215             :         }
     216           0 :         ndr->depth--;
     217           0 :         ndr_print_uint16(ndr, "local_server_port", r->local_server_port);
     218           0 :         ndr_print_ptr(ndr, "session_info", r->session_info);
     219           0 :         ndr->depth++;
     220           0 :         if (r->session_info) {
     221           0 :                 ndr_print_auth_session_info_transport(ndr, "session_info", r->session_info);
     222             :         }
     223           0 :         ndr->depth--;
     224           0 :         ndr->depth--;
     225             : }
     226             : 
     227      194844 : static enum ndr_err_code ndr_push_named_pipe_auth_req_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union named_pipe_auth_req_info *r)
     228             : {
     229        2480 :         uint32_t level;
     230      194844 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     231      194844 :         if (ndr_flags & NDR_SCALARS) {
     232             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     233       97422 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     234       97422 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     235       97422 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
     236       97422 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     237       97422 :                 switch (level) {
     238       97422 :                         case 8: {
     239       97422 :                                 NDR_CHECK(ndr_push_named_pipe_auth_req_info8(ndr, NDR_SCALARS, &r->info8));
     240       96182 :                         break; }
     241             : 
     242           0 :                         default:
     243           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     244             :                 }
     245             :         }
     246      194844 :         if (ndr_flags & NDR_BUFFERS) {
     247       97422 :                 if (!(ndr_flags & NDR_SCALARS)) {
     248             :                         /* We didn't get it above, and the token is not needed after this. */
     249       97422 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     250             :                 }
     251       97422 :                 switch (level) {
     252       97422 :                         case 8:
     253       97422 :                                 NDR_CHECK(ndr_push_named_pipe_auth_req_info8(ndr, NDR_BUFFERS, &r->info8));
     254       96182 :                         break;
     255             : 
     256           0 :                         default:
     257           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     258             :                 }
     259             :         }
     260      192364 :         return NDR_ERR_SUCCESS;
     261             : }
     262             : 
     263       85710 : static enum ndr_err_code ndr_pull_named_pipe_auth_req_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union named_pipe_auth_req_info *r)
     264             : {
     265        1256 :         uint32_t level;
     266        1256 :         uint32_t _level;
     267       85710 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     268       85710 :         if (ndr_flags & NDR_SCALARS) {
     269             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     270       42855 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     271       42855 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     272       42855 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
     273       42855 :                 if (_level != level) {
     274           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
     275             :                 }
     276       42855 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     277       42855 :                 switch (level) {
     278       42855 :                         case 8: {
     279       42855 :                                 NDR_CHECK(ndr_pull_named_pipe_auth_req_info8(ndr, NDR_SCALARS, &r->info8));
     280       42227 :                         break; }
     281             : 
     282           0 :                         default:
     283           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     284             :                 }
     285             :         }
     286       85710 :         if (ndr_flags & NDR_BUFFERS) {
     287       42855 :                 if (!(ndr_flags & NDR_SCALARS)) {
     288             :                         /* We didn't get it above, and the token is not needed after this. */
     289       42855 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     290             :                 }
     291       42855 :                 switch (level) {
     292       42855 :                         case 8:
     293       42855 :                                 NDR_CHECK(ndr_pull_named_pipe_auth_req_info8(ndr, NDR_BUFFERS, &r->info8));
     294       42227 :                         break;
     295             : 
     296           0 :                         default:
     297           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     298             :                 }
     299             :         }
     300       84454 :         return NDR_ERR_SUCCESS;
     301             : }
     302             : 
     303           0 : _PUBLIC_ void ndr_print_named_pipe_auth_req_info(struct ndr_print *ndr, const char *name, const union named_pipe_auth_req_info *r)
     304             : {
     305           0 :         uint32_t level;
     306           0 :         level = ndr_print_steal_switch_value(ndr, r);
     307           0 :         ndr_print_union(ndr, name, level, "named_pipe_auth_req_info");
     308           0 :         switch (level) {
     309           0 :                 case 8:
     310           0 :                         ndr_print_named_pipe_auth_req_info8(ndr, "info8", &r->info8);
     311           0 :                 break;
     312             : 
     313           0 :                 default:
     314           0 :                         ndr_print_bad_level(ndr, name, level);
     315             :         }
     316           0 : }
     317             : 
     318       97422 : _PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_req(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct named_pipe_auth_req *r)
     319             : {
     320       97422 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     321       97422 :         if (ndr_flags & NDR_SCALARS) {
     322       97422 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     323             :                 {
     324       97422 :                         libndr_flags _flags_save_uint32 = ndr->flags;
     325       97422 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     326       97422 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_named_pipe_auth_req(r, ndr->flags) - 4));
     327       97422 :                         ndr->flags = _flags_save_uint32;
     328             :                 }
     329       97422 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, NAMED_PIPE_AUTH_MAGIC, 4, sizeof(uint8_t), CH_DOS));
     330       97422 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
     331       97422 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
     332       97422 :                 NDR_CHECK(ndr_push_named_pipe_auth_req_info(ndr, NDR_SCALARS, &r->info));
     333       97422 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     334             :         }
     335       97422 :         if (ndr_flags & NDR_BUFFERS) {
     336       97422 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
     337       97422 :                 NDR_CHECK(ndr_push_named_pipe_auth_req_info(ndr, NDR_BUFFERS, &r->info));
     338             :         }
     339       96182 :         return NDR_ERR_SUCCESS;
     340             : }
     341             : 
     342       42855 : _PUBLIC_ enum ndr_err_code ndr_pull_named_pipe_auth_req(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct named_pipe_auth_req *r)
     343             : {
     344       42855 :         uint32_t size_magic_0 = 0;
     345       42855 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     346       42855 :         if (ndr_flags & NDR_SCALARS) {
     347       42855 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     348             :                 {
     349       42855 :                         libndr_flags _flags_save_uint32 = ndr->flags;
     350       42855 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     351       42855 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
     352       42855 :                         ndr->flags = _flags_save_uint32;
     353             :                 }
     354       42855 :                 size_magic_0 = 4;
     355       42855 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->magic, size_magic_0, sizeof(uint8_t), CH_DOS));
     356       42855 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
     357       42855 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
     358       42855 :                 NDR_CHECK(ndr_pull_named_pipe_auth_req_info(ndr, NDR_SCALARS, &r->info));
     359       42855 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     360             :         }
     361       42855 :         if (ndr_flags & NDR_BUFFERS) {
     362       42855 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
     363       42855 :                 NDR_CHECK(ndr_pull_named_pipe_auth_req_info(ndr, NDR_BUFFERS, &r->info));
     364             :         }
     365       42227 :         return NDR_ERR_SUCCESS;
     366             : }
     367             : 
     368           0 : static void ndr_print_flags_named_pipe_auth_req(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct named_pipe_auth_req *r)
     369             : {
     370           0 :         ndr_print_named_pipe_auth_req(ndr, name, r);
     371           0 : }
     372             : 
     373           0 : _PUBLIC_ void ndr_print_named_pipe_auth_req(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_req *r)
     374             : {
     375           0 :         ndr_print_struct(ndr, name, "named_pipe_auth_req");
     376           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     377           0 :         ndr->depth++;
     378             :         {
     379           0 :                 libndr_flags _flags_save_uint32 = ndr->flags;
     380           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     381           0 :                 ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_named_pipe_auth_req(r, ndr->flags) - 4:r->length);
     382           0 :                 ndr->flags = _flags_save_uint32;
     383             :         }
     384           0 :         ndr_print_string(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NAMED_PIPE_AUTH_MAGIC:r->magic);
     385           0 :         ndr_print_uint32(ndr, "level", r->level);
     386           0 :         ndr_print_set_switch_value(ndr, &r->info, r->level);
     387           0 :         ndr_print_named_pipe_auth_req_info(ndr, "info", &r->info);
     388           0 :         ndr->depth--;
     389             : }
     390             : 
     391       97422 : _PUBLIC_ size_t ndr_size_named_pipe_auth_req(const struct named_pipe_auth_req *r, libndr_flags flags)
     392             : {
     393       97422 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_named_pipe_auth_req);
     394             : }
     395             : 
     396       85710 : static enum ndr_err_code ndr_push_named_pipe_auth_rep_info8(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct named_pipe_auth_rep_info8 *r)
     397             : {
     398       85710 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     399       85710 :         if (ndr_flags & NDR_SCALARS) {
     400       85710 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     401       85710 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->file_type));
     402       85710 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->device_state));
     403       85710 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->allocation_size));
     404       85710 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     405             :         }
     406       85710 :         if (ndr_flags & NDR_BUFFERS) {
     407        1256 :         }
     408       85710 :         return NDR_ERR_SUCCESS;
     409             : }
     410             : 
     411       48624 : static enum ndr_err_code ndr_pull_named_pipe_auth_rep_info8(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct named_pipe_auth_rep_info8 *r)
     412             : {
     413       48624 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     414       48624 :         if (ndr_flags & NDR_SCALARS) {
     415       48624 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     416       48624 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->file_type));
     417       48624 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->device_state));
     418       48624 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->allocation_size));
     419       48624 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     420             :         }
     421       48624 :         if (ndr_flags & NDR_BUFFERS) {
     422         620 :         }
     423       48624 :         return NDR_ERR_SUCCESS;
     424             : }
     425             : 
     426           0 : _PUBLIC_ void ndr_print_named_pipe_auth_rep_info8(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_rep_info8 *r)
     427             : {
     428           0 :         ndr_print_struct(ndr, name, "named_pipe_auth_rep_info8");
     429           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     430           0 :         ndr->depth++;
     431           0 :         ndr_print_uint16(ndr, "file_type", r->file_type);
     432           0 :         ndr_print_uint16(ndr, "device_state", r->device_state);
     433           0 :         ndr_print_hyper(ndr, "allocation_size", r->allocation_size);
     434           0 :         ndr->depth--;
     435             : }
     436             : 
     437       85710 : static enum ndr_err_code ndr_push_named_pipe_auth_rep_info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union named_pipe_auth_rep_info *r)
     438             : {
     439        1256 :         uint32_t level;
     440       85710 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     441       85710 :         if (ndr_flags & NDR_SCALARS) {
     442             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     443       85710 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     444       85710 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
     445       85710 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
     446       85710 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
     447       85710 :                 switch (level) {
     448       85710 :                         case 8: {
     449       85710 :                                 NDR_CHECK(ndr_push_named_pipe_auth_rep_info8(ndr, NDR_SCALARS, &r->info8));
     450       84454 :                         break; }
     451             : 
     452           0 :                         default:
     453           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     454             :                 }
     455             :         }
     456       85710 :         if (ndr_flags & NDR_BUFFERS) {
     457           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     458             :                         /* We didn't get it above, and the token is not needed after this. */
     459           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     460             :                 }
     461           0 :                 switch (level) {
     462           0 :                         case 8:
     463           0 :                         break;
     464             : 
     465           0 :                         default:
     466           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     467             :                 }
     468             :         }
     469       84454 :         return NDR_ERR_SUCCESS;
     470             : }
     471             : 
     472       48624 : static enum ndr_err_code ndr_pull_named_pipe_auth_rep_info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union named_pipe_auth_rep_info *r)
     473             : {
     474         620 :         uint32_t level;
     475         620 :         uint32_t _level;
     476       48624 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     477       48624 :         if (ndr_flags & NDR_SCALARS) {
     478             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     479       48624 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     480       48624 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
     481       48624 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
     482       48624 :                 if (_level != level) {
     483           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
     484             :                 }
     485       48624 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
     486       48624 :                 switch (level) {
     487       48624 :                         case 8: {
     488       48624 :                                 NDR_CHECK(ndr_pull_named_pipe_auth_rep_info8(ndr, NDR_SCALARS, &r->info8));
     489       48004 :                         break; }
     490             : 
     491           0 :                         default:
     492           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     493             :                 }
     494             :         }
     495       48624 :         if (ndr_flags & NDR_BUFFERS) {
     496           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     497             :                         /* We didn't get it above, and the token is not needed after this. */
     498           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     499             :                 }
     500           0 :                 switch (level) {
     501           0 :                         case 8:
     502           0 :                         break;
     503             : 
     504           0 :                         default:
     505           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     506             :                 }
     507             :         }
     508       48004 :         return NDR_ERR_SUCCESS;
     509             : }
     510             : 
     511           0 : _PUBLIC_ void ndr_print_named_pipe_auth_rep_info(struct ndr_print *ndr, const char *name, const union named_pipe_auth_rep_info *r)
     512             : {
     513           0 :         uint32_t level;
     514           0 :         level = ndr_print_steal_switch_value(ndr, r);
     515           0 :         ndr_print_union(ndr, name, level, "named_pipe_auth_rep_info");
     516           0 :         switch (level) {
     517           0 :                 case 8:
     518           0 :                         ndr_print_named_pipe_auth_rep_info8(ndr, "info8", &r->info8);
     519           0 :                 break;
     520             : 
     521           0 :                 default:
     522           0 :                         ndr_print_bad_level(ndr, name, level);
     523             :         }
     524           0 : }
     525             : 
     526       85710 : _PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_rep(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct named_pipe_auth_rep *r)
     527             : {
     528       85710 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     529       85710 :         if (ndr_flags & NDR_SCALARS) {
     530       85710 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     531             :                 {
     532       85710 :                         libndr_flags _flags_save_uint32 = ndr->flags;
     533       85710 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     534       85710 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_named_pipe_auth_rep(r, ndr->flags) - 4));
     535       85710 :                         ndr->flags = _flags_save_uint32;
     536             :                 }
     537       85710 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, NAMED_PIPE_AUTH_MAGIC, 4, sizeof(uint8_t), CH_DOS));
     538       85710 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
     539       85710 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
     540       85710 :                 NDR_CHECK(ndr_push_named_pipe_auth_rep_info(ndr, NDR_SCALARS, &r->info));
     541       85710 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
     542       85710 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     543             :         }
     544       85710 :         if (ndr_flags & NDR_BUFFERS) {
     545        1256 :         }
     546       85710 :         return NDR_ERR_SUCCESS;
     547             : }
     548             : 
     549       48624 : _PUBLIC_ enum ndr_err_code ndr_pull_named_pipe_auth_rep(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct named_pipe_auth_rep *r)
     550             : {
     551       48624 :         uint32_t size_magic_0 = 0;
     552       48624 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     553       48624 :         if (ndr_flags & NDR_SCALARS) {
     554       48624 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     555             :                 {
     556       48624 :                         libndr_flags _flags_save_uint32 = ndr->flags;
     557       48624 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     558       48624 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
     559       48624 :                         ndr->flags = _flags_save_uint32;
     560             :                 }
     561       48624 :                 size_magic_0 = 4;
     562       48624 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->magic, size_magic_0, sizeof(uint8_t), CH_DOS));
     563       48624 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
     564       48624 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
     565       48624 :                 NDR_CHECK(ndr_pull_named_pipe_auth_rep_info(ndr, NDR_SCALARS, &r->info));
     566       48624 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
     567       48624 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     568             :         }
     569       48624 :         if (ndr_flags & NDR_BUFFERS) {
     570         620 :         }
     571       48624 :         return NDR_ERR_SUCCESS;
     572             : }
     573             : 
     574           0 : static void ndr_print_flags_named_pipe_auth_rep(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct named_pipe_auth_rep *r)
     575             : {
     576           0 :         ndr_print_named_pipe_auth_rep(ndr, name, r);
     577           0 : }
     578             : 
     579           0 : _PUBLIC_ void ndr_print_named_pipe_auth_rep(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_rep *r)
     580             : {
     581           0 :         ndr_print_struct(ndr, name, "named_pipe_auth_rep");
     582           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     583           0 :         ndr->depth++;
     584             :         {
     585           0 :                 libndr_flags _flags_save_uint32 = ndr->flags;
     586           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     587           0 :                 ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_named_pipe_auth_rep(r, ndr->flags) - 4:r->length);
     588           0 :                 ndr->flags = _flags_save_uint32;
     589             :         }
     590           0 :         ndr_print_string(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NAMED_PIPE_AUTH_MAGIC:r->magic);
     591           0 :         ndr_print_uint32(ndr, "level", r->level);
     592           0 :         ndr_print_set_switch_value(ndr, &r->info, r->level);
     593           0 :         ndr_print_named_pipe_auth_rep_info(ndr, "info", &r->info);
     594           0 :         ndr_print_NTSTATUS(ndr, "status", r->status);
     595           0 :         ndr->depth--;
     596             : }
     597             : 
     598       85710 : _PUBLIC_ size_t ndr_size_named_pipe_auth_rep(const struct named_pipe_auth_rep *r, libndr_flags flags)
     599             : {
     600       85710 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_named_pipe_auth_rep);
     601             : }
     602             : 
     603             : #ifndef SKIP_NDR_TABLE_named_pipe_auth
     604             : static const struct ndr_interface_public_struct named_pipe_auth_public_structs[] = {
     605             :         {
     606             :                 .name = "named_pipe_auth_req_info8",
     607             :                 .struct_size = sizeof(struct named_pipe_auth_req_info8 ),
     608             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_named_pipe_auth_req_info8,
     609             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_named_pipe_auth_req_info8,
     610             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_named_pipe_auth_req_info8,
     611             :         },
     612             :         {
     613             :                 .name = "named_pipe_auth_req",
     614             :                 .struct_size = sizeof(struct named_pipe_auth_req ),
     615             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_named_pipe_auth_req,
     616             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_named_pipe_auth_req,
     617             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_named_pipe_auth_req,
     618             :         },
     619             :         {
     620             :                 .name = "named_pipe_auth_rep",
     621             :                 .struct_size = sizeof(struct named_pipe_auth_rep ),
     622             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_named_pipe_auth_rep,
     623             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_named_pipe_auth_rep,
     624             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_named_pipe_auth_rep,
     625             :         },
     626             :         { .name = NULL }
     627             : };
     628             : 
     629             : static const struct ndr_interface_call named_pipe_auth_calls[] = {
     630             :         { .name = NULL }
     631             : };
     632             : 
     633             : static const char * const named_pipe_auth_endpoint_strings[] = {
     634             :         "ncacn_np:[\\pipe\\named_pipe_auth]", 
     635             : };
     636             : 
     637             : static const struct ndr_interface_string_array named_pipe_auth_endpoints = {
     638             :         .count  = 1,
     639             :         .names  = named_pipe_auth_endpoint_strings
     640             : };
     641             : 
     642             : static const char * const named_pipe_auth_authservice_strings[] = {
     643             :         "host", 
     644             : };
     645             : 
     646             : static const struct ndr_interface_string_array named_pipe_auth_authservices = {
     647             :         .count  = 1,
     648             :         .names  = named_pipe_auth_authservice_strings
     649             : };
     650             : 
     651             : 
     652             : const struct ndr_interface_table ndr_table_named_pipe_auth = {
     653             :         .name           = "named_pipe_auth",
     654             :         .num_calls      = 0,
     655             :         .calls          = named_pipe_auth_calls,
     656             :         .num_public_structs     = 3,
     657             :         .public_structs         = named_pipe_auth_public_structs,
     658             :         .endpoints      = &named_pipe_auth_endpoints,
     659             :         .authservices   = &named_pipe_auth_authservices
     660             : };
     661             : 
     662             : #endif /* SKIP_NDR_TABLE_named_pipe_auth */

Generated by: LCOV version 1.14