LCOV - code coverage report
Current view: top level - bin/default/source3/librpc/gen_ndr - ndr_rpcd_witness.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 0 579 0.0 %
Date: 2024-04-21 15:09:00 Functions: 0 32 0.0 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/source3/librpc/gen_ndr/ndr_rpcd_witness.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_misc.h"
       7             : #include "librpc/gen_ndr/ndr_server_id.h"
       8             : #include "librpc/gen_ndr/ndr_security.h"
       9             : #include "librpc/gen_ndr/ndr_witness.h"
      10           0 : _PUBLIC_ enum ndr_err_code ndr_push_rpcd_witness_registration(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct rpcd_witness_registration *r)
      11             : {
      12           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      13           0 :         if (ndr_flags & NDR_SCALARS) {
      14           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
      15           0 :                 NDR_CHECK(ndr_push_witness_version(ndr, NDR_SCALARS, r->version));
      16           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_name, CH_UTF8)));
      17           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      18           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_name, CH_UTF8)));
      19           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_name, ndr_charset_length(r->net_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      20           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share_name));
      21           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ip_address, CH_UTF8)));
      22           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      23           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ip_address, CH_UTF8)));
      24           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ip_address, ndr_charset_length(r->ip_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      25           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_computer_name, CH_UTF8)));
      26           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      27           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_computer_name, CH_UTF8)));
      28           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_computer_name, ndr_charset_length(r->client_computer_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      29           0 :                 NDR_CHECK(ndr_push_witness_RegisterEx_flags(ndr, NDR_SCALARS, r->flags));
      30           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
      31           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->context_handle));
      32           0 :                 NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server_id));
      33           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
      34           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      35           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
      36           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      37           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF8)));
      38           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      39           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF8)));
      40           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      41           0 :                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->account_sid));
      42           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_address, CH_UTF8)));
      43           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      44           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->local_address, CH_UTF8)));
      45           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->local_address, ndr_charset_length(r->local_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      46           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_address, CH_UTF8)));
      47           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      48           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_address, CH_UTF8)));
      49           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_address, ndr_charset_length(r->remote_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      50           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->registration_time));
      51           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
      52             :         }
      53           0 :         if (ndr_flags & NDR_BUFFERS) {
      54           0 :                 if (r->share_name) {
      55           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share_name, CH_UTF8)));
      56           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      57           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share_name, CH_UTF8)));
      58           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share_name, ndr_charset_length(r->share_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
      59             :                 }
      60             :         }
      61           0 :         return NDR_ERR_SUCCESS;
      62             : }
      63             : 
      64           0 : _PUBLIC_ enum ndr_err_code ndr_pull_rpcd_witness_registration(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct rpcd_witness_registration *r)
      65             : {
      66           0 :         uint32_t size_net_name_0 = 0;
      67           0 :         uint32_t length_net_name_0 = 0;
      68           0 :         uint32_t _ptr_share_name;
      69           0 :         uint32_t size_share_name_1 = 0;
      70           0 :         uint32_t length_share_name_1 = 0;
      71           0 :         TALLOC_CTX *_mem_save_share_name_0 = NULL;
      72           0 :         uint32_t size_ip_address_0 = 0;
      73           0 :         uint32_t length_ip_address_0 = 0;
      74           0 :         uint32_t size_client_computer_name_0 = 0;
      75           0 :         uint32_t length_client_computer_name_0 = 0;
      76           0 :         uint32_t size_account_name_0 = 0;
      77           0 :         uint32_t length_account_name_0 = 0;
      78           0 :         uint32_t size_domain_name_0 = 0;
      79           0 :         uint32_t length_domain_name_0 = 0;
      80           0 :         uint32_t size_local_address_0 = 0;
      81           0 :         uint32_t length_local_address_0 = 0;
      82           0 :         uint32_t size_remote_address_0 = 0;
      83           0 :         uint32_t length_remote_address_0 = 0;
      84           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      85           0 :         if (ndr_flags & NDR_SCALARS) {
      86           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
      87           0 :                 NDR_CHECK(ndr_pull_witness_version(ndr, NDR_SCALARS, &r->version));
      88           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_name));
      89           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_name));
      90           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->net_name, &size_net_name_0));
      91           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->net_name, &length_net_name_0));
      92           0 :                 if (length_net_name_0 > size_net_name_0) {
      93           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_net_name_0, length_net_name_0);
      94             :                 }
      95           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_name_0, sizeof(uint8_t)));
      96           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_name, length_net_name_0, sizeof(uint8_t), CH_UTF8));
      97           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share_name));
      98           0 :                 if (_ptr_share_name) {
      99           0 :                         NDR_PULL_ALLOC(ndr, r->share_name);
     100             :                 } else {
     101           0 :                         r->share_name = NULL;
     102             :                 }
     103           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->ip_address));
     104           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->ip_address));
     105           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->ip_address, &size_ip_address_0));
     106           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->ip_address, &length_ip_address_0));
     107           0 :                 if (length_ip_address_0 > size_ip_address_0) {
     108           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ip_address_0, length_ip_address_0);
     109             :                 }
     110           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_ip_address_0, sizeof(uint8_t)));
     111           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ip_address, length_ip_address_0, sizeof(uint8_t), CH_UTF8));
     112           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_computer_name));
     113           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_computer_name));
     114           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_computer_name, &size_client_computer_name_0));
     115           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_computer_name, &length_client_computer_name_0));
     116           0 :                 if (length_client_computer_name_0 > size_client_computer_name_0) {
     117           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_computer_name_0, length_client_computer_name_0);
     118             :                 }
     119           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_computer_name_0, sizeof(uint8_t)));
     120           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_computer_name, length_client_computer_name_0, sizeof(uint8_t), CH_UTF8));
     121           0 :                 NDR_CHECK(ndr_pull_witness_RegisterEx_flags(ndr, NDR_SCALARS, &r->flags));
     122           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
     123           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->context_handle));
     124           0 :                 NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server_id));
     125           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
     126           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
     127           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_0));
     128           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_0));
     129           0 :                 if (length_account_name_0 > size_account_name_0) {
     130           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_0, length_account_name_0);
     131             :                 }
     132           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_0, sizeof(uint8_t)));
     133           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_0, sizeof(uint8_t), CH_UTF8));
     134           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
     135           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
     136           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_0));
     137           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_0));
     138           0 :                 if (length_domain_name_0 > size_domain_name_0) {
     139           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_0, length_domain_name_0);
     140             :                 }
     141           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_0, sizeof(uint8_t)));
     142           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_0, sizeof(uint8_t), CH_UTF8));
     143           0 :                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->account_sid));
     144           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->local_address));
     145           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->local_address));
     146           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->local_address, &size_local_address_0));
     147           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->local_address, &length_local_address_0));
     148           0 :                 if (length_local_address_0 > size_local_address_0) {
     149           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_local_address_0, length_local_address_0);
     150             :                 }
     151           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_local_address_0, sizeof(uint8_t)));
     152           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->local_address, length_local_address_0, sizeof(uint8_t), CH_UTF8));
     153           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_address));
     154           0 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_address));
     155           0 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_address, &size_remote_address_0));
     156           0 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_address, &length_remote_address_0));
     157           0 :                 if (length_remote_address_0 > size_remote_address_0) {
     158           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_address_0, length_remote_address_0);
     159             :                 }
     160           0 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_address_0, sizeof(uint8_t)));
     161           0 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_address, length_remote_address_0, sizeof(uint8_t), CH_UTF8));
     162           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->registration_time));
     163           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     164             :         }
     165           0 :         if (ndr_flags & NDR_BUFFERS) {
     166           0 :                 if (r->share_name) {
     167           0 :                         _mem_save_share_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
     168           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->share_name, 0);
     169           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->share_name));
     170           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->share_name));
     171           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->share_name, &size_share_name_1));
     172           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->share_name, &length_share_name_1));
     173           0 :                         if (length_share_name_1 > size_share_name_1) {
     174           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_share_name_1, length_share_name_1);
     175             :                         }
     176           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_1, sizeof(uint8_t)));
     177           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share_name, length_share_name_1, sizeof(uint8_t), CH_UTF8));
     178           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_name_0, 0);
     179             :                 }
     180             :         }
     181           0 :         return NDR_ERR_SUCCESS;
     182             : }
     183             : 
     184           0 : static void ndr_print_flags_rpcd_witness_registration(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct rpcd_witness_registration *r)
     185             : {
     186           0 :         ndr_print_rpcd_witness_registration(ndr, name, r);
     187           0 : }
     188             : 
     189           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration(struct ndr_print *ndr, const char *name, const struct rpcd_witness_registration *r)
     190             : {
     191           0 :         ndr_print_struct(ndr, name, "rpcd_witness_registration");
     192           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     193           0 :         ndr->depth++;
     194           0 :         ndr_print_witness_version(ndr, "version", r->version);
     195           0 :         ndr_print_string(ndr, "net_name", r->net_name);
     196           0 :         ndr_print_ptr(ndr, "share_name", r->share_name);
     197           0 :         ndr->depth++;
     198           0 :         if (r->share_name) {
     199           0 :                 ndr_print_string(ndr, "share_name", r->share_name);
     200             :         }
     201           0 :         ndr->depth--;
     202           0 :         ndr_print_string(ndr, "ip_address", r->ip_address);
     203           0 :         ndr_print_string(ndr, "client_computer_name", r->client_computer_name);
     204           0 :         ndr_print_witness_RegisterEx_flags(ndr, "flags", r->flags);
     205           0 :         ndr_print_uint32(ndr, "timeout", r->timeout);
     206           0 :         ndr_print_policy_handle(ndr, "context_handle", &r->context_handle);
     207           0 :         ndr_print_server_id(ndr, "server_id", &r->server_id);
     208           0 :         ndr_print_string(ndr, "account_name", r->account_name);
     209           0 :         ndr_print_string(ndr, "domain_name", r->domain_name);
     210           0 :         ndr_print_dom_sid(ndr, "account_sid", &r->account_sid);
     211           0 :         ndr_print_string(ndr, "local_address", r->local_address);
     212           0 :         ndr_print_string(ndr, "remote_address", r->remote_address);
     213           0 :         ndr_print_NTTIME(ndr, "registration_time", r->registration_time);
     214           0 :         ndr->depth--;
     215             : }
     216             : 
     217           0 : static enum ndr_err_code ndr_push_rpcd_witness_registration_update_type(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum rpcd_witness_registration_update_type r)
     218             : {
     219           0 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
     220           0 :         return NDR_ERR_SUCCESS;
     221             : }
     222             : 
     223           0 : static enum ndr_err_code ndr_pull_rpcd_witness_registration_update_type(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum rpcd_witness_registration_update_type *r)
     224             : {
     225           0 :         uint16_t v;
     226           0 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
     227           0 :         *r = v;
     228           0 :         return NDR_ERR_SUCCESS;
     229             : }
     230             : 
     231           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_update_type(struct ndr_print *ndr, const char *name, enum rpcd_witness_registration_update_type r)
     232             : {
     233           0 :         const char *val = NULL;
     234             : 
     235           0 :         switch (r) {
     236           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE: val = "RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE"; break;
     237           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4: val = "RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4"; break;
     238           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6: val = "RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6"; break;
     239           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE: val = "RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE"; break;
     240           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4: val = "RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4"; break;
     241           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6: val = "RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6"; break;
     242           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER: val = "RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER"; break;
     243           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE: val = "RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE"; break;
     244             :         }
     245           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     246           0 : }
     247             : 
     248           0 : static enum ndr_err_code ndr_push_rpcd_witness_registration_update_move_to_node(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct rpcd_witness_registration_update_move_to_node *r)
     249             : {
     250           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     251           0 :         if (ndr_flags & NDR_SCALARS) {
     252           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     253           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->new_node));
     254           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     255             :         }
     256           0 :         if (ndr_flags & NDR_BUFFERS) {
     257           0 :         }
     258           0 :         return NDR_ERR_SUCCESS;
     259             : }
     260             : 
     261           0 : static enum ndr_err_code ndr_pull_rpcd_witness_registration_update_move_to_node(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct rpcd_witness_registration_update_move_to_node *r)
     262             : {
     263           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     264           0 :         if (ndr_flags & NDR_SCALARS) {
     265           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     266           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->new_node));
     267           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     268             :         }
     269           0 :         if (ndr_flags & NDR_BUFFERS) {
     270           0 :         }
     271           0 :         return NDR_ERR_SUCCESS;
     272             : }
     273             : 
     274           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_update_move_to_node(struct ndr_print *ndr, const char *name, const struct rpcd_witness_registration_update_move_to_node *r)
     275             : {
     276           0 :         ndr_print_struct(ndr, name, "rpcd_witness_registration_update_move_to_node");
     277           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     278           0 :         ndr->depth++;
     279           0 :         ndr_print_uint32(ndr, "new_node", r->new_node);
     280           0 :         ndr->depth--;
     281             : }
     282             : 
     283           0 : static enum ndr_err_code ndr_push_rpcd_witness_registration_update_move_to_ipv4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct rpcd_witness_registration_update_move_to_ipv4 *r)
     284             : {
     285           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     286           0 :         if (ndr_flags & NDR_SCALARS) {
     287           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     288             :                 {
     289           0 :                         libndr_flags _flags_save_ipv4address = ndr->flags;
     290           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     291           0 :                         NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->new_ipv4));
     292           0 :                         ndr->flags = _flags_save_ipv4address;
     293             :                 }
     294           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     295             :         }
     296           0 :         if (ndr_flags & NDR_BUFFERS) {
     297           0 :         }
     298           0 :         return NDR_ERR_SUCCESS;
     299             : }
     300             : 
     301           0 : static enum ndr_err_code ndr_pull_rpcd_witness_registration_update_move_to_ipv4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct rpcd_witness_registration_update_move_to_ipv4 *r)
     302             : {
     303           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     304           0 :         if (ndr_flags & NDR_SCALARS) {
     305           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     306             :                 {
     307           0 :                         libndr_flags _flags_save_ipv4address = ndr->flags;
     308           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     309           0 :                         NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->new_ipv4));
     310           0 :                         ndr->flags = _flags_save_ipv4address;
     311             :                 }
     312           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     313             :         }
     314           0 :         if (ndr_flags & NDR_BUFFERS) {
     315           0 :         }
     316           0 :         return NDR_ERR_SUCCESS;
     317             : }
     318             : 
     319           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_update_move_to_ipv4(struct ndr_print *ndr, const char *name, const struct rpcd_witness_registration_update_move_to_ipv4 *r)
     320             : {
     321           0 :         ndr_print_struct(ndr, name, "rpcd_witness_registration_update_move_to_ipv4");
     322           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     323           0 :         ndr->depth++;
     324             :         {
     325           0 :                 libndr_flags _flags_save_ipv4address = ndr->flags;
     326           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     327           0 :                 ndr_print_ipv4address(ndr, "new_ipv4", r->new_ipv4);
     328           0 :                 ndr->flags = _flags_save_ipv4address;
     329             :         }
     330           0 :         ndr->depth--;
     331             : }
     332             : 
     333           0 : static enum ndr_err_code ndr_push_rpcd_witness_registration_update_move_to_ipv6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct rpcd_witness_registration_update_move_to_ipv6 *r)
     334             : {
     335           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     336           0 :         if (ndr_flags & NDR_SCALARS) {
     337           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     338             :                 {
     339           0 :                         libndr_flags _flags_save_ipv6address = ndr->flags;
     340           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     341           0 :                         NDR_CHECK(ndr_push_ipv6address(ndr, NDR_SCALARS, r->new_ipv6));
     342           0 :                         ndr->flags = _flags_save_ipv6address;
     343             :                 }
     344           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     345             :         }
     346           0 :         if (ndr_flags & NDR_BUFFERS) {
     347           0 :         }
     348           0 :         return NDR_ERR_SUCCESS;
     349             : }
     350             : 
     351           0 : static enum ndr_err_code ndr_pull_rpcd_witness_registration_update_move_to_ipv6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct rpcd_witness_registration_update_move_to_ipv6 *r)
     352             : {
     353           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     354           0 :         if (ndr_flags & NDR_SCALARS) {
     355           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     356             :                 {
     357           0 :                         libndr_flags _flags_save_ipv6address = ndr->flags;
     358           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     359           0 :                         NDR_CHECK(ndr_pull_ipv6address(ndr, NDR_SCALARS, &r->new_ipv6));
     360           0 :                         ndr->flags = _flags_save_ipv6address;
     361             :                 }
     362           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     363             :         }
     364           0 :         if (ndr_flags & NDR_BUFFERS) {
     365           0 :         }
     366           0 :         return NDR_ERR_SUCCESS;
     367             : }
     368             : 
     369           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_update_move_to_ipv6(struct ndr_print *ndr, const char *name, const struct rpcd_witness_registration_update_move_to_ipv6 *r)
     370             : {
     371           0 :         ndr_print_struct(ndr, name, "rpcd_witness_registration_update_move_to_ipv6");
     372           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     373           0 :         ndr->depth++;
     374             :         {
     375           0 :                 libndr_flags _flags_save_ipv6address = ndr->flags;
     376           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
     377           0 :                 ndr_print_ipv6address(ndr, "new_ipv6", r->new_ipv6);
     378           0 :                 ndr->flags = _flags_save_ipv6address;
     379             :         }
     380           0 :         ndr->depth--;
     381             : }
     382             : 
     383           0 : static enum ndr_err_code ndr_push_rpcd_witness_registration_update_force_response(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct rpcd_witness_registration_update_force_response *r)
     384             : {
     385           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     386           0 :         if (ndr_flags & NDR_SCALARS) {
     387           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     388           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->response));
     389           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result));
     390           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     391             :         }
     392           0 :         if (ndr_flags & NDR_BUFFERS) {
     393           0 :                 if (r->response) {
     394           0 :                         NDR_CHECK(ndr_push_witness_notifyResponse(ndr, NDR_SCALARS|NDR_BUFFERS, r->response));
     395             :                 }
     396             :         }
     397           0 :         return NDR_ERR_SUCCESS;
     398             : }
     399             : 
     400           0 : static enum ndr_err_code ndr_pull_rpcd_witness_registration_update_force_response(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct rpcd_witness_registration_update_force_response *r)
     401             : {
     402           0 :         uint32_t _ptr_response;
     403           0 :         TALLOC_CTX *_mem_save_response_0 = NULL;
     404           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     405           0 :         if (ndr_flags & NDR_SCALARS) {
     406           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     407           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_response));
     408           0 :                 if (_ptr_response) {
     409           0 :                         NDR_PULL_ALLOC(ndr, r->response);
     410             :                 } else {
     411           0 :                         r->response = NULL;
     412             :                 }
     413           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result));
     414           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     415             :         }
     416           0 :         if (ndr_flags & NDR_BUFFERS) {
     417           0 :                 if (r->response) {
     418           0 :                         _mem_save_response_0 = NDR_PULL_GET_MEM_CTX(ndr);
     419           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->response, 0);
     420           0 :                         NDR_CHECK(ndr_pull_witness_notifyResponse(ndr, NDR_SCALARS|NDR_BUFFERS, r->response));
     421           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_response_0, 0);
     422             :                 }
     423             :         }
     424           0 :         return NDR_ERR_SUCCESS;
     425             : }
     426             : 
     427           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_update_force_response(struct ndr_print *ndr, const char *name, const struct rpcd_witness_registration_update_force_response *r)
     428             : {
     429           0 :         ndr_print_struct(ndr, name, "rpcd_witness_registration_update_force_response");
     430           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     431           0 :         ndr->depth++;
     432           0 :         ndr_print_ptr(ndr, "response", r->response);
     433           0 :         ndr->depth++;
     434           0 :         if (r->response) {
     435           0 :                 ndr_print_witness_notifyResponse(ndr, "response", r->response);
     436             :         }
     437           0 :         ndr->depth--;
     438           0 :         ndr_print_WERROR(ndr, "result", r->result);
     439           0 :         ndr->depth--;
     440             : }
     441             : 
     442           0 : static enum ndr_err_code ndr_push_rpcd_witness_registration_updateU(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union rpcd_witness_registration_updateU *r)
     443             : {
     444           0 :         uint32_t level;
     445           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     446           0 :         if (ndr_flags & NDR_SCALARS) {
     447             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     448           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     449           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     450           0 :                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_type(ndr, NDR_SCALARS, level));
     451           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     452           0 :                 switch (level) {
     453           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE: {
     454           0 :                                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_move_to_node(ndr, NDR_SCALARS, &r->client_move_to_node));
     455           0 :                         break; }
     456             : 
     457           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4: {
     458           0 :                                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_move_to_ipv4(ndr, NDR_SCALARS, &r->client_move_to_ipv4));
     459           0 :                         break; }
     460             : 
     461           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6: {
     462           0 :                                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_move_to_ipv6(ndr, NDR_SCALARS, &r->client_move_to_ipv6));
     463           0 :                         break; }
     464             : 
     465           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE: {
     466           0 :                                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_move_to_node(ndr, NDR_SCALARS, &r->share_move_to_node));
     467           0 :                         break; }
     468             : 
     469           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4: {
     470           0 :                                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_move_to_ipv4(ndr, NDR_SCALARS, &r->share_move_to_ipv4));
     471           0 :                         break; }
     472             : 
     473           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6: {
     474           0 :                                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_move_to_ipv6(ndr, NDR_SCALARS, &r->share_move_to_ipv6));
     475           0 :                         break; }
     476             : 
     477           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER: {
     478           0 :                         break; }
     479             : 
     480           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE: {
     481           0 :                                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_force_response(ndr, NDR_SCALARS, &r->force_response));
     482           0 :                         break; }
     483             : 
     484           0 :                         default:
     485           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     486             :                 }
     487             :         }
     488           0 :         if (ndr_flags & NDR_BUFFERS) {
     489           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     490             :                         /* We didn't get it above, and the token is not needed after this. */
     491           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     492             :                 }
     493           0 :                 switch (level) {
     494           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE:
     495           0 :                         break;
     496             : 
     497           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4:
     498           0 :                         break;
     499             : 
     500           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6:
     501           0 :                         break;
     502             : 
     503           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE:
     504           0 :                         break;
     505             : 
     506           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4:
     507           0 :                         break;
     508             : 
     509           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6:
     510           0 :                         break;
     511             : 
     512           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER:
     513           0 :                         break;
     514             : 
     515           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE:
     516           0 :                                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_force_response(ndr, NDR_BUFFERS, &r->force_response));
     517           0 :                         break;
     518             : 
     519           0 :                         default:
     520           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     521             :                 }
     522             :         }
     523           0 :         return NDR_ERR_SUCCESS;
     524             : }
     525             : 
     526           0 : static enum ndr_err_code ndr_pull_rpcd_witness_registration_updateU(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union rpcd_witness_registration_updateU *r)
     527             : {
     528           0 :         uint32_t level;
     529           0 :         uint16_t _level;
     530           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     531           0 :         if (ndr_flags & NDR_SCALARS) {
     532             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     533           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     534           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     535           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
     536           0 :                 if (_level != level) {
     537           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
     538             :                 }
     539           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     540           0 :                 switch (level) {
     541           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE: {
     542           0 :                                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_move_to_node(ndr, NDR_SCALARS, &r->client_move_to_node));
     543           0 :                         break; }
     544             : 
     545           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4: {
     546           0 :                                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_move_to_ipv4(ndr, NDR_SCALARS, &r->client_move_to_ipv4));
     547           0 :                         break; }
     548             : 
     549           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6: {
     550           0 :                                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_move_to_ipv6(ndr, NDR_SCALARS, &r->client_move_to_ipv6));
     551           0 :                         break; }
     552             : 
     553           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE: {
     554           0 :                                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_move_to_node(ndr, NDR_SCALARS, &r->share_move_to_node));
     555           0 :                         break; }
     556             : 
     557           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4: {
     558           0 :                                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_move_to_ipv4(ndr, NDR_SCALARS, &r->share_move_to_ipv4));
     559           0 :                         break; }
     560             : 
     561           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6: {
     562           0 :                                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_move_to_ipv6(ndr, NDR_SCALARS, &r->share_move_to_ipv6));
     563           0 :                         break; }
     564             : 
     565           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER: {
     566           0 :                         break; }
     567             : 
     568           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE: {
     569           0 :                                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_force_response(ndr, NDR_SCALARS, &r->force_response));
     570           0 :                         break; }
     571             : 
     572           0 :                         default:
     573           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     574             :                 }
     575             :         }
     576           0 :         if (ndr_flags & NDR_BUFFERS) {
     577           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     578             :                         /* We didn't get it above, and the token is not needed after this. */
     579           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     580             :                 }
     581           0 :                 switch (level) {
     582           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE:
     583           0 :                         break;
     584             : 
     585           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4:
     586           0 :                         break;
     587             : 
     588           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6:
     589           0 :                         break;
     590             : 
     591           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE:
     592           0 :                         break;
     593             : 
     594           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4:
     595           0 :                         break;
     596             : 
     597           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6:
     598           0 :                         break;
     599             : 
     600           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER:
     601           0 :                         break;
     602             : 
     603           0 :                         case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE:
     604           0 :                                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_force_response(ndr, NDR_BUFFERS, &r->force_response));
     605           0 :                         break;
     606             : 
     607           0 :                         default:
     608           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     609             :                 }
     610             :         }
     611           0 :         return NDR_ERR_SUCCESS;
     612             : }
     613             : 
     614           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_updateU(struct ndr_print *ndr, const char *name, const union rpcd_witness_registration_updateU *r)
     615             : {
     616           0 :         uint32_t level;
     617           0 :         level = ndr_print_steal_switch_value(ndr, r);
     618           0 :         ndr_print_union(ndr, name, level, "rpcd_witness_registration_updateU");
     619           0 :         switch (level) {
     620           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_NODE:
     621           0 :                         ndr_print_rpcd_witness_registration_update_move_to_node(ndr, "client_move_to_node", &r->client_move_to_node);
     622           0 :                 break;
     623             : 
     624           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV4:
     625           0 :                         ndr_print_rpcd_witness_registration_update_move_to_ipv4(ndr, "client_move_to_ipv4", &r->client_move_to_ipv4);
     626           0 :                 break;
     627             : 
     628           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_CLIENT_MOVE_TO_IPV6:
     629           0 :                         ndr_print_rpcd_witness_registration_update_move_to_ipv6(ndr, "client_move_to_ipv6", &r->client_move_to_ipv6);
     630           0 :                 break;
     631             : 
     632           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_NODE:
     633           0 :                         ndr_print_rpcd_witness_registration_update_move_to_node(ndr, "share_move_to_node", &r->share_move_to_node);
     634           0 :                 break;
     635             : 
     636           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV4:
     637           0 :                         ndr_print_rpcd_witness_registration_update_move_to_ipv4(ndr, "share_move_to_ipv4", &r->share_move_to_ipv4);
     638           0 :                 break;
     639             : 
     640           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_SHARE_MOVE_TO_IPV6:
     641           0 :                         ndr_print_rpcd_witness_registration_update_move_to_ipv6(ndr, "share_move_to_ipv6", &r->share_move_to_ipv6);
     642           0 :                 break;
     643             : 
     644           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_UNREGISTER:
     645           0 :                 break;
     646             : 
     647           0 :                 case RPCD_WITNESS_REGISTRATION_UPDATE_FORCE_RESPONSE:
     648           0 :                         ndr_print_rpcd_witness_registration_update_force_response(ndr, "force_response", &r->force_response);
     649           0 :                 break;
     650             : 
     651           0 :                 default:
     652           0 :                         ndr_print_bad_level(ndr, name, level);
     653             :         }
     654           0 : }
     655             : 
     656           0 : _PUBLIC_ enum ndr_err_code ndr_push_rpcd_witness_registration_updateB(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct rpcd_witness_registration_updateB *r)
     657             : {
     658           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     659           0 :         if (ndr_flags & NDR_SCALARS) {
     660           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     661           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->context_handle));
     662           0 :                 NDR_CHECK(ndr_push_rpcd_witness_registration_update_type(ndr, NDR_SCALARS, r->type));
     663           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->update, r->type));
     664           0 :                 NDR_CHECK(ndr_push_rpcd_witness_registration_updateU(ndr, NDR_SCALARS, &r->update));
     665           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     666             :         }
     667           0 :         if (ndr_flags & NDR_BUFFERS) {
     668           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->update, r->type));
     669           0 :                 NDR_CHECK(ndr_push_rpcd_witness_registration_updateU(ndr, NDR_BUFFERS, &r->update));
     670             :         }
     671           0 :         return NDR_ERR_SUCCESS;
     672             : }
     673             : 
     674           0 : _PUBLIC_ enum ndr_err_code ndr_pull_rpcd_witness_registration_updateB(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct rpcd_witness_registration_updateB *r)
     675             : {
     676           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     677           0 :         if (ndr_flags & NDR_SCALARS) {
     678           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     679           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->context_handle));
     680           0 :                 NDR_CHECK(ndr_pull_rpcd_witness_registration_update_type(ndr, NDR_SCALARS, &r->type));
     681           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->update, r->type));
     682           0 :                 NDR_CHECK(ndr_pull_rpcd_witness_registration_updateU(ndr, NDR_SCALARS, &r->update));
     683           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     684             :         }
     685           0 :         if (ndr_flags & NDR_BUFFERS) {
     686           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->update, r->type));
     687           0 :                 NDR_CHECK(ndr_pull_rpcd_witness_registration_updateU(ndr, NDR_BUFFERS, &r->update));
     688             :         }
     689           0 :         return NDR_ERR_SUCCESS;
     690             : }
     691             : 
     692           0 : static void ndr_print_flags_rpcd_witness_registration_updateB(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct rpcd_witness_registration_updateB *r)
     693             : {
     694           0 :         ndr_print_rpcd_witness_registration_updateB(ndr, name, r);
     695           0 : }
     696             : 
     697           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_updateB(struct ndr_print *ndr, const char *name, const struct rpcd_witness_registration_updateB *r)
     698             : {
     699           0 :         ndr_print_struct(ndr, name, "rpcd_witness_registration_updateB");
     700           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     701           0 :         ndr->depth++;
     702           0 :         ndr_print_policy_handle(ndr, "context_handle", &r->context_handle);
     703           0 :         ndr_print_rpcd_witness_registration_update_type(ndr, "type", r->type);
     704           0 :         ndr_print_set_switch_value(ndr, &r->update, r->type);
     705           0 :         ndr_print_rpcd_witness_registration_updateU(ndr, "update", &r->update);
     706           0 :         ndr->depth--;
     707             : }
     708             : 
     709           0 : static enum ndr_err_code ndr_push_rpcd_witness_registration_decode(struct ndr_push *ndr, ndr_flags_type flags, const struct rpcd_witness_registration_decode *r)
     710             : {
     711           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     712           0 :         if (flags & NDR_IN) {
     713           0 :                 NDR_CHECK(ndr_push_rpcd_witness_registration(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.reg));
     714             :         }
     715           0 :         if (flags & NDR_OUT) {
     716           0 :         }
     717           0 :         return NDR_ERR_SUCCESS;
     718             : }
     719             : 
     720           0 : static enum ndr_err_code ndr_pull_rpcd_witness_registration_decode(struct ndr_pull *ndr, ndr_flags_type flags, struct rpcd_witness_registration_decode *r)
     721             : {
     722           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     723           0 :         if (flags & NDR_IN) {
     724           0 :                 NDR_CHECK(ndr_pull_rpcd_witness_registration(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.reg));
     725             :         }
     726           0 :         if (flags & NDR_OUT) {
     727             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     728             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     729           0 :         }
     730           0 :         return NDR_ERR_SUCCESS;
     731             : }
     732             : 
     733           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_decode(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct rpcd_witness_registration_decode *r)
     734             : {
     735           0 :         ndr_print_struct(ndr, name, "rpcd_witness_registration_decode");
     736           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     737           0 :         ndr->depth++;
     738           0 :         if (flags & NDR_SET_VALUES) {
     739           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     740             :         }
     741           0 :         if (flags & NDR_IN) {
     742           0 :                 ndr_print_struct(ndr, "in", "rpcd_witness_registration_decode");
     743           0 :                 ndr->depth++;
     744           0 :                 ndr_print_rpcd_witness_registration(ndr, "reg", &r->in.reg);
     745           0 :                 ndr->depth--;
     746             :         }
     747           0 :         if (flags & NDR_OUT) {
     748           0 :                 ndr_print_struct(ndr, "out", "rpcd_witness_registration_decode");
     749           0 :                 ndr->depth++;
     750           0 :                 ndr->depth--;
     751             :         }
     752           0 :         ndr->depth--;
     753             : }
     754             : 
     755           0 : static enum ndr_err_code ndr_push_rpcd_witness_registration_update_decode(struct ndr_push *ndr, ndr_flags_type flags, const struct rpcd_witness_registration_update_decode *r)
     756             : {
     757           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     758           0 :         if (flags & NDR_IN) {
     759           0 :                 NDR_CHECK(ndr_push_rpcd_witness_registration_updateB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.update));
     760             :         }
     761           0 :         if (flags & NDR_OUT) {
     762           0 :         }
     763           0 :         return NDR_ERR_SUCCESS;
     764             : }
     765             : 
     766           0 : static enum ndr_err_code ndr_pull_rpcd_witness_registration_update_decode(struct ndr_pull *ndr, ndr_flags_type flags, struct rpcd_witness_registration_update_decode *r)
     767             : {
     768           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     769           0 :         if (flags & NDR_IN) {
     770           0 :                 NDR_CHECK(ndr_pull_rpcd_witness_registration_updateB(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.update));
     771             :         }
     772           0 :         if (flags & NDR_OUT) {
     773             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     774             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     775           0 :         }
     776           0 :         return NDR_ERR_SUCCESS;
     777             : }
     778             : 
     779           0 : _PUBLIC_ void ndr_print_rpcd_witness_registration_update_decode(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct rpcd_witness_registration_update_decode *r)
     780             : {
     781           0 :         ndr_print_struct(ndr, name, "rpcd_witness_registration_update_decode");
     782           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     783           0 :         ndr->depth++;
     784           0 :         if (flags & NDR_SET_VALUES) {
     785           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     786             :         }
     787           0 :         if (flags & NDR_IN) {
     788           0 :                 ndr_print_struct(ndr, "in", "rpcd_witness_registration_update_decode");
     789           0 :                 ndr->depth++;
     790           0 :                 ndr_print_rpcd_witness_registration_updateB(ndr, "update", &r->in.update);
     791           0 :                 ndr->depth--;
     792             :         }
     793           0 :         if (flags & NDR_OUT) {
     794           0 :                 ndr_print_struct(ndr, "out", "rpcd_witness_registration_update_decode");
     795           0 :                 ndr->depth++;
     796           0 :                 ndr->depth--;
     797             :         }
     798           0 :         ndr->depth--;
     799             : }
     800             : 
     801             : #ifndef SKIP_NDR_TABLE_rpcd_witness
     802             : static const struct ndr_interface_public_struct rpcd_witness_public_structs[] = {
     803             :         {
     804             :                 .name = "rpcd_witness_registration",
     805             :                 .struct_size = sizeof(struct rpcd_witness_registration ),
     806             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_rpcd_witness_registration,
     807             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_rpcd_witness_registration,
     808             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_rpcd_witness_registration,
     809             :         },
     810             :         {
     811             :                 .name = "rpcd_witness_registration_updateB",
     812             :                 .struct_size = sizeof(struct rpcd_witness_registration_updateB ),
     813             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_rpcd_witness_registration_updateB,
     814             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_rpcd_witness_registration_updateB,
     815             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_rpcd_witness_registration_updateB,
     816             :         },
     817             :         { .name = NULL }
     818             : };
     819             : 
     820             : static const struct ndr_interface_call rpcd_witness_calls[] = {
     821             :         {
     822             :                 "rpcd_witness_registration_decode",
     823             :                 sizeof(struct rpcd_witness_registration_decode),
     824             :                 (ndr_push_flags_fn_t) ndr_push_rpcd_witness_registration_decode,
     825             :                 (ndr_pull_flags_fn_t) ndr_pull_rpcd_witness_registration_decode,
     826             :                 (ndr_print_function_t) ndr_print_rpcd_witness_registration_decode,
     827             :                 { 0, NULL },
     828             :                 { 0, NULL },
     829             :         },
     830             :         {
     831             :                 "rpcd_witness_registration_update_decode",
     832             :                 sizeof(struct rpcd_witness_registration_update_decode),
     833             :                 (ndr_push_flags_fn_t) ndr_push_rpcd_witness_registration_update_decode,
     834             :                 (ndr_pull_flags_fn_t) ndr_pull_rpcd_witness_registration_update_decode,
     835             :                 (ndr_print_function_t) ndr_print_rpcd_witness_registration_update_decode,
     836             :                 { 0, NULL },
     837             :                 { 0, NULL },
     838             :         },
     839             :         { .name = NULL }
     840             : };
     841             : 
     842             : static const char * const rpcd_witness_endpoint_strings[] = {
     843             :         "ncacn_np:[\\pipe\\rpcd_witness]", 
     844             : };
     845             : 
     846             : static const struct ndr_interface_string_array rpcd_witness_endpoints = {
     847             :         .count  = 1,
     848             :         .names  = rpcd_witness_endpoint_strings
     849             : };
     850             : 
     851             : static const char * const rpcd_witness_authservice_strings[] = {
     852             :         "host", 
     853             : };
     854             : 
     855             : static const struct ndr_interface_string_array rpcd_witness_authservices = {
     856             :         .count  = 1,
     857             :         .names  = rpcd_witness_authservice_strings
     858             : };
     859             : 
     860             : 
     861             : const struct ndr_interface_table ndr_table_rpcd_witness = {
     862             :         .name           = "rpcd_witness",
     863             :         .syntax_id      = {
     864             :                 {0xd320d080,0xa007,0x11ee,{0x9c,0xb4},{0x37,0xfa,0x94,0x2d,0x84,0xd2}},
     865             :                 NDR_RPCD_WITNESS_VERSION
     866             :         },
     867             :         .helpstring     = NDR_RPCD_WITNESS_HELPSTRING,
     868             :         .num_calls      = 2,
     869             :         .calls          = rpcd_witness_calls,
     870             :         .num_public_structs     = 2,
     871             :         .public_structs         = rpcd_witness_public_structs,
     872             :         .endpoints      = &rpcd_witness_endpoints,
     873             :         .authservices   = &rpcd_witness_authservices
     874             : };
     875             : 
     876             : #endif /* SKIP_NDR_TABLE_rpcd_witness */

Generated by: LCOV version 1.14