LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_nbt.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 1427 2777 51.4 %
Date: 2021-09-23 10:06:22 Functions: 93 176 52.8 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_nbt.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_misc.h"
       7             : #include "librpc/gen_ndr/ndr_security.h"
       8       11771 : static enum ndr_err_code ndr_push_nbt_operation(struct ndr_push *ndr, int ndr_flags, uint16_t r)
       9             : {
      10       11861 :         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
      11       11771 :         return NDR_ERR_SUCCESS;
      12             : }
      13             : 
      14       13092 : static enum ndr_err_code ndr_pull_nbt_operation(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
      15             : {
      16             :         uint16_t v;
      17       13223 :         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
      18       13223 :         *r = v;
      19       13092 :         return NDR_ERR_SUCCESS;
      20             : }
      21             : 
      22           0 : _PUBLIC_ void ndr_print_nbt_operation(struct ndr_print *ndr, const char *name, uint16_t r)
      23             : {
      24           0 :         ndr_print_uint16(ndr, name, r);
      25           0 :         ndr->depth++;
      26           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_RCODE", NBT_RCODE, r);
      27           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_BROADCAST", NBT_FLAG_BROADCAST, r);
      28           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_RECURSION_AVAIL", NBT_FLAG_RECURSION_AVAIL, r);
      29           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_RECURSION_DESIRED", NBT_FLAG_RECURSION_DESIRED, r);
      30           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_TRUNCATION", NBT_FLAG_TRUNCATION, r);
      31           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_AUTHORITATIVE", NBT_FLAG_AUTHORITATIVE, r);
      32           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_OPCODE", NBT_OPCODE, r);
      33           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_FLAG_REPLY", NBT_FLAG_REPLY, r);
      34           0 :         ndr->depth--;
      35           0 : }
      36             : 
      37         239 : static enum ndr_err_code ndr_push_nbt_name_type(struct ndr_push *ndr, int ndr_flags, enum nbt_name_type r)
      38             : {
      39         239 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
      40         239 :         return NDR_ERR_SUCCESS;
      41             : }
      42             : 
      43          12 : static enum ndr_err_code ndr_pull_nbt_name_type(struct ndr_pull *ndr, int ndr_flags, enum nbt_name_type *r)
      44             : {
      45             :         uint8_t v;
      46          12 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
      47          12 :         *r = v;
      48          12 :         return NDR_ERR_SUCCESS;
      49             : }
      50             : 
      51           0 : _PUBLIC_ void ndr_print_nbt_name_type(struct ndr_print *ndr, const char *name, enum nbt_name_type r)
      52             : {
      53           0 :         const char *val = NULL;
      54             : 
      55           0 :         switch (r) {
      56           0 :                 case NBT_NAME_CLIENT: val = "NBT_NAME_CLIENT"; break;
      57           0 :                 case NBT_NAME_MS: val = "NBT_NAME_MS"; break;
      58           0 :                 case NBT_NAME_USER: val = "NBT_NAME_USER"; break;
      59           0 :                 case NBT_NAME_SERVER: val = "NBT_NAME_SERVER"; break;
      60           0 :                 case NBT_NAME_PDC: val = "NBT_NAME_PDC"; break;
      61           0 :                 case NBT_NAME_LOGON: val = "NBT_NAME_LOGON"; break;
      62           0 :                 case NBT_NAME_MASTER: val = "NBT_NAME_MASTER"; break;
      63           0 :                 case NBT_NAME_BROWSER: val = "NBT_NAME_BROWSER"; break;
      64             :         }
      65           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
      66           0 : }
      67             : 
      68           0 : static void ndr_print_flags_nbt_name(struct ndr_print *ndr, const char *name, int unused, const struct nbt_name *r)
      69             : {
      70           0 :         ndr_print_nbt_name(ndr, name, r);
      71           0 : }
      72             : 
      73           0 : _PUBLIC_ void ndr_print_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r)
      74             : {
      75           0 :         ndr_print_struct(ndr, name, "nbt_name");
      76           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
      77           0 :         ndr->depth++;
      78           0 :         ndr_print_string(ndr, "name", r->name);
      79           0 :         ndr_print_string(ndr, "scope", r->scope);
      80           0 :         ndr_print_nbt_name_type(ndr, "type", r->type);
      81           0 :         ndr->depth--;
      82             : }
      83             : 
      84       13446 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_qclass(struct ndr_push *ndr, int ndr_flags, enum nbt_qclass r)
      85             : {
      86       13446 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
      87       13446 :         return NDR_ERR_SUCCESS;
      88             : }
      89             : 
      90       18165 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_qclass(struct ndr_pull *ndr, int ndr_flags, enum nbt_qclass *r)
      91             : {
      92             :         uint16_t v;
      93       18165 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
      94       18165 :         *r = v;
      95       18165 :         return NDR_ERR_SUCCESS;
      96             : }
      97             : 
      98           0 : _PUBLIC_ void ndr_print_nbt_qclass(struct ndr_print *ndr, const char *name, enum nbt_qclass r)
      99             : {
     100           0 :         const char *val = NULL;
     101             : 
     102           0 :         switch (r) {
     103           0 :                 case NBT_QCLASS_IP: val = "NBT_QCLASS_IP"; break;
     104             :         }
     105           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     106           0 : }
     107             : 
     108       13446 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_qtype(struct ndr_push *ndr, int ndr_flags, enum nbt_qtype r)
     109             : {
     110       13446 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
     111       13446 :         return NDR_ERR_SUCCESS;
     112             : }
     113             : 
     114       18165 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_qtype(struct ndr_pull *ndr, int ndr_flags, enum nbt_qtype *r)
     115             : {
     116             :         uint16_t v;
     117       18165 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
     118       18165 :         *r = v;
     119       18165 :         return NDR_ERR_SUCCESS;
     120             : }
     121             : 
     122           0 : _PUBLIC_ void ndr_print_nbt_qtype(struct ndr_print *ndr, const char *name, enum nbt_qtype r)
     123             : {
     124           0 :         const char *val = NULL;
     125             : 
     126           0 :         switch (r) {
     127           0 :                 case NBT_QTYPE_ADDRESS: val = "NBT_QTYPE_ADDRESS"; break;
     128           0 :                 case NBT_QTYPE_NAMESERVICE: val = "NBT_QTYPE_NAMESERVICE"; break;
     129           0 :                 case NBT_QTYPE_NULL: val = "NBT_QTYPE_NULL"; break;
     130           0 :                 case NBT_QTYPE_NETBIOS: val = "NBT_QTYPE_NETBIOS"; break;
     131           0 :                 case NBT_QTYPE_STATUS: val = "NBT_QTYPE_STATUS"; break;
     132             :         }
     133           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     134           0 : }
     135             : 
     136       10066 : static enum ndr_err_code ndr_push_nbt_name_question(struct ndr_push *ndr, int ndr_flags, const struct nbt_name_question *r)
     137             : {
     138       10066 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     139       10066 :         if (ndr_flags & NDR_SCALARS) {
     140       10066 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     141       10066 :                 NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->name));
     142       10066 :                 NDR_CHECK(ndr_push_nbt_qtype(ndr, NDR_SCALARS, r->question_type));
     143       10066 :                 NDR_CHECK(ndr_push_nbt_qclass(ndr, NDR_SCALARS, r->question_class));
     144       10066 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     145             :         }
     146       10001 :         if (ndr_flags & NDR_BUFFERS) {
     147             :         }
     148       10066 :         return NDR_ERR_SUCCESS;
     149             : }
     150             : 
     151       11689 : static enum ndr_err_code ndr_pull_nbt_name_question(struct ndr_pull *ndr, int ndr_flags, struct nbt_name_question *r)
     152             : {
     153       11689 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     154       11689 :         if (ndr_flags & NDR_SCALARS) {
     155       11689 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     156       11689 :                 NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->name));
     157       11689 :                 NDR_CHECK(ndr_pull_nbt_qtype(ndr, NDR_SCALARS, &r->question_type));
     158       11689 :                 NDR_CHECK(ndr_pull_nbt_qclass(ndr, NDR_SCALARS, &r->question_class));
     159       11689 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     160             :         }
     161       11583 :         if (ndr_flags & NDR_BUFFERS) {
     162             :         }
     163       11689 :         return NDR_ERR_SUCCESS;
     164             : }
     165             : 
     166           0 : _PUBLIC_ void ndr_print_nbt_name_question(struct ndr_print *ndr, const char *name, const struct nbt_name_question *r)
     167             : {
     168           0 :         ndr_print_struct(ndr, name, "nbt_name_question");
     169           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     170           0 :         ndr->depth++;
     171           0 :         ndr_print_nbt_name(ndr, "name", &r->name);
     172           0 :         ndr_print_nbt_qtype(ndr, "question_type", r->question_type);
     173           0 :         ndr_print_nbt_qclass(ndr, "question_class", r->question_class);
     174           0 :         ndr->depth--;
     175             : }
     176             : 
     177        3499 : static enum ndr_err_code ndr_push_nb_flags(struct ndr_push *ndr, int ndr_flags, uint16_t r)
     178             : {
     179        3559 :         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
     180        3499 :         return NDR_ERR_SUCCESS;
     181             : }
     182             : 
     183        6377 : static enum ndr_err_code ndr_pull_nb_flags(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
     184             : {
     185             :         uint16_t v;
     186        6468 :         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
     187        6468 :         *r = v;
     188        6377 :         return NDR_ERR_SUCCESS;
     189             : }
     190             : 
     191           0 : _PUBLIC_ void ndr_print_nb_flags(struct ndr_print *ndr, const char *name, uint16_t r)
     192             : {
     193           0 :         ndr_print_uint16(ndr, name, r);
     194           0 :         ndr->depth++;
     195           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_PERMANENT", NBT_NM_PERMANENT, r);
     196           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_ACTIVE", NBT_NM_ACTIVE, r);
     197           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_CONFLICT", NBT_NM_CONFLICT, r);
     198           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_DEREGISTER", NBT_NM_DEREGISTER, r);
     199           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_OWNER_TYPE", NBT_NM_OWNER_TYPE, r);
     200           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NBT_NM_GROUP", NBT_NM_GROUP, r);
     201           0 :         ndr->depth--;
     202           0 : }
     203             : 
     204        3320 : static enum ndr_err_code ndr_push_nbt_rdata_address(struct ndr_push *ndr, int ndr_flags, const struct nbt_rdata_address *r)
     205             : {
     206        3320 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     207        3320 :         if (ndr_flags & NDR_SCALARS) {
     208        3320 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     209        3380 :                 NDR_CHECK(ndr_push_nb_flags(ndr, NDR_SCALARS, r->nb_flags));
     210        3320 :                 NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipaddr));
     211        3320 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     212             :         }
     213        3260 :         if (ndr_flags & NDR_BUFFERS) {
     214             :         }
     215        3320 :         return NDR_ERR_SUCCESS;
     216             : }
     217             : 
     218        6456 : static enum ndr_err_code ndr_pull_nbt_rdata_address(struct ndr_pull *ndr, int ndr_flags, struct nbt_rdata_address *r)
     219             : {
     220        6456 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     221        6456 :         if (ndr_flags & NDR_SCALARS) {
     222        6456 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     223        6547 :                 NDR_CHECK(ndr_pull_nb_flags(ndr, NDR_SCALARS, &r->nb_flags));
     224        6456 :                 NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipaddr));
     225        6456 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     226             :         }
     227        6365 :         if (ndr_flags & NDR_BUFFERS) {
     228             :         }
     229        6456 :         return NDR_ERR_SUCCESS;
     230             : }
     231             : 
     232           0 : _PUBLIC_ void ndr_print_nbt_rdata_address(struct ndr_print *ndr, const char *name, const struct nbt_rdata_address *r)
     233             : {
     234           0 :         ndr_print_struct(ndr, name, "nbt_rdata_address");
     235           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     236           0 :         ndr->depth++;
     237           0 :         ndr_print_nb_flags(ndr, "nb_flags", r->nb_flags);
     238           0 :         ndr_print_ipv4address(ndr, "ipaddr", r->ipaddr);
     239           0 :         ndr->depth--;
     240             : }
     241             : 
     242        3290 : static enum ndr_err_code ndr_push_nbt_rdata_netbios(struct ndr_push *ndr, int ndr_flags, const struct nbt_rdata_netbios *r)
     243             : {
     244             :         uint32_t cntr_addresses_0;
     245        3290 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     246        3290 :         if (ndr_flags & NDR_SCALARS) {
     247        3290 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     248        3290 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
     249        6550 :                 for (cntr_addresses_0 = 0; cntr_addresses_0 < (r->length / 6); cntr_addresses_0++) {
     250        3320 :                         NDR_CHECK(ndr_push_nbt_rdata_address(ndr, NDR_SCALARS, &r->addresses[cntr_addresses_0]));
     251             :                 }
     252        3290 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     253             :         }
     254        3230 :         if (ndr_flags & NDR_BUFFERS) {
     255             :         }
     256        3290 :         return NDR_ERR_SUCCESS;
     257             : }
     258             : 
     259        6444 : static enum ndr_err_code ndr_pull_nbt_rdata_netbios(struct ndr_pull *ndr, int ndr_flags, struct nbt_rdata_netbios *r)
     260             : {
     261        6444 :         uint32_t size_addresses_0 = 0;
     262             :         uint32_t cntr_addresses_0;
     263        6444 :         TALLOC_CTX *_mem_save_addresses_0 = NULL;
     264        6444 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     265        6444 :         if (ndr_flags & NDR_SCALARS) {
     266        6444 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     267        6444 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     268        6444 :                 size_addresses_0 = r->length / 6;
     269        6444 :                 NDR_PULL_ALLOC_N(ndr, r->addresses, size_addresses_0);
     270        6444 :                 _mem_save_addresses_0 = NDR_PULL_GET_MEM_CTX(ndr);
     271        6444 :                 NDR_PULL_SET_MEM_CTX(ndr, r->addresses, 0);
     272       12900 :                 for (cntr_addresses_0 = 0; cntr_addresses_0 < (size_addresses_0); cntr_addresses_0++) {
     273        6456 :                         NDR_CHECK(ndr_pull_nbt_rdata_address(ndr, NDR_SCALARS, &r->addresses[cntr_addresses_0]));
     274             :                 }
     275        6444 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addresses_0, 0);
     276        6444 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     277             :         }
     278        6353 :         if (ndr_flags & NDR_BUFFERS) {
     279             :         }
     280        6444 :         return NDR_ERR_SUCCESS;
     281             : }
     282             : 
     283           0 : _PUBLIC_ void ndr_print_nbt_rdata_netbios(struct ndr_print *ndr, const char *name, const struct nbt_rdata_netbios *r)
     284             : {
     285             :         uint32_t cntr_addresses_0;
     286           0 :         ndr_print_struct(ndr, name, "nbt_rdata_netbios");
     287           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     288           0 :         ndr->depth++;
     289           0 :         ndr_print_uint16(ndr, "length", r->length);
     290           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "addresses", (int)r->length / 6);
     291           0 :         ndr->depth++;
     292           0 :         for (cntr_addresses_0 = 0; cntr_addresses_0 < (r->length / 6); cntr_addresses_0++) {
     293           0 :                 ndr_print_nbt_rdata_address(ndr, "addresses", &r->addresses[cntr_addresses_0]);
     294             :         }
     295           0 :         ndr->depth--;
     296           0 :         ndr->depth--;
     297             : }
     298             : 
     299          30 : static enum ndr_err_code ndr_push_nbt_statistics(struct ndr_push *ndr, int ndr_flags, const struct nbt_statistics *r)
     300             : {
     301          30 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     302          30 :         if (ndr_flags & NDR_SCALARS) {
     303          30 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     304          30 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unit_id, 6));
     305          30 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->jumpers));
     306          30 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->test_result));
     307          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->version_number));
     308          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->period_of_statistics));
     309          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_of_crcs));
     310          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_alignment_errors));
     311          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_of_collisions));
     312          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_send_aborts));
     313          30 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_good_sends));
     314          30 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_good_receives));
     315          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_retransmits));
     316          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_no_resource_conditions));
     317          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_free_command_blocks));
     318          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->total_number_command_blocks));
     319          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_total_number_command_blocks));
     320          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->number_pending_sessions));
     321          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_number_pending_sessions));
     322          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_total_sessions_possible));
     323          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->session_data_packet_size));
     324          30 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     325             :         }
     326          30 :         if (ndr_flags & NDR_BUFFERS) {
     327             :         }
     328          30 :         return NDR_ERR_SUCCESS;
     329             : }
     330             : 
     331           2 : static enum ndr_err_code ndr_pull_nbt_statistics(struct ndr_pull *ndr, int ndr_flags, struct nbt_statistics *r)
     332             : {
     333           2 :         uint32_t size_unit_id_0 = 0;
     334           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     335           2 :         if (ndr_flags & NDR_SCALARS) {
     336           2 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     337           2 :                 size_unit_id_0 = 6;
     338           2 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unit_id, size_unit_id_0));
     339           2 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->jumpers));
     340           2 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->test_result));
     341           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version_number));
     342           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->period_of_statistics));
     343           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_of_crcs));
     344           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_alignment_errors));
     345           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_of_collisions));
     346           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_send_aborts));
     347           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_good_sends));
     348           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_good_receives));
     349           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_retransmits));
     350           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_no_resource_conditions));
     351           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_free_command_blocks));
     352           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->total_number_command_blocks));
     353           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_total_number_command_blocks));
     354           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->number_pending_sessions));
     355           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_number_pending_sessions));
     356           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_total_sessions_possible));
     357           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->session_data_packet_size));
     358           2 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     359             :         }
     360           2 :         if (ndr_flags & NDR_BUFFERS) {
     361             :         }
     362           2 :         return NDR_ERR_SUCCESS;
     363             : }
     364             : 
     365           0 : _PUBLIC_ void ndr_print_nbt_statistics(struct ndr_print *ndr, const char *name, const struct nbt_statistics *r)
     366             : {
     367           0 :         ndr_print_struct(ndr, name, "nbt_statistics");
     368           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     369           0 :         ndr->depth++;
     370           0 :         ndr_print_array_uint8(ndr, "unit_id", r->unit_id, 6);
     371           0 :         ndr_print_uint8(ndr, "jumpers", r->jumpers);
     372           0 :         ndr_print_uint8(ndr, "test_result", r->test_result);
     373           0 :         ndr_print_uint16(ndr, "version_number", r->version_number);
     374           0 :         ndr_print_uint16(ndr, "period_of_statistics", r->period_of_statistics);
     375           0 :         ndr_print_uint16(ndr, "number_of_crcs", r->number_of_crcs);
     376           0 :         ndr_print_uint16(ndr, "number_alignment_errors", r->number_alignment_errors);
     377           0 :         ndr_print_uint16(ndr, "number_of_collisions", r->number_of_collisions);
     378           0 :         ndr_print_uint16(ndr, "number_send_aborts", r->number_send_aborts);
     379           0 :         ndr_print_uint32(ndr, "number_good_sends", r->number_good_sends);
     380           0 :         ndr_print_uint32(ndr, "number_good_receives", r->number_good_receives);
     381           0 :         ndr_print_uint16(ndr, "number_retransmits", r->number_retransmits);
     382           0 :         ndr_print_uint16(ndr, "number_no_resource_conditions", r->number_no_resource_conditions);
     383           0 :         ndr_print_uint16(ndr, "number_free_command_blocks", r->number_free_command_blocks);
     384           0 :         ndr_print_uint16(ndr, "total_number_command_blocks", r->total_number_command_blocks);
     385           0 :         ndr_print_uint16(ndr, "max_total_number_command_blocks", r->max_total_number_command_blocks);
     386           0 :         ndr_print_uint16(ndr, "number_pending_sessions", r->number_pending_sessions);
     387           0 :         ndr_print_uint16(ndr, "max_number_pending_sessions", r->max_number_pending_sessions);
     388           0 :         ndr_print_uint16(ndr, "max_total_sessions_possible", r->max_total_sessions_possible);
     389           0 :         ndr_print_uint16(ndr, "session_data_packet_size", r->session_data_packet_size);
     390           0 :         ndr->depth--;
     391             : }
     392             : 
     393         239 : static enum ndr_err_code ndr_push_nbt_status_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_status_name *r)
     394             : {
     395         239 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     396         239 :         if (ndr_flags & NDR_SCALARS) {
     397         239 :                 NDR_CHECK(ndr_push_align(ndr, 2));
     398         239 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, 15, sizeof(uint8_t), CH_DOS));
     399         239 :                 NDR_CHECK(ndr_push_nbt_name_type(ndr, NDR_SCALARS, r->type));
     400         239 :                 NDR_CHECK(ndr_push_nb_flags(ndr, NDR_SCALARS, r->nb_flags));
     401         239 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
     402             :         }
     403         239 :         if (ndr_flags & NDR_BUFFERS) {
     404             :         }
     405         239 :         return NDR_ERR_SUCCESS;
     406             : }
     407             : 
     408          12 : static enum ndr_err_code ndr_pull_nbt_status_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_status_name *r)
     409             : {
     410          12 :         uint32_t size_name_0 = 0;
     411          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     412          12 :         if (ndr_flags & NDR_SCALARS) {
     413          12 :                 NDR_CHECK(ndr_pull_align(ndr, 2));
     414          12 :                 size_name_0 = 15;
     415          12 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, size_name_0, sizeof(uint8_t), CH_DOS));
     416          12 :                 NDR_CHECK(ndr_pull_nbt_name_type(ndr, NDR_SCALARS, &r->type));
     417          12 :                 NDR_CHECK(ndr_pull_nb_flags(ndr, NDR_SCALARS, &r->nb_flags));
     418          12 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
     419             :         }
     420          12 :         if (ndr_flags & NDR_BUFFERS) {
     421             :         }
     422          12 :         return NDR_ERR_SUCCESS;
     423             : }
     424             : 
     425           0 : _PUBLIC_ void ndr_print_nbt_status_name(struct ndr_print *ndr, const char *name, const struct nbt_status_name *r)
     426             : {
     427           0 :         ndr_print_struct(ndr, name, "nbt_status_name");
     428           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     429           0 :         ndr->depth++;
     430           0 :         ndr_print_string(ndr, "name", r->name);
     431           0 :         ndr_print_nbt_name_type(ndr, "type", r->type);
     432           0 :         ndr_print_nb_flags(ndr, "nb_flags", r->nb_flags);
     433           0 :         ndr->depth--;
     434             : }
     435             : 
     436          30 : static enum ndr_err_code ndr_push_nbt_rdata_status(struct ndr_push *ndr, int ndr_flags, const struct nbt_rdata_status *r)
     437             : {
     438             :         uint32_t cntr_names_0;
     439          30 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     440          30 :         if (ndr_flags & NDR_SCALARS) {
     441          30 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     442          30 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_names * 18 + 47));
     443          30 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_names));
     444         269 :                 for (cntr_names_0 = 0; cntr_names_0 < (r->num_names); cntr_names_0++) {
     445         239 :                         NDR_CHECK(ndr_push_nbt_status_name(ndr, NDR_SCALARS, &r->names[cntr_names_0]));
     446             :                 }
     447          30 :                 NDR_CHECK(ndr_push_nbt_statistics(ndr, NDR_SCALARS, &r->statistics));
     448          30 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     449             :         }
     450          30 :         if (ndr_flags & NDR_BUFFERS) {
     451             :         }
     452          30 :         return NDR_ERR_SUCCESS;
     453             : }
     454             : 
     455           2 : static enum ndr_err_code ndr_pull_nbt_rdata_status(struct ndr_pull *ndr, int ndr_flags, struct nbt_rdata_status *r)
     456             : {
     457           2 :         uint32_t size_names_0 = 0;
     458             :         uint32_t cntr_names_0;
     459           2 :         TALLOC_CTX *_mem_save_names_0 = NULL;
     460           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     461           2 :         if (ndr_flags & NDR_SCALARS) {
     462           2 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     463           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     464           2 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_names));
     465           2 :                 size_names_0 = r->num_names;
     466           2 :                 NDR_PULL_ALLOC_N(ndr, r->names, size_names_0);
     467           2 :                 _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
     468           2 :                 NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
     469          14 :                 for (cntr_names_0 = 0; cntr_names_0 < (size_names_0); cntr_names_0++) {
     470          12 :                         NDR_CHECK(ndr_pull_nbt_status_name(ndr, NDR_SCALARS, &r->names[cntr_names_0]));
     471             :                 }
     472           2 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
     473           2 :                 NDR_CHECK(ndr_pull_nbt_statistics(ndr, NDR_SCALARS, &r->statistics));
     474           2 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     475             :         }
     476           2 :         if (ndr_flags & NDR_BUFFERS) {
     477             :         }
     478           2 :         return NDR_ERR_SUCCESS;
     479             : }
     480             : 
     481           0 : _PUBLIC_ void ndr_print_nbt_rdata_status(struct ndr_print *ndr, const char *name, const struct nbt_rdata_status *r)
     482             : {
     483             :         uint32_t cntr_names_0;
     484           0 :         ndr_print_struct(ndr, name, "nbt_rdata_status");
     485           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     486           0 :         ndr->depth++;
     487           0 :         ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->num_names * 18 + 47:r->length);
     488           0 :         ndr_print_uint8(ndr, "num_names", r->num_names);
     489           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->num_names);
     490           0 :         ndr->depth++;
     491           0 :         for (cntr_names_0 = 0; cntr_names_0 < (r->num_names); cntr_names_0++) {
     492           0 :                 ndr_print_nbt_status_name(ndr, "names", &r->names[cntr_names_0]);
     493             :         }
     494           0 :         ndr->depth--;
     495           0 :         ndr_print_nbt_statistics(ndr, "statistics", &r->statistics);
     496           0 :         ndr->depth--;
     497             : }
     498             : 
     499          60 : static enum ndr_err_code ndr_push_nbt_rdata_data(struct ndr_push *ndr, int ndr_flags, const struct nbt_rdata_data *r)
     500             : {
     501          60 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     502          60 :         if (ndr_flags & NDR_SCALARS) {
     503          60 :                 NDR_CHECK(ndr_push_align(ndr, 2));
     504          60 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
     505          60 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
     506          60 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
     507             :         }
     508          60 :         if (ndr_flags & NDR_BUFFERS) {
     509             :         }
     510          60 :         return NDR_ERR_SUCCESS;
     511             : }
     512             : 
     513          30 : static enum ndr_err_code ndr_pull_nbt_rdata_data(struct ndr_pull *ndr, int ndr_flags, struct nbt_rdata_data *r)
     514             : {
     515          30 :         uint32_t size_data_0 = 0;
     516          30 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     517          30 :         if (ndr_flags & NDR_SCALARS) {
     518          30 :                 NDR_CHECK(ndr_pull_align(ndr, 2));
     519          30 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
     520          30 :                 size_data_0 = r->length;
     521          30 :                 NDR_PULL_ALLOC_N(ndr, r->data, size_data_0);
     522          30 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
     523          30 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
     524             :         }
     525          30 :         if (ndr_flags & NDR_BUFFERS) {
     526             :         }
     527          30 :         return NDR_ERR_SUCCESS;
     528             : }
     529             : 
     530           0 : _PUBLIC_ void ndr_print_nbt_rdata_data(struct ndr_print *ndr, const char *name, const struct nbt_rdata_data *r)
     531             : {
     532           0 :         ndr_print_struct(ndr, name, "nbt_rdata_data");
     533           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     534           0 :         ndr->depth++;
     535           0 :         ndr_print_uint16(ndr, "length", r->length);
     536           0 :         ndr_print_array_uint8(ndr, "data", r->data, r->length);
     537           0 :         ndr->depth--;
     538             : }
     539             : 
     540        3380 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_rdata(struct ndr_push *ndr, int ndr_flags, const union nbt_rdata *r)
     541             : {
     542             :         uint32_t level;
     543        3380 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     544        3380 :         if (ndr_flags & NDR_SCALARS) {
     545             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     546        3380 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     547        3380 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
     548        3380 :                 switch (level) {
     549        3290 :                         case NBT_QTYPE_NETBIOS: {
     550        3290 :                                 NDR_CHECK(ndr_push_nbt_rdata_netbios(ndr, NDR_SCALARS, &r->netbios));
     551        3230 :                         break; }
     552             : 
     553          30 :                         case NBT_QTYPE_STATUS: {
     554          30 :                                 NDR_CHECK(ndr_push_nbt_rdata_status(ndr, NDR_SCALARS, &r->status));
     555          30 :                         break; }
     556             : 
     557          60 :                         default: {
     558          60 :                                 NDR_CHECK(ndr_push_nbt_rdata_data(ndr, NDR_SCALARS, &r->data));
     559          60 :                         break; }
     560             : 
     561             :                 }
     562           0 :         }
     563        3320 :         return NDR_ERR_SUCCESS;
     564             : }
     565             : 
     566        6476 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_rdata(struct ndr_pull *ndr, int ndr_flags, union nbt_rdata *r)
     567             : {
     568             :         uint32_t level;
     569        6476 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     570        6476 :         if (ndr_flags & NDR_SCALARS) {
     571             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     572        6476 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     573        6476 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
     574        6476 :                 switch (level) {
     575        6444 :                         case NBT_QTYPE_NETBIOS: {
     576        6444 :                                 NDR_CHECK(ndr_pull_nbt_rdata_netbios(ndr, NDR_SCALARS, &r->netbios));
     577        6353 :                         break; }
     578             : 
     579           2 :                         case NBT_QTYPE_STATUS: {
     580           2 :                                 NDR_CHECK(ndr_pull_nbt_rdata_status(ndr, NDR_SCALARS, &r->status));
     581           2 :                         break; }
     582             : 
     583          30 :                         default: {
     584          30 :                                 NDR_CHECK(ndr_pull_nbt_rdata_data(ndr, NDR_SCALARS, &r->data));
     585          30 :                         break; }
     586             : 
     587             :                 }
     588           0 :         }
     589        6385 :         return NDR_ERR_SUCCESS;
     590             : }
     591             : 
     592           0 : _PUBLIC_ void ndr_print_nbt_rdata(struct ndr_print *ndr, const char *name, const union nbt_rdata *r)
     593             : {
     594             :         uint32_t level;
     595           0 :         level = ndr_print_steal_switch_value(ndr, r);
     596           0 :         ndr_print_union(ndr, name, level, "nbt_rdata");
     597           0 :         switch (level) {
     598           0 :                 case NBT_QTYPE_NETBIOS:
     599           0 :                         ndr_print_nbt_rdata_netbios(ndr, "netbios", &r->netbios);
     600           0 :                 break;
     601             : 
     602           0 :                 case NBT_QTYPE_STATUS:
     603           0 :                         ndr_print_nbt_rdata_status(ndr, "status", &r->status);
     604           0 :                 break;
     605             : 
     606           0 :                 default:
     607           0 :                         ndr_print_nbt_rdata_data(ndr, "data", &r->data);
     608           0 :                 break;
     609             : 
     610             :         }
     611           0 : }
     612             : 
     613        6476 : static enum ndr_err_code ndr_pull_nbt_res_rec(struct ndr_pull *ndr, int ndr_flags, struct nbt_res_rec *r)
     614             : {
     615             :         {
     616        6476 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     617        6476 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     618        6476 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     619        6476 :                 if (ndr_flags & NDR_SCALARS) {
     620        6476 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
     621        6476 :                         NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->name));
     622        6476 :                         NDR_CHECK(ndr_pull_nbt_qtype(ndr, NDR_SCALARS, &r->rr_type));
     623        6476 :                         NDR_CHECK(ndr_pull_nbt_qclass(ndr, NDR_SCALARS, &r->rr_class));
     624        6476 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ttl));
     625        6476 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->rdata, r->rr_type));
     626        6476 :                         NDR_CHECK(ndr_pull_nbt_rdata(ndr, NDR_SCALARS, &r->rdata));
     627        6476 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     628             :                 }
     629        6385 :                 if (ndr_flags & NDR_BUFFERS) {
     630             :                 }
     631        6476 :                 ndr->flags = _flags_save_STRUCT;
     632             :         }
     633        6476 :         return NDR_ERR_SUCCESS;
     634             : }
     635             : 
     636           0 : _PUBLIC_ void ndr_print_nbt_res_rec(struct ndr_print *ndr, const char *name, const struct nbt_res_rec *r)
     637             : {
     638           0 :         ndr_print_struct(ndr, name, "nbt_res_rec");
     639           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     640             :         {
     641           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     642           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     643           0 :                 ndr->depth++;
     644           0 :                 ndr_print_nbt_name(ndr, "name", &r->name);
     645           0 :                 ndr_print_nbt_qtype(ndr, "rr_type", r->rr_type);
     646           0 :                 ndr_print_nbt_qclass(ndr, "rr_class", r->rr_class);
     647           0 :                 ndr_print_uint32(ndr, "ttl", r->ttl);
     648           0 :                 ndr_print_set_switch_value(ndr, &r->rdata, r->rr_type);
     649           0 :                 ndr_print_nbt_rdata(ndr, "rdata", &r->rdata);
     650           0 :                 ndr->depth--;
     651           0 :                 ndr->flags = _flags_save_STRUCT;
     652             :         }
     653             : }
     654             : 
     655       11861 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_name_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_name_packet *r)
     656             : {
     657             :         uint32_t cntr_questions_0;
     658             :         uint32_t cntr_answers_0;
     659             :         uint32_t cntr_nsrecs_0;
     660             :         uint32_t cntr_additional_0;
     661             :         {
     662       11861 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     663       11861 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
     664       11861 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     665       11861 :                 if (ndr_flags & NDR_SCALARS) {
     666       11861 :                         NDR_CHECK(ndr_push_align(ndr, 4));
     667       11861 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->name_trn_id));
     668       11951 :                         NDR_CHECK(ndr_push_nbt_operation(ndr, NDR_SCALARS, r->operation));
     669       11861 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->qdcount));
     670       11861 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ancount));
     671       11861 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->nscount));
     672       11861 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->arcount));
     673       21837 :                         for (cntr_questions_0 = 0; cntr_questions_0 < (r->qdcount); cntr_questions_0++) {
     674       10066 :                                 NDR_CHECK(ndr_push_nbt_name_question(ndr, NDR_SCALARS, &r->questions[cntr_questions_0]));
     675             :                         }
     676       13562 :                         for (cntr_answers_0 = 0; cntr_answers_0 < (r->ancount); cntr_answers_0++) {
     677        1795 :                                 NDR_CHECK(ndr_push_nbt_res_rec(ndr, NDR_SCALARS, &r->answers[cntr_answers_0]));
     678             :                         }
     679       11767 :                         for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (r->nscount); cntr_nsrecs_0++) {
     680           0 :                                 NDR_CHECK(ndr_push_nbt_res_rec(ndr, NDR_SCALARS, &r->nsrecs[cntr_nsrecs_0]));
     681             :                         }
     682       13356 :                         for (cntr_additional_0 = 0; cntr_additional_0 < (r->arcount); cntr_additional_0++) {
     683        1589 :                                 NDR_CHECK(ndr_push_nbt_res_rec(ndr, NDR_SCALARS, &r->additional[cntr_additional_0]));
     684             :                         }
     685             :                         {
     686       11857 :                                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
     687       11857 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     688       11857 :                                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->padding));
     689       11857 :                                 ndr->flags = _flags_save_DATA_BLOB;
     690             :                         }
     691       11857 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     692             :                 }
     693       11767 :                 if (ndr_flags & NDR_BUFFERS) {
     694             :                 }
     695       11857 :                 ndr->flags = _flags_save_STRUCT;
     696             :         }
     697       11857 :         return NDR_ERR_SUCCESS;
     698             : }
     699             : 
     700       13223 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_name_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_name_packet *r)
     701             : {
     702       13223 :         uint32_t size_questions_0 = 0;
     703             :         uint32_t cntr_questions_0;
     704       13223 :         TALLOC_CTX *_mem_save_questions_0 = NULL;
     705       13223 :         uint32_t size_answers_0 = 0;
     706             :         uint32_t cntr_answers_0;
     707       13223 :         TALLOC_CTX *_mem_save_answers_0 = NULL;
     708       13223 :         uint32_t size_nsrecs_0 = 0;
     709             :         uint32_t cntr_nsrecs_0;
     710       13223 :         TALLOC_CTX *_mem_save_nsrecs_0 = NULL;
     711       13223 :         uint32_t size_additional_0 = 0;
     712             :         uint32_t cntr_additional_0;
     713       13223 :         TALLOC_CTX *_mem_save_additional_0 = NULL;
     714             :         {
     715       13223 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     716       13223 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
     717       13223 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     718       13223 :                 if (ndr_flags & NDR_SCALARS) {
     719       13223 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
     720       13223 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_trn_id));
     721       13354 :                         NDR_CHECK(ndr_pull_nbt_operation(ndr, NDR_SCALARS, &r->operation));
     722       13223 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->qdcount));
     723       13223 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ancount));
     724       13223 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->nscount));
     725       13223 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->arcount));
     726       13223 :                         size_questions_0 = r->qdcount;
     727       13223 :                         NDR_PULL_ALLOC_N(ndr, r->questions, size_questions_0);
     728       13223 :                         _mem_save_questions_0 = NDR_PULL_GET_MEM_CTX(ndr);
     729       13223 :                         NDR_PULL_SET_MEM_CTX(ndr, r->questions, 0);
     730       24912 :                         for (cntr_questions_0 = 0; cntr_questions_0 < (size_questions_0); cntr_questions_0++) {
     731       11689 :                                 NDR_CHECK(ndr_pull_nbt_name_question(ndr, NDR_SCALARS, &r->questions[cntr_questions_0]));
     732             :                         }
     733       13223 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_questions_0, 0);
     734       13223 :                         size_answers_0 = r->ancount;
     735       13223 :                         NDR_PULL_ALLOC_N(ndr, r->answers, size_answers_0);
     736       13223 :                         _mem_save_answers_0 = NDR_PULL_GET_MEM_CTX(ndr);
     737       13223 :                         NDR_PULL_SET_MEM_CTX(ndr, r->answers, 0);
     738       14757 :                         for (cntr_answers_0 = 0; cntr_answers_0 < (size_answers_0); cntr_answers_0++) {
     739        1534 :                                 NDR_CHECK(ndr_pull_nbt_res_rec(ndr, NDR_SCALARS, &r->answers[cntr_answers_0]));
     740             :                         }
     741       13223 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_answers_0, 0);
     742       13223 :                         size_nsrecs_0 = r->nscount;
     743       13223 :                         NDR_PULL_ALLOC_N(ndr, r->nsrecs, size_nsrecs_0);
     744       13223 :                         _mem_save_nsrecs_0 = NDR_PULL_GET_MEM_CTX(ndr);
     745       13223 :                         NDR_PULL_SET_MEM_CTX(ndr, r->nsrecs, 0);
     746       13223 :                         for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (size_nsrecs_0); cntr_nsrecs_0++) {
     747           0 :                                 NDR_CHECK(ndr_pull_nbt_res_rec(ndr, NDR_SCALARS, &r->nsrecs[cntr_nsrecs_0]));
     748             :                         }
     749       13223 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nsrecs_0, 0);
     750       13223 :                         size_additional_0 = r->arcount;
     751       13223 :                         NDR_PULL_ALLOC_N(ndr, r->additional, size_additional_0);
     752       13223 :                         _mem_save_additional_0 = NDR_PULL_GET_MEM_CTX(ndr);
     753       13223 :                         NDR_PULL_SET_MEM_CTX(ndr, r->additional, 0);
     754       18165 :                         for (cntr_additional_0 = 0; cntr_additional_0 < (size_additional_0); cntr_additional_0++) {
     755        4942 :                                 NDR_CHECK(ndr_pull_nbt_res_rec(ndr, NDR_SCALARS, &r->additional[cntr_additional_0]));
     756             :                         }
     757       13223 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_additional_0, 0);
     758             :                         {
     759       13223 :                                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
     760       13223 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     761       13223 :                                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->padding));
     762       13223 :                                 ndr->flags = _flags_save_DATA_BLOB;
     763             :                         }
     764       13223 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     765             :                 }
     766       13092 :                 if (ndr_flags & NDR_BUFFERS) {
     767             :                 }
     768       13223 :                 ndr->flags = _flags_save_STRUCT;
     769             :         }
     770       13223 :         return NDR_ERR_SUCCESS;
     771             : }
     772             : 
     773           0 : static void ndr_print_flags_nbt_name_packet(struct ndr_print *ndr, const char *name, int unused, const struct nbt_name_packet *r)
     774             : {
     775           0 :         ndr_print_nbt_name_packet(ndr, name, r);
     776           0 : }
     777             : 
     778           0 : _PUBLIC_ void ndr_print_nbt_name_packet(struct ndr_print *ndr, const char *name, const struct nbt_name_packet *r)
     779             : {
     780             :         uint32_t cntr_questions_0;
     781             :         uint32_t cntr_answers_0;
     782             :         uint32_t cntr_nsrecs_0;
     783             :         uint32_t cntr_additional_0;
     784           0 :         ndr_print_struct(ndr, name, "nbt_name_packet");
     785           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     786             :         {
     787           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     788           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
     789           0 :                 ndr->depth++;
     790           0 :                 ndr_print_uint16(ndr, "name_trn_id", r->name_trn_id);
     791           0 :                 ndr_print_nbt_operation(ndr, "operation", r->operation);
     792           0 :                 ndr_print_uint16(ndr, "qdcount", r->qdcount);
     793           0 :                 ndr_print_uint16(ndr, "ancount", r->ancount);
     794           0 :                 ndr_print_uint16(ndr, "nscount", r->nscount);
     795           0 :                 ndr_print_uint16(ndr, "arcount", r->arcount);
     796           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "questions", (int)r->qdcount);
     797           0 :                 ndr->depth++;
     798           0 :                 for (cntr_questions_0 = 0; cntr_questions_0 < (r->qdcount); cntr_questions_0++) {
     799           0 :                         ndr_print_nbt_name_question(ndr, "questions", &r->questions[cntr_questions_0]);
     800             :                 }
     801           0 :                 ndr->depth--;
     802           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "answers", (int)r->ancount);
     803           0 :                 ndr->depth++;
     804           0 :                 for (cntr_answers_0 = 0; cntr_answers_0 < (r->ancount); cntr_answers_0++) {
     805           0 :                         ndr_print_nbt_res_rec(ndr, "answers", &r->answers[cntr_answers_0]);
     806             :                 }
     807           0 :                 ndr->depth--;
     808           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "nsrecs", (int)r->nscount);
     809           0 :                 ndr->depth++;
     810           0 :                 for (cntr_nsrecs_0 = 0; cntr_nsrecs_0 < (r->nscount); cntr_nsrecs_0++) {
     811           0 :                         ndr_print_nbt_res_rec(ndr, "nsrecs", &r->nsrecs[cntr_nsrecs_0]);
     812             :                 }
     813           0 :                 ndr->depth--;
     814           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "additional", (int)r->arcount);
     815           0 :                 ndr->depth++;
     816           0 :                 for (cntr_additional_0 = 0; cntr_additional_0 < (r->arcount); cntr_additional_0++) {
     817           0 :                         ndr_print_nbt_res_rec(ndr, "additional", &r->additional[cntr_additional_0]);
     818             :                 }
     819           0 :                 ndr->depth--;
     820             :                 {
     821           0 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
     822           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     823           0 :                         ndr_print_DATA_BLOB(ndr, "padding", r->padding);
     824           0 :                         ndr->flags = _flags_save_DATA_BLOB;
     825             :                 }
     826           0 :                 ndr->depth--;
     827           0 :                 ndr->flags = _flags_save_STRUCT;
     828             :         }
     829             : }
     830             : 
     831          72 : static enum ndr_err_code ndr_push_dgram_msg_type(struct ndr_push *ndr, int ndr_flags, enum dgram_msg_type r)
     832             : {
     833          72 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
     834          72 :         return NDR_ERR_SUCCESS;
     835             : }
     836             : 
     837         599 : static enum ndr_err_code ndr_pull_dgram_msg_type(struct ndr_pull *ndr, int ndr_flags, enum dgram_msg_type *r)
     838             : {
     839             :         uint8_t v;
     840         599 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
     841         599 :         *r = v;
     842         599 :         return NDR_ERR_SUCCESS;
     843             : }
     844             : 
     845           0 : _PUBLIC_ void ndr_print_dgram_msg_type(struct ndr_print *ndr, const char *name, enum dgram_msg_type r)
     846             : {
     847           0 :         const char *val = NULL;
     848             : 
     849           0 :         switch (r) {
     850           0 :                 case DGRAM_DIRECT_UNIQUE: val = "DGRAM_DIRECT_UNIQUE"; break;
     851           0 :                 case DGRAM_DIRECT_GROUP: val = "DGRAM_DIRECT_GROUP"; break;
     852           0 :                 case DGRAM_BCAST: val = "DGRAM_BCAST"; break;
     853           0 :                 case DGRAM_ERROR: val = "DGRAM_ERROR"; break;
     854           0 :                 case DGRAM_QUERY: val = "DGRAM_QUERY"; break;
     855           0 :                 case DGRAM_QUERY_POSITIVE: val = "DGRAM_QUERY_POSITIVE"; break;
     856           0 :                 case DGRAM_QUERY_NEGATIVE: val = "DGRAM_QUERY_NEGATIVE"; break;
     857             :         }
     858           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     859           0 : }
     860             : 
     861          72 : static enum ndr_err_code ndr_push_dgram_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
     862             : {
     863          72 :         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
     864          72 :         return NDR_ERR_SUCCESS;
     865             : }
     866             : 
     867         599 : static enum ndr_err_code ndr_pull_dgram_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
     868             : {
     869             :         uint8_t v;
     870         599 :         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
     871         599 :         *r = v;
     872         599 :         return NDR_ERR_SUCCESS;
     873             : }
     874             : 
     875           0 : _PUBLIC_ void ndr_print_dgram_flags(struct ndr_print *ndr, const char *name, uint8_t r)
     876             : {
     877           0 :         ndr_print_uint8(ndr, name, r);
     878           0 :         ndr->depth++;
     879           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DGRAM_FLAG_MORE", DGRAM_FLAG_MORE, r);
     880           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DGRAM_FLAG_FIRST", DGRAM_FLAG_FIRST, r);
     881           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DGRAM_FLAG_NODE_TYPE", DGRAM_FLAG_NODE_TYPE, r);
     882           0 :         ndr->depth--;
     883           0 : }
     884             : 
     885          72 : static enum ndr_err_code ndr_push_smb_command(struct ndr_push *ndr, int ndr_flags, enum smb_command r)
     886             : {
     887          72 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
     888          72 :         return NDR_ERR_SUCCESS;
     889             : }
     890             : 
     891         602 : static enum ndr_err_code ndr_pull_smb_command(struct ndr_pull *ndr, int ndr_flags, enum smb_command *r)
     892             : {
     893             :         uint8_t v;
     894         602 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
     895         602 :         *r = v;
     896         602 :         return NDR_ERR_SUCCESS;
     897             : }
     898             : 
     899           0 : _PUBLIC_ void ndr_print_smb_command(struct ndr_print *ndr, const char *name, enum smb_command r)
     900             : {
     901           0 :         const char *val = NULL;
     902             : 
     903           0 :         switch (r) {
     904           0 :                 case SMB_TRANSACTION: val = "SMB_TRANSACTION"; break;
     905             :         }
     906           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     907           0 : }
     908             : 
     909          72 : static enum ndr_err_code ndr_push_smb_trans_body(struct ndr_push *ndr, int ndr_flags, const struct smb_trans_body *r)
     910             : {
     911          72 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     912          72 :         if (ndr_flags & NDR_SCALARS) {
     913          72 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     914          72 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 17));
     915          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->total_param_count));
     916          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->total_data_count));
     917          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_param_count));
     918          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_data_count));
     919          72 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->max_setup_count));
     920          72 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pad));
     921          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->trans_flags));
     922          72 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
     923          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
     924          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->param_count));
     925          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->param_offset));
     926          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->data_count));
     927          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->data_offset));
     928          72 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 3));
     929          72 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pad2));
     930          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->opcode));
     931          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->priority));
     932          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->_class));
     933          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->mailslot_name) + 1 + r->data.length));
     934             :                 {
     935          72 :                         uint32_t _flags_save_string = ndr->flags;
     936          72 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
     937          72 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name));
     938          72 :                         ndr->flags = _flags_save_string;
     939             :                 }
     940             :                 {
     941          72 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
     942          72 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     943          72 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
     944          72 :                         ndr->flags = _flags_save_DATA_BLOB;
     945             :                 }
     946          72 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     947             :         }
     948          72 :         if (ndr_flags & NDR_BUFFERS) {
     949             :         }
     950          72 :         return NDR_ERR_SUCCESS;
     951             : }
     952             : 
     953         602 : static enum ndr_err_code ndr_pull_smb_trans_body(struct ndr_pull *ndr, int ndr_flags, struct smb_trans_body *r)
     954             : {
     955         602 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     956         602 :         if (ndr_flags & NDR_SCALARS) {
     957         602 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     958         602 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->wct));
     959         602 :                 if (r->wct < 17 || r->wct > 17) {
     960           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
     961             :                 }
     962         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->total_param_count));
     963         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->total_data_count));
     964         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_param_count));
     965         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_data_count));
     966         602 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->max_setup_count));
     967         602 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pad));
     968         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->trans_flags));
     969         602 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
     970         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
     971         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->param_count));
     972         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->param_offset));
     973         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_count));
     974         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->data_offset));
     975         602 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->setup_count));
     976         602 :                 if (r->setup_count < 3 || r->setup_count > 3) {
     977           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
     978             :                 }
     979         602 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pad2));
     980         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->opcode));
     981         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->priority));
     982         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->_class));
     983         602 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->byte_count));
     984             :                 {
     985         602 :                         uint32_t _flags_save_string = ndr->flags;
     986         602 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
     987         602 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name));
     988         602 :                         ndr->flags = _flags_save_string;
     989             :                 }
     990             :                 {
     991         602 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
     992         602 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     993         602 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
     994         602 :                         ndr->flags = _flags_save_DATA_BLOB;
     995             :                 }
     996         602 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     997             :         }
     998         602 :         if (ndr_flags & NDR_BUFFERS) {
     999             :         }
    1000         602 :         return NDR_ERR_SUCCESS;
    1001             : }
    1002             : 
    1003           0 : _PUBLIC_ void ndr_print_smb_trans_body(struct ndr_print *ndr, const char *name, const struct smb_trans_body *r)
    1004             : {
    1005           0 :         ndr_print_struct(ndr, name, "smb_trans_body");
    1006           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1007           0 :         ndr->depth++;
    1008           0 :         ndr_print_uint8(ndr, "wct", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?17:r->wct);
    1009           0 :         ndr_print_uint16(ndr, "total_param_count", r->total_param_count);
    1010           0 :         ndr_print_uint16(ndr, "total_data_count", r->total_data_count);
    1011           0 :         ndr_print_uint16(ndr, "max_param_count", r->max_param_count);
    1012           0 :         ndr_print_uint16(ndr, "max_data_count", r->max_data_count);
    1013           0 :         ndr_print_uint8(ndr, "max_setup_count", r->max_setup_count);
    1014           0 :         ndr_print_uint8(ndr, "pad", r->pad);
    1015           0 :         ndr_print_uint16(ndr, "trans_flags", r->trans_flags);
    1016           0 :         ndr_print_uint32(ndr, "timeout", r->timeout);
    1017           0 :         ndr_print_uint16(ndr, "reserved", r->reserved);
    1018           0 :         ndr_print_uint16(ndr, "param_count", r->param_count);
    1019           0 :         ndr_print_uint16(ndr, "param_offset", r->param_offset);
    1020           0 :         ndr_print_uint16(ndr, "data_count", r->data_count);
    1021           0 :         ndr_print_uint16(ndr, "data_offset", r->data_offset);
    1022           0 :         ndr_print_uint8(ndr, "setup_count", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->setup_count);
    1023           0 :         ndr_print_uint8(ndr, "pad2", r->pad2);
    1024           0 :         ndr_print_uint16(ndr, "opcode", r->opcode);
    1025           0 :         ndr_print_uint16(ndr, "priority", r->priority);
    1026           0 :         ndr_print_uint16(ndr, "_class", r->_class);
    1027           0 :         ndr_print_uint16(ndr, "byte_count", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->mailslot_name) + 1 + r->data.length:r->byte_count);
    1028             :         {
    1029           0 :                 uint32_t _flags_save_string = ndr->flags;
    1030           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1031           0 :                 ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
    1032           0 :                 ndr->flags = _flags_save_string;
    1033             :         }
    1034             :         {
    1035           0 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    1036           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1037           0 :                 ndr_print_DATA_BLOB(ndr, "data", r->data);
    1038           0 :                 ndr->flags = _flags_save_DATA_BLOB;
    1039             :         }
    1040           0 :         ndr->depth--;
    1041             : }
    1042             : 
    1043          72 : static enum ndr_err_code ndr_push_smb_body(struct ndr_push *ndr, int ndr_flags, const union smb_body *r)
    1044             : {
    1045             :         uint32_t level;
    1046          72 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1047          72 :         if (ndr_flags & NDR_SCALARS) {
    1048             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1049          72 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1050          72 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    1051          72 :                 switch (level) {
    1052          72 :                         case SMB_TRANSACTION: {
    1053          72 :                                 NDR_CHECK(ndr_push_smb_trans_body(ndr, NDR_SCALARS, &r->trans));
    1054          72 :                         break; }
    1055             : 
    1056           0 :                         default:
    1057           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1058             :                 }
    1059           0 :         }
    1060          72 :         if (ndr_flags & NDR_BUFFERS) {
    1061           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1062             :                         /* We didn't get it above, and the token is not needed after this. */
    1063           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1064             :                 }
    1065           0 :                 switch (level) {
    1066           0 :                         case SMB_TRANSACTION:
    1067           0 :                         break;
    1068             : 
    1069           0 :                         default:
    1070           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1071             :                 }
    1072          52 :         }
    1073          72 :         return NDR_ERR_SUCCESS;
    1074             : }
    1075             : 
    1076         602 : static enum ndr_err_code ndr_pull_smb_body(struct ndr_pull *ndr, int ndr_flags, union smb_body *r)
    1077             : {
    1078             :         uint32_t level;
    1079         602 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1080         602 :         if (ndr_flags & NDR_SCALARS) {
    1081             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1082         602 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1083         602 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    1084         602 :                 switch (level) {
    1085         602 :                         case SMB_TRANSACTION: {
    1086         602 :                                 NDR_CHECK(ndr_pull_smb_trans_body(ndr, NDR_SCALARS, &r->trans));
    1087         602 :                         break; }
    1088             : 
    1089           0 :                         default:
    1090           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    1091             :                 }
    1092           0 :         }
    1093         602 :         if (ndr_flags & NDR_BUFFERS) {
    1094           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1095             :                         /* We didn't get it above, and the token is not needed after this. */
    1096           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1097             :                 }
    1098           0 :                 switch (level) {
    1099           0 :                         case SMB_TRANSACTION:
    1100           0 :                         break;
    1101             : 
    1102           0 :                         default:
    1103           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    1104             :                 }
    1105         321 :         }
    1106         602 :         return NDR_ERR_SUCCESS;
    1107             : }
    1108             : 
    1109           0 : _PUBLIC_ void ndr_print_smb_body(struct ndr_print *ndr, const char *name, const union smb_body *r)
    1110             : {
    1111             :         uint32_t level;
    1112           0 :         level = ndr_print_steal_switch_value(ndr, r);
    1113           0 :         ndr_print_union(ndr, name, level, "smb_body");
    1114           0 :         switch (level) {
    1115           0 :                 case SMB_TRANSACTION:
    1116           0 :                         ndr_print_smb_trans_body(ndr, "trans", &r->trans);
    1117           0 :                 break;
    1118             : 
    1119           0 :                 default:
    1120           0 :                         ndr_print_bad_level(ndr, name, level);
    1121             :         }
    1122           0 : }
    1123             : 
    1124          72 : _PUBLIC_ enum ndr_err_code ndr_push_dgram_smb_packet(struct ndr_push *ndr, int ndr_flags, const struct dgram_smb_packet *r)
    1125             : {
    1126             :         {
    1127          72 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1128          72 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_PRINT_ARRAY_HEX);
    1129          72 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1130          72 :                 if (ndr_flags & NDR_SCALARS) {
    1131          72 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    1132          72 :                         NDR_CHECK(ndr_push_smb_command(ndr, NDR_SCALARS, r->smb_command));
    1133          72 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->err_class));
    1134          72 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pad));
    1135          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->err_code));
    1136          72 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->flags));
    1137          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags2));
    1138          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->pid_high));
    1139          72 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->signature, 8));
    1140          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
    1141          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->tid));
    1142          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->pid));
    1143          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vuid));
    1144          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->mid));
    1145          72 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->body, r->smb_command));
    1146          72 :                         NDR_CHECK(ndr_push_smb_body(ndr, NDR_SCALARS, &r->body));
    1147          72 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1148             :                 }
    1149          72 :                 if (ndr_flags & NDR_BUFFERS) {
    1150             :                 }
    1151          72 :                 ndr->flags = _flags_save_STRUCT;
    1152             :         }
    1153          72 :         return NDR_ERR_SUCCESS;
    1154             : }
    1155             : 
    1156         602 : _PUBLIC_ enum ndr_err_code ndr_pull_dgram_smb_packet(struct ndr_pull *ndr, int ndr_flags, struct dgram_smb_packet *r)
    1157             : {
    1158         602 :         uint32_t size_signature_0 = 0;
    1159             :         {
    1160         602 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1161         602 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_PRINT_ARRAY_HEX);
    1162         602 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1163         602 :                 if (ndr_flags & NDR_SCALARS) {
    1164         602 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    1165         602 :                         NDR_CHECK(ndr_pull_smb_command(ndr, NDR_SCALARS, &r->smb_command));
    1166         602 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->err_class));
    1167         602 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pad));
    1168         602 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->err_code));
    1169         602 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->flags));
    1170         602 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags2));
    1171         602 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->pid_high));
    1172         602 :                         size_signature_0 = 8;
    1173         602 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->signature, size_signature_0));
    1174         602 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
    1175         602 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->tid));
    1176         602 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->pid));
    1177         602 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vuid));
    1178         602 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->mid));
    1179         602 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->body, r->smb_command));
    1180         602 :                         NDR_CHECK(ndr_pull_smb_body(ndr, NDR_SCALARS, &r->body));
    1181         602 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1182             :                 }
    1183         602 :                 if (ndr_flags & NDR_BUFFERS) {
    1184             :                 }
    1185         602 :                 ndr->flags = _flags_save_STRUCT;
    1186             :         }
    1187         602 :         return NDR_ERR_SUCCESS;
    1188             : }
    1189             : 
    1190           0 : static void ndr_print_flags_dgram_smb_packet(struct ndr_print *ndr, const char *name, int unused, const struct dgram_smb_packet *r)
    1191             : {
    1192           0 :         ndr_print_dgram_smb_packet(ndr, name, r);
    1193           0 : }
    1194             : 
    1195           0 : _PUBLIC_ void ndr_print_dgram_smb_packet(struct ndr_print *ndr, const char *name, const struct dgram_smb_packet *r)
    1196             : {
    1197           0 :         ndr_print_struct(ndr, name, "dgram_smb_packet");
    1198           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1199             :         {
    1200           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1201           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_PRINT_ARRAY_HEX);
    1202           0 :                 ndr->depth++;
    1203           0 :                 ndr_print_smb_command(ndr, "smb_command", r->smb_command);
    1204           0 :                 ndr_print_uint8(ndr, "err_class", r->err_class);
    1205           0 :                 ndr_print_uint8(ndr, "pad", r->pad);
    1206           0 :                 ndr_print_uint16(ndr, "err_code", r->err_code);
    1207           0 :                 ndr_print_uint8(ndr, "flags", r->flags);
    1208           0 :                 ndr_print_uint16(ndr, "flags2", r->flags2);
    1209           0 :                 ndr_print_uint16(ndr, "pid_high", r->pid_high);
    1210           0 :                 ndr_print_array_uint8(ndr, "signature", r->signature, 8);
    1211           0 :                 ndr_print_uint16(ndr, "reserved", r->reserved);
    1212           0 :                 ndr_print_uint16(ndr, "tid", r->tid);
    1213           0 :                 ndr_print_uint16(ndr, "pid", r->pid);
    1214           0 :                 ndr_print_uint16(ndr, "vuid", r->vuid);
    1215           0 :                 ndr_print_uint16(ndr, "mid", r->mid);
    1216           0 :                 ndr_print_set_switch_value(ndr, &r->body, r->smb_command);
    1217           0 :                 ndr_print_smb_body(ndr, "body", &r->body);
    1218           0 :                 ndr->depth--;
    1219           0 :                 ndr->flags = _flags_save_STRUCT;
    1220             :         }
    1221             : }
    1222             : 
    1223          72 : static enum ndr_err_code ndr_push_dgram_message_body(struct ndr_push *ndr, int ndr_flags, const union dgram_message_body *r)
    1224             : {
    1225             :         uint32_t level;
    1226          72 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1227          72 :         if (ndr_flags & NDR_SCALARS) {
    1228             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1229          72 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1230          72 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    1231          72 :                 switch (level) {
    1232          72 :                         case DGRAM_SMB: {
    1233          72 :                                 NDR_CHECK(ndr_push_dgram_smb_packet(ndr, NDR_SCALARS, &r->smb));
    1234          72 :                         break; }
    1235             : 
    1236           0 :                         default:
    1237           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1238             :                 }
    1239           0 :         }
    1240          72 :         if (ndr_flags & NDR_BUFFERS) {
    1241           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1242             :                         /* We didn't get it above, and the token is not needed after this. */
    1243           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1244             :                 }
    1245           0 :                 switch (level) {
    1246           0 :                         case DGRAM_SMB:
    1247           0 :                         break;
    1248             : 
    1249           0 :                         default:
    1250           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1251             :                 }
    1252          52 :         }
    1253          72 :         return NDR_ERR_SUCCESS;
    1254             : }
    1255             : 
    1256         599 : static enum ndr_err_code ndr_pull_dgram_message_body(struct ndr_pull *ndr, int ndr_flags, union dgram_message_body *r)
    1257             : {
    1258             :         uint32_t level;
    1259         599 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1260         599 :         if (ndr_flags & NDR_SCALARS) {
    1261             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1262         599 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1263         599 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    1264         599 :                 switch (level) {
    1265         599 :                         case DGRAM_SMB: {
    1266         599 :                                 NDR_CHECK(ndr_pull_dgram_smb_packet(ndr, NDR_SCALARS, &r->smb));
    1267         599 :                         break; }
    1268             : 
    1269           0 :                         default:
    1270           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    1271             :                 }
    1272           0 :         }
    1273         599 :         if (ndr_flags & NDR_BUFFERS) {
    1274           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1275             :                         /* We didn't get it above, and the token is not needed after this. */
    1276           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1277             :                 }
    1278           0 :                 switch (level) {
    1279           0 :                         case DGRAM_SMB:
    1280           0 :                         break;
    1281             : 
    1282           0 :                         default:
    1283           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    1284             :                 }
    1285         318 :         }
    1286         599 :         return NDR_ERR_SUCCESS;
    1287             : }
    1288             : 
    1289           0 : _PUBLIC_ void ndr_print_dgram_message_body(struct ndr_print *ndr, const char *name, const union dgram_message_body *r)
    1290             : {
    1291             :         uint32_t level;
    1292           0 :         level = ndr_print_steal_switch_value(ndr, r);
    1293           0 :         ndr_print_union(ndr, name, level, "dgram_message_body");
    1294           0 :         switch (level) {
    1295           0 :                 case DGRAM_SMB:
    1296           0 :                         ndr_print_dgram_smb_packet(ndr, "smb", &r->smb);
    1297           0 :                 break;
    1298             : 
    1299           0 :                 default:
    1300           0 :                         ndr_print_bad_level(ndr, name, level);
    1301             :         }
    1302           0 : }
    1303             : 
    1304          72 : static enum ndr_err_code ndr_push_dgram_message(struct ndr_push *ndr, int ndr_flags, const struct dgram_message *r)
    1305             : {
    1306          72 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1307          72 :         if (ndr_flags & NDR_SCALARS) {
    1308          72 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1309          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
    1310          72 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->offset));
    1311          72 :                 NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->source_name));
    1312          72 :                 NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
    1313          72 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dgram_body_type));
    1314          72 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->body, r->dgram_body_type));
    1315          72 :                 NDR_CHECK(ndr_push_dgram_message_body(ndr, NDR_SCALARS, &r->body));
    1316          72 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1317             :         }
    1318          72 :         if (ndr_flags & NDR_BUFFERS) {
    1319             :         }
    1320          72 :         return NDR_ERR_SUCCESS;
    1321             : }
    1322             : 
    1323         599 : static enum ndr_err_code ndr_pull_dgram_message(struct ndr_pull *ndr, int ndr_flags, struct dgram_message *r)
    1324             : {
    1325         599 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1326         599 :         if (ndr_flags & NDR_SCALARS) {
    1327         599 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1328         599 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
    1329         599 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->offset));
    1330         599 :                 NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->source_name));
    1331         599 :                 NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
    1332         599 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dgram_body_type));
    1333         599 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->body, r->dgram_body_type));
    1334         599 :                 NDR_CHECK(ndr_pull_dgram_message_body(ndr, NDR_SCALARS, &r->body));
    1335         599 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1336             :         }
    1337         599 :         if (ndr_flags & NDR_BUFFERS) {
    1338             :         }
    1339         599 :         return NDR_ERR_SUCCESS;
    1340             : }
    1341             : 
    1342           0 : _PUBLIC_ void ndr_print_dgram_message(struct ndr_print *ndr, const char *name, const struct dgram_message *r)
    1343             : {
    1344           0 :         ndr_print_struct(ndr, name, "dgram_message");
    1345           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1346           0 :         ndr->depth++;
    1347           0 :         ndr_print_uint16(ndr, "length", r->length);
    1348           0 :         ndr_print_uint16(ndr, "offset", r->offset);
    1349           0 :         ndr_print_nbt_name(ndr, "source_name", &r->source_name);
    1350           0 :         ndr_print_nbt_name(ndr, "dest_name", &r->dest_name);
    1351           0 :         ndr_print_uint32(ndr, "dgram_body_type", r->dgram_body_type);
    1352           0 :         ndr_print_set_switch_value(ndr, &r->body, r->dgram_body_type);
    1353           0 :         ndr_print_dgram_message_body(ndr, "body", &r->body);
    1354           0 :         ndr->depth--;
    1355             : }
    1356             : 
    1357           0 : static enum ndr_err_code ndr_push_dgram_err_code(struct ndr_push *ndr, int ndr_flags, enum dgram_err_code r)
    1358             : {
    1359           0 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
    1360           0 :         return NDR_ERR_SUCCESS;
    1361             : }
    1362             : 
    1363           0 : static enum ndr_err_code ndr_pull_dgram_err_code(struct ndr_pull *ndr, int ndr_flags, enum dgram_err_code *r)
    1364             : {
    1365             :         uint8_t v;
    1366           0 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
    1367           0 :         *r = v;
    1368           0 :         return NDR_ERR_SUCCESS;
    1369             : }
    1370             : 
    1371           0 : _PUBLIC_ void ndr_print_dgram_err_code(struct ndr_print *ndr, const char *name, enum dgram_err_code r)
    1372             : {
    1373           0 :         const char *val = NULL;
    1374             : 
    1375           0 :         switch (r) {
    1376           0 :                 case DGRAM_ERROR_NAME_NOT_PRESENT: val = "DGRAM_ERROR_NAME_NOT_PRESENT"; break;
    1377           0 :                 case DGRAM_ERROR_INVALID_SOURCE: val = "DGRAM_ERROR_INVALID_SOURCE"; break;
    1378           0 :                 case DGRAM_ERROR_INVALID_DEST: val = "DGRAM_ERROR_INVALID_DEST"; break;
    1379             :         }
    1380           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1381           0 : }
    1382             : 
    1383          72 : static enum ndr_err_code ndr_push_dgram_data(struct ndr_push *ndr, int ndr_flags, const union dgram_data *r)
    1384             : {
    1385             :         uint32_t level;
    1386          72 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1387          72 :         if (ndr_flags & NDR_SCALARS) {
    1388             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1389          72 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1390          72 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    1391          72 :                 switch (level) {
    1392          72 :                         case DGRAM_DIRECT_UNIQUE: {
    1393          72 :                                 NDR_CHECK(ndr_push_dgram_message(ndr, NDR_SCALARS, &r->msg));
    1394          72 :                         break; }
    1395             : 
    1396           0 :                         case DGRAM_DIRECT_GROUP: {
    1397           0 :                                 NDR_CHECK(ndr_push_dgram_message(ndr, NDR_SCALARS, &r->msg));
    1398           0 :                         break; }
    1399             : 
    1400           0 :                         case DGRAM_BCAST: {
    1401           0 :                                 NDR_CHECK(ndr_push_dgram_message(ndr, NDR_SCALARS, &r->msg));
    1402           0 :                         break; }
    1403             : 
    1404           0 :                         case DGRAM_ERROR: {
    1405           0 :                                 NDR_CHECK(ndr_push_dgram_err_code(ndr, NDR_SCALARS, r->error));
    1406           0 :                         break; }
    1407             : 
    1408           0 :                         case DGRAM_QUERY: {
    1409           0 :                                 NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
    1410           0 :                         break; }
    1411             : 
    1412           0 :                         case DGRAM_QUERY_POSITIVE: {
    1413           0 :                                 NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
    1414           0 :                         break; }
    1415             : 
    1416           0 :                         case DGRAM_QUERY_NEGATIVE: {
    1417           0 :                                 NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
    1418           0 :                         break; }
    1419             : 
    1420           0 :                         default:
    1421           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1422             :                 }
    1423           0 :         }
    1424          72 :         if (ndr_flags & NDR_BUFFERS) {
    1425           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1426             :                         /* We didn't get it above, and the token is not needed after this. */
    1427           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1428             :                 }
    1429           0 :                 switch (level) {
    1430           0 :                         case DGRAM_DIRECT_UNIQUE:
    1431           0 :                         break;
    1432             : 
    1433           0 :                         case DGRAM_DIRECT_GROUP:
    1434           0 :                         break;
    1435             : 
    1436           0 :                         case DGRAM_BCAST:
    1437           0 :                         break;
    1438             : 
    1439           0 :                         case DGRAM_ERROR:
    1440           0 :                         break;
    1441             : 
    1442           0 :                         case DGRAM_QUERY:
    1443           0 :                         break;
    1444             : 
    1445           0 :                         case DGRAM_QUERY_POSITIVE:
    1446           0 :                         break;
    1447             : 
    1448           0 :                         case DGRAM_QUERY_NEGATIVE:
    1449           0 :                         break;
    1450             : 
    1451           0 :                         default:
    1452           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1453             :                 }
    1454          52 :         }
    1455          72 :         return NDR_ERR_SUCCESS;
    1456             : }
    1457             : 
    1458         599 : static enum ndr_err_code ndr_pull_dgram_data(struct ndr_pull *ndr, int ndr_flags, union dgram_data *r)
    1459             : {
    1460             :         uint32_t level;
    1461         599 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1462         599 :         if (ndr_flags & NDR_SCALARS) {
    1463             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1464         599 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1465         599 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    1466         599 :                 switch (level) {
    1467          72 :                         case DGRAM_DIRECT_UNIQUE: {
    1468          72 :                                 NDR_CHECK(ndr_pull_dgram_message(ndr, NDR_SCALARS, &r->msg));
    1469          72 :                         break; }
    1470             : 
    1471         527 :                         case DGRAM_DIRECT_GROUP: {
    1472         527 :                                 NDR_CHECK(ndr_pull_dgram_message(ndr, NDR_SCALARS, &r->msg));
    1473         527 :                         break; }
    1474             : 
    1475           0 :                         case DGRAM_BCAST: {
    1476           0 :                                 NDR_CHECK(ndr_pull_dgram_message(ndr, NDR_SCALARS, &r->msg));
    1477           0 :                         break; }
    1478             : 
    1479           0 :                         case DGRAM_ERROR: {
    1480           0 :                                 NDR_CHECK(ndr_pull_dgram_err_code(ndr, NDR_SCALARS, &r->error));
    1481           0 :                         break; }
    1482             : 
    1483           0 :                         case DGRAM_QUERY: {
    1484           0 :                                 NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
    1485           0 :                         break; }
    1486             : 
    1487           0 :                         case DGRAM_QUERY_POSITIVE: {
    1488           0 :                                 NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
    1489           0 :                         break; }
    1490             : 
    1491           0 :                         case DGRAM_QUERY_NEGATIVE: {
    1492           0 :                                 NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->dest_name));
    1493           0 :                         break; }
    1494             : 
    1495           0 :                         default:
    1496           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    1497             :                 }
    1498           0 :         }
    1499         599 :         if (ndr_flags & NDR_BUFFERS) {
    1500           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1501             :                         /* We didn't get it above, and the token is not needed after this. */
    1502           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1503             :                 }
    1504           0 :                 switch (level) {
    1505           0 :                         case DGRAM_DIRECT_UNIQUE:
    1506           0 :                         break;
    1507             : 
    1508           0 :                         case DGRAM_DIRECT_GROUP:
    1509           0 :                         break;
    1510             : 
    1511           0 :                         case DGRAM_BCAST:
    1512           0 :                         break;
    1513             : 
    1514           0 :                         case DGRAM_ERROR:
    1515           0 :                         break;
    1516             : 
    1517           0 :                         case DGRAM_QUERY:
    1518           0 :                         break;
    1519             : 
    1520           0 :                         case DGRAM_QUERY_POSITIVE:
    1521           0 :                         break;
    1522             : 
    1523           0 :                         case DGRAM_QUERY_NEGATIVE:
    1524           0 :                         break;
    1525             : 
    1526           0 :                         default:
    1527           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    1528             :                 }
    1529         318 :         }
    1530         599 :         return NDR_ERR_SUCCESS;
    1531             : }
    1532             : 
    1533           0 : _PUBLIC_ void ndr_print_dgram_data(struct ndr_print *ndr, const char *name, const union dgram_data *r)
    1534             : {
    1535             :         uint32_t level;
    1536           0 :         level = ndr_print_steal_switch_value(ndr, r);
    1537           0 :         ndr_print_union(ndr, name, level, "dgram_data");
    1538           0 :         switch (level) {
    1539           0 :                 case DGRAM_DIRECT_UNIQUE:
    1540           0 :                         ndr_print_dgram_message(ndr, "msg", &r->msg);
    1541           0 :                 break;
    1542             : 
    1543           0 :                 case DGRAM_DIRECT_GROUP:
    1544           0 :                         ndr_print_dgram_message(ndr, "msg", &r->msg);
    1545           0 :                 break;
    1546             : 
    1547           0 :                 case DGRAM_BCAST:
    1548           0 :                         ndr_print_dgram_message(ndr, "msg", &r->msg);
    1549           0 :                 break;
    1550             : 
    1551           0 :                 case DGRAM_ERROR:
    1552           0 :                         ndr_print_dgram_err_code(ndr, "error", r->error);
    1553           0 :                 break;
    1554             : 
    1555           0 :                 case DGRAM_QUERY:
    1556           0 :                         ndr_print_nbt_name(ndr, "dest_name", &r->dest_name);
    1557           0 :                 break;
    1558             : 
    1559           0 :                 case DGRAM_QUERY_POSITIVE:
    1560           0 :                         ndr_print_nbt_name(ndr, "dest_name", &r->dest_name);
    1561           0 :                 break;
    1562             : 
    1563           0 :                 case DGRAM_QUERY_NEGATIVE:
    1564           0 :                         ndr_print_nbt_name(ndr, "dest_name", &r->dest_name);
    1565           0 :                 break;
    1566             : 
    1567           0 :                 default:
    1568           0 :                         ndr_print_bad_level(ndr, name, level);
    1569             :         }
    1570           0 : }
    1571             : 
    1572          72 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_dgram_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_dgram_packet *r)
    1573             : {
    1574             :         {
    1575          72 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1576          72 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
    1577          72 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1578          72 :                 if (ndr_flags & NDR_SCALARS) {
    1579          72 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    1580          72 :                         NDR_CHECK(ndr_push_dgram_msg_type(ndr, NDR_SCALARS, r->msg_type));
    1581          72 :                         NDR_CHECK(ndr_push_dgram_flags(ndr, NDR_SCALARS, r->flags));
    1582          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->dgram_id));
    1583          72 :                         NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->src_addr));
    1584          72 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->src_port));
    1585          72 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->data, r->msg_type));
    1586          72 :                         NDR_CHECK(ndr_push_dgram_data(ndr, NDR_SCALARS, &r->data));
    1587          72 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1588             :                 }
    1589          72 :                 if (ndr_flags & NDR_BUFFERS) {
    1590             :                 }
    1591          72 :                 ndr->flags = _flags_save_STRUCT;
    1592             :         }
    1593          72 :         return NDR_ERR_SUCCESS;
    1594             : }
    1595             : 
    1596         599 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_dgram_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_dgram_packet *r)
    1597             : {
    1598             :         {
    1599         599 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1600         599 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
    1601         599 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1602         599 :                 if (ndr_flags & NDR_SCALARS) {
    1603         599 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    1604         599 :                         NDR_CHECK(ndr_pull_dgram_msg_type(ndr, NDR_SCALARS, &r->msg_type));
    1605         599 :                         NDR_CHECK(ndr_pull_dgram_flags(ndr, NDR_SCALARS, &r->flags));
    1606         599 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->dgram_id));
    1607         599 :                         NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->src_addr));
    1608         599 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->src_port));
    1609         599 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->data, r->msg_type));
    1610         599 :                         NDR_CHECK(ndr_pull_dgram_data(ndr, NDR_SCALARS, &r->data));
    1611         599 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1612             :                 }
    1613         599 :                 if (ndr_flags & NDR_BUFFERS) {
    1614             :                 }
    1615         599 :                 ndr->flags = _flags_save_STRUCT;
    1616             :         }
    1617         599 :         return NDR_ERR_SUCCESS;
    1618             : }
    1619             : 
    1620           0 : static void ndr_print_flags_nbt_dgram_packet(struct ndr_print *ndr, const char *name, int unused, const struct nbt_dgram_packet *r)
    1621             : {
    1622           0 :         ndr_print_nbt_dgram_packet(ndr, name, r);
    1623           0 : }
    1624             : 
    1625           0 : _PUBLIC_ void ndr_print_nbt_dgram_packet(struct ndr_print *ndr, const char *name, const struct nbt_dgram_packet *r)
    1626             : {
    1627           0 :         ndr_print_struct(ndr, name, "nbt_dgram_packet");
    1628           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1629             :         {
    1630           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1631           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
    1632           0 :                 ndr->depth++;
    1633           0 :                 ndr_print_dgram_msg_type(ndr, "msg_type", r->msg_type);
    1634           0 :                 ndr_print_dgram_flags(ndr, "flags", r->flags);
    1635           0 :                 ndr_print_uint16(ndr, "dgram_id", r->dgram_id);
    1636           0 :                 ndr_print_ipv4address(ndr, "src_addr", r->src_addr);
    1637           0 :                 ndr_print_uint16(ndr, "src_port", r->src_port);
    1638           0 :                 ndr_print_set_switch_value(ndr, &r->data, r->msg_type);
    1639           0 :                 ndr_print_dgram_data(ndr, "data", &r->data);
    1640           0 :                 ndr->depth--;
    1641           0 :                 ndr->flags = _flags_save_STRUCT;
    1642             :         }
    1643             : }
    1644             : 
    1645        1240 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_sockaddr(struct ndr_push *ndr, int ndr_flags, const struct nbt_sockaddr *r)
    1646             : {
    1647        1240 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1648        1240 :         if (ndr_flags & NDR_SCALARS) {
    1649        1240 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1650        1240 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sockaddr_family));
    1651             :                 {
    1652        1240 :                         uint32_t _flags_save_ipv4address = ndr->flags;
    1653        1240 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
    1654        1240 :                         NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->pdc_ip));
    1655        1240 :                         ndr->flags = _flags_save_ipv4address;
    1656             :                 }
    1657             :                 {
    1658        1240 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    1659        1240 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1660        1240 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining));
    1661        1240 :                         ndr->flags = _flags_save_DATA_BLOB;
    1662             :                 }
    1663        1240 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1664             :         }
    1665        1240 :         if (ndr_flags & NDR_BUFFERS) {
    1666             :         }
    1667        1240 :         return NDR_ERR_SUCCESS;
    1668             : }
    1669             : 
    1670         286 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_sockaddr(struct ndr_pull *ndr, int ndr_flags, struct nbt_sockaddr *r)
    1671             : {
    1672         286 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1673         286 :         if (ndr_flags & NDR_SCALARS) {
    1674         286 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1675         286 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sockaddr_family));
    1676             :                 {
    1677         286 :                         uint32_t _flags_save_ipv4address = ndr->flags;
    1678         286 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
    1679         286 :                         NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->pdc_ip));
    1680         286 :                         ndr->flags = _flags_save_ipv4address;
    1681             :                 }
    1682             :                 {
    1683         286 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    1684         286 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1685         286 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining));
    1686         286 :                         ndr->flags = _flags_save_DATA_BLOB;
    1687             :                 }
    1688         286 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1689             :         }
    1690         286 :         if (ndr_flags & NDR_BUFFERS) {
    1691             :         }
    1692         286 :         return NDR_ERR_SUCCESS;
    1693             : }
    1694             : 
    1695           0 : static void ndr_print_flags_nbt_sockaddr(struct ndr_print *ndr, const char *name, int unused, const struct nbt_sockaddr *r)
    1696             : {
    1697           0 :         ndr_print_nbt_sockaddr(ndr, name, r);
    1698           0 : }
    1699             : 
    1700           6 : _PUBLIC_ void ndr_print_nbt_sockaddr(struct ndr_print *ndr, const char *name, const struct nbt_sockaddr *r)
    1701             : {
    1702           6 :         ndr_print_struct(ndr, name, "nbt_sockaddr");
    1703           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1704           6 :         ndr->depth++;
    1705           6 :         ndr_print_uint32(ndr, "sockaddr_family", r->sockaddr_family);
    1706             :         {
    1707           6 :                 uint32_t _flags_save_ipv4address = ndr->flags;
    1708           6 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
    1709           6 :                 ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip);
    1710           6 :                 ndr->flags = _flags_save_ipv4address;
    1711             :         }
    1712             :         {
    1713           6 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    1714           6 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1715           6 :                 ndr_print_DATA_BLOB(ndr, "remaining", r->remaining);
    1716           6 :                 ndr->flags = _flags_save_DATA_BLOB;
    1717             :         }
    1718           6 :         ndr->depth--;
    1719             : }
    1720             : 
    1721         930 : _PUBLIC_ size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, int flags)
    1722             : {
    1723         930 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_nbt_sockaddr);
    1724             : }
    1725             : 
    1726        2356 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_server_type(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    1727             : {
    1728        2356 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    1729        2356 :         return NDR_ERR_SUCCESS;
    1730             : }
    1731             : 
    1732        2133 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_server_type(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    1733             : {
    1734             :         uint32_t v;
    1735        2133 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    1736        2133 :         *r = v;
    1737        2133 :         return NDR_ERR_SUCCESS;
    1738             : }
    1739             : 
    1740           6 : _PUBLIC_ void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, uint32_t r)
    1741             : {
    1742           6 :         ndr_print_uint32(ndr, name, r);
    1743           6 :         ndr->depth++;
    1744           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_PDC", NBT_SERVER_PDC, r);
    1745           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_GC", NBT_SERVER_GC, r);
    1746           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_LDAP", NBT_SERVER_LDAP, r);
    1747           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_DS", NBT_SERVER_DS, r);
    1748           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_KDC", NBT_SERVER_KDC, r);
    1749           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_TIMESERV", NBT_SERVER_TIMESERV, r);
    1750           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_CLOSEST", NBT_SERVER_CLOSEST, r);
    1751           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_WRITABLE", NBT_SERVER_WRITABLE, r);
    1752           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_GOOD_TIMESERV", NBT_SERVER_GOOD_TIMESERV, r);
    1753           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_NDNC", NBT_SERVER_NDNC, r);
    1754           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_SELECT_SECRET_DOMAIN_6", NBT_SERVER_SELECT_SECRET_DOMAIN_6, r);
    1755           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_FULL_SECRET_DOMAIN_6", NBT_SERVER_FULL_SECRET_DOMAIN_6, r);
    1756           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_ADS_WEB_SERVICE", NBT_SERVER_ADS_WEB_SERVICE, r);
    1757           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_DS_8", NBT_SERVER_DS_8, r);
    1758           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_HAS_DNS_NAME", NBT_SERVER_HAS_DNS_NAME, r);
    1759           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_IS_DEFAULT_NC", NBT_SERVER_IS_DEFAULT_NC, r);
    1760           6 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NBT_SERVER_FOREST_ROOT", NBT_SERVER_FOREST_ROOT, r);
    1761           6 :         ndr->depth--;
    1762           6 : }
    1763             : 
    1764        2581 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_nt_version_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    1765             : {
    1766        2581 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    1767        2581 :         return NDR_ERR_SUCCESS;
    1768             : }
    1769             : 
    1770        2358 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_nt_version_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    1771             : {
    1772             :         uint32_t v;
    1773        2358 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    1774        2358 :         *r = v;
    1775        2358 :         return NDR_ERR_SUCCESS;
    1776             : }
    1777             : 
    1778          12 : _PUBLIC_ void ndr_print_netlogon_nt_version_flags(struct ndr_print *ndr, const char *name, uint32_t r)
    1779             : {
    1780          12 :         ndr_print_uint32(ndr, name, r);
    1781          12 :         ndr->depth++;
    1782          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_1", NETLOGON_NT_VERSION_1, r);
    1783          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5", NETLOGON_NT_VERSION_5, r);
    1784          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5EX", NETLOGON_NT_VERSION_5EX, r);
    1785          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_5EX_WITH_IP", NETLOGON_NT_VERSION_5EX_WITH_IP, r);
    1786          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_WITH_CLOSEST_SITE", NETLOGON_NT_VERSION_WITH_CLOSEST_SITE, r);
    1787          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_AVOID_NT4EMUL", NETLOGON_NT_VERSION_AVOID_NT4EMUL, r);
    1788          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_PDC", NETLOGON_NT_VERSION_PDC, r);
    1789          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_IP", NETLOGON_NT_VERSION_IP, r);
    1790          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_LOCAL", NETLOGON_NT_VERSION_LOCAL, r);
    1791          12 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NETLOGON_NT_VERSION_GC", NETLOGON_NT_VERSION_GC, r);
    1792          12 :         ndr->depth--;
    1793          12 : }
    1794             : 
    1795        2581 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_command(struct ndr_push *ndr, int ndr_flags, enum netlogon_command r)
    1796             : {
    1797        2581 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    1798        2581 :         return NDR_ERR_SUCCESS;
    1799             : }
    1800             : 
    1801        2362 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_command(struct ndr_pull *ndr, int ndr_flags, enum netlogon_command *r)
    1802             : {
    1803             :         uint16_t v;
    1804        2362 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    1805        2362 :         *r = v;
    1806        2362 :         return NDR_ERR_SUCCESS;
    1807             : }
    1808             : 
    1809          16 : _PUBLIC_ void ndr_print_netlogon_command(struct ndr_print *ndr, const char *name, enum netlogon_command r)
    1810             : {
    1811          16 :         const char *val = NULL;
    1812             : 
    1813          16 :         switch (r) {
    1814           2 :                 case LOGON_REQUEST: val = "LOGON_REQUEST"; break;
    1815           2 :                 case LOGON_RESPONSE2: val = "LOGON_RESPONSE2"; break;
    1816           4 :                 case LOGON_PRIMARY_QUERY: val = "LOGON_PRIMARY_QUERY"; break;
    1817           0 :                 case NETLOGON_ANNOUNCE_UAS: val = "NETLOGON_ANNOUNCE_UAS"; break;
    1818           0 :                 case NETLOGON_RESPONSE_FROM_PDC: val = "NETLOGON_RESPONSE_FROM_PDC"; break;
    1819           2 :                 case LOGON_SAM_LOGON_REQUEST: val = "LOGON_SAM_LOGON_REQUEST"; break;
    1820           0 :                 case LOGON_SAM_LOGON_RESPONSE: val = "LOGON_SAM_LOGON_RESPONSE"; break;
    1821           0 :                 case LOGON_SAM_LOGON_PAUSE_RESPONSE: val = "LOGON_SAM_LOGON_PAUSE_RESPONSE"; break;
    1822           0 :                 case LOGON_SAM_LOGON_USER_UNKNOWN: val = "LOGON_SAM_LOGON_USER_UNKNOWN"; break;
    1823           6 :                 case LOGON_SAM_LOGON_RESPONSE_EX: val = "LOGON_SAM_LOGON_RESPONSE_EX"; break;
    1824           0 :                 case LOGON_SAM_LOGON_PAUSE_RESPONSE_EX: val = "LOGON_SAM_LOGON_PAUSE_RESPONSE_EX"; break;
    1825           0 :                 case LOGON_SAM_LOGON_USER_UNKNOWN_EX: val = "LOGON_SAM_LOGON_USER_UNKNOWN_EX"; break;
    1826             :         }
    1827          16 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1828          16 : }
    1829             : 
    1830           2 : _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_REQUEST(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_REQUEST *r)
    1831             : {
    1832           2 :         ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_REQUEST");
    1833           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1834           2 :         ndr->depth++;
    1835           2 :         ndr_print_uint16(ndr, "request_count", r->request_count);
    1836             :         {
    1837           2 :                 uint32_t _flags_save_string = ndr->flags;
    1838           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1839           2 :                 ndr_print_string(ndr, "computer_name", r->computer_name);
    1840           2 :                 ndr->flags = _flags_save_string;
    1841             :         }
    1842             :         {
    1843           2 :                 uint32_t _flags_save_string = ndr->flags;
    1844           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1845           2 :                 ndr_print_string(ndr, "user_name", r->user_name);
    1846           2 :                 ndr->flags = _flags_save_string;
    1847             :         }
    1848             :         {
    1849           2 :                 uint32_t _flags_save_string = ndr->flags;
    1850           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1851           2 :                 ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
    1852           2 :                 ndr->flags = _flags_save_string;
    1853             :         }
    1854           2 :         ndr_print_uint32(ndr, "acct_control", r->acct_control);
    1855           2 :         ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
    1856             :         {
    1857           2 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    1858           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    1859           2 :                 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
    1860           2 :                 ndr->flags = _flags_save_DATA_BLOB;
    1861             :         }
    1862           2 :         ndr_print_dom_sid0(ndr, "sid", &r->sid);
    1863           2 :         ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
    1864           2 :         ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
    1865           2 :         ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
    1866           2 :         ndr->depth--;
    1867             : }
    1868             : 
    1869           0 : static enum ndr_err_code ndr_push_NETLOGON_LOGON_REQUEST(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_LOGON_REQUEST *r)
    1870             : {
    1871           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1872           0 :         if (ndr_flags & NDR_SCALARS) {
    1873           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1874             :                 {
    1875           0 :                         uint32_t _flags_save_string = ndr->flags;
    1876           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1877           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
    1878           0 :                         ndr->flags = _flags_save_string;
    1879             :                 }
    1880             :                 {
    1881           0 :                         uint32_t _flags_save_string = ndr->flags;
    1882           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1883           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
    1884           0 :                         ndr->flags = _flags_save_string;
    1885             :                 }
    1886             :                 {
    1887           0 :                         uint32_t _flags_save_string = ndr->flags;
    1888           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1889           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name));
    1890           0 :                         ndr->flags = _flags_save_string;
    1891             :                 }
    1892           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->request_count));
    1893           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
    1894           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
    1895           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1896             :         }
    1897           0 :         if (ndr_flags & NDR_BUFFERS) {
    1898             :         }
    1899           0 :         return NDR_ERR_SUCCESS;
    1900             : }
    1901             : 
    1902           2 : static enum ndr_err_code ndr_pull_NETLOGON_LOGON_REQUEST(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_LOGON_REQUEST *r)
    1903             : {
    1904           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1905           2 :         if (ndr_flags & NDR_SCALARS) {
    1906           2 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1907             :                 {
    1908           2 :                         uint32_t _flags_save_string = ndr->flags;
    1909           2 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1910           2 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
    1911           2 :                         ndr->flags = _flags_save_string;
    1912             :                 }
    1913             :                 {
    1914           2 :                         uint32_t _flags_save_string = ndr->flags;
    1915           2 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1916           2 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
    1917           2 :                         ndr->flags = _flags_save_string;
    1918             :                 }
    1919             :                 {
    1920           2 :                         uint32_t _flags_save_string = ndr->flags;
    1921           2 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1922           2 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name));
    1923           2 :                         ndr->flags = _flags_save_string;
    1924             :                 }
    1925           2 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->request_count));
    1926           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
    1927           2 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
    1928           2 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1929             :         }
    1930           0 :         if (ndr_flags & NDR_BUFFERS) {
    1931             :         }
    1932           2 :         return NDR_ERR_SUCCESS;
    1933             : }
    1934             : 
    1935           2 : _PUBLIC_ void ndr_print_NETLOGON_LOGON_REQUEST(struct ndr_print *ndr, const char *name, const struct NETLOGON_LOGON_REQUEST *r)
    1936             : {
    1937           2 :         ndr_print_struct(ndr, name, "NETLOGON_LOGON_REQUEST");
    1938           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1939           2 :         ndr->depth++;
    1940             :         {
    1941           2 :                 uint32_t _flags_save_string = ndr->flags;
    1942           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1943           2 :                 ndr_print_string(ndr, "computer_name", r->computer_name);
    1944           2 :                 ndr->flags = _flags_save_string;
    1945             :         }
    1946             :         {
    1947           2 :                 uint32_t _flags_save_string = ndr->flags;
    1948           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1949           2 :                 ndr_print_string(ndr, "user_name", r->user_name);
    1950           2 :                 ndr->flags = _flags_save_string;
    1951             :         }
    1952             :         {
    1953           2 :                 uint32_t _flags_save_string = ndr->flags;
    1954           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    1955           2 :                 ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
    1956           2 :                 ndr->flags = _flags_save_string;
    1957             :         }
    1958           2 :         ndr_print_uint8(ndr, "request_count", r->request_count);
    1959           2 :         ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
    1960           2 :         ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
    1961           2 :         ndr->depth--;
    1962             : }
    1963             : 
    1964         159 : _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r)
    1965             : {
    1966             :         {
    1967         159 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    1968         159 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    1969         159 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1970         159 :                 if (ndr_flags & NDR_SCALARS) {
    1971         159 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    1972         159 :                         NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
    1973             :                         {
    1974         159 :                                 uint32_t _flags_save_string = ndr->flags;
    1975         159 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1976         159 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
    1977         159 :                                 ndr->flags = _flags_save_string;
    1978             :                         }
    1979             :                         {
    1980         159 :                                 uint32_t _flags_save_string = ndr->flags;
    1981         159 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1982         159 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
    1983         159 :                                 ndr->flags = _flags_save_string;
    1984             :                         }
    1985             :                         {
    1986         159 :                                 uint32_t _flags_save_string = ndr->flags;
    1987         159 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1988         159 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
    1989         159 :                                 ndr->flags = _flags_save_string;
    1990             :                         }
    1991         159 :                         NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
    1992         159 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
    1993         159 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
    1994         159 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1995             :                 }
    1996         159 :                 if (ndr_flags & NDR_BUFFERS) {
    1997             :                 }
    1998         159 :                 ndr->flags = _flags_save_STRUCT;
    1999             :         }
    2000         159 :         return NDR_ERR_SUCCESS;
    2001             : }
    2002             : 
    2003         147 : _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r)
    2004             : {
    2005             :         {
    2006         147 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2007         147 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2008         147 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2009         147 :                 if (ndr_flags & NDR_SCALARS) {
    2010         147 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    2011         147 :                         NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
    2012             :                         {
    2013         147 :                                 uint32_t _flags_save_string = ndr->flags;
    2014         147 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2015         147 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
    2016         147 :                                 ndr->flags = _flags_save_string;
    2017             :                         }
    2018             :                         {
    2019         147 :                                 uint32_t _flags_save_string = ndr->flags;
    2020         147 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2021         147 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
    2022         147 :                                 ndr->flags = _flags_save_string;
    2023             :                         }
    2024             :                         {
    2025         147 :                                 uint32_t _flags_save_string = ndr->flags;
    2026         147 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2027         147 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
    2028         147 :                                 ndr->flags = _flags_save_string;
    2029             :                         }
    2030         147 :                         NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
    2031         147 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
    2032         147 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
    2033         147 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2034             :                 }
    2035         147 :                 if (ndr_flags & NDR_BUFFERS) {
    2036             :                 }
    2037         147 :                 ndr->flags = _flags_save_STRUCT;
    2038             :         }
    2039         147 :         return NDR_ERR_SUCCESS;
    2040             : }
    2041             : 
    2042           0 : static void ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_print *ndr, const char *name, int unused, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r)
    2043             : {
    2044           0 :         ndr_print_NETLOGON_SAM_LOGON_RESPONSE_NT40(ndr, name, r);
    2045           0 : }
    2046             : 
    2047           0 : _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r)
    2048             : {
    2049           0 :         ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE_NT40");
    2050           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2051             :         {
    2052           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2053           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2054           0 :                 ndr->depth++;
    2055           0 :                 ndr_print_netlogon_command(ndr, "command", r->command);
    2056             :                 {
    2057           0 :                         uint32_t _flags_save_string = ndr->flags;
    2058           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2059           0 :                         ndr_print_string(ndr, "pdc_name", r->pdc_name);
    2060           0 :                         ndr->flags = _flags_save_string;
    2061             :                 }
    2062             :                 {
    2063           0 :                         uint32_t _flags_save_string = ndr->flags;
    2064           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2065           0 :                         ndr_print_string(ndr, "user_name", r->user_name);
    2066           0 :                         ndr->flags = _flags_save_string;
    2067             :                 }
    2068             :                 {
    2069           0 :                         uint32_t _flags_save_string = ndr->flags;
    2070           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2071           0 :                         ndr_print_string(ndr, "domain_name", r->domain_name);
    2072           0 :                         ndr->flags = _flags_save_string;
    2073             :                 }
    2074           0 :                 ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
    2075           0 :                 ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
    2076           0 :                 ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
    2077           0 :                 ndr->depth--;
    2078           0 :                 ndr->flags = _flags_save_STRUCT;
    2079             :         }
    2080             : }
    2081             : 
    2082          73 : _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE *r)
    2083             : {
    2084             :         {
    2085          73 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2086          73 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2087          73 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2088          73 :                 if (ndr_flags & NDR_SCALARS) {
    2089          73 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    2090          73 :                         NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
    2091             :                         {
    2092          73 :                                 uint32_t _flags_save_string = ndr->flags;
    2093          73 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2094          73 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
    2095          73 :                                 ndr->flags = _flags_save_string;
    2096             :                         }
    2097             :                         {
    2098          73 :                                 uint32_t _flags_save_string = ndr->flags;
    2099          73 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2100          73 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
    2101          73 :                                 ndr->flags = _flags_save_string;
    2102             :                         }
    2103             :                         {
    2104          73 :                                 uint32_t _flags_save_string = ndr->flags;
    2105          73 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2106          73 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
    2107          73 :                                 ndr->flags = _flags_save_string;
    2108             :                         }
    2109          73 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid));
    2110          73 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->zero_uuid));
    2111          73 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest));
    2112          73 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain));
    2113          73 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name));
    2114          73 :                         NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->pdc_ip));
    2115          73 :                         NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type));
    2116          73 :                         NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
    2117          73 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
    2118          73 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
    2119          73 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2120             :                 }
    2121          73 :                 if (ndr_flags & NDR_BUFFERS) {
    2122             :                 }
    2123          73 :                 ndr->flags = _flags_save_STRUCT;
    2124             :         }
    2125          73 :         return NDR_ERR_SUCCESS;
    2126             : }
    2127             : 
    2128          73 : _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE *r)
    2129             : {
    2130             :         {
    2131          73 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2132          73 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2133          73 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2134          73 :                 if (ndr_flags & NDR_SCALARS) {
    2135          73 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    2136          73 :                         NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
    2137             :                         {
    2138          73 :                                 uint32_t _flags_save_string = ndr->flags;
    2139          73 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2140          73 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
    2141          73 :                                 ndr->flags = _flags_save_string;
    2142             :                         }
    2143             :                         {
    2144          73 :                                 uint32_t _flags_save_string = ndr->flags;
    2145          73 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2146          73 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
    2147          73 :                                 ndr->flags = _flags_save_string;
    2148             :                         }
    2149             :                         {
    2150          73 :                                 uint32_t _flags_save_string = ndr->flags;
    2151          73 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2152          73 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
    2153          73 :                                 ndr->flags = _flags_save_string;
    2154             :                         }
    2155          73 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid));
    2156          73 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->zero_uuid));
    2157          73 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest));
    2158          73 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain));
    2159          73 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name));
    2160          73 :                         NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->pdc_ip));
    2161          73 :                         NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type));
    2162          73 :                         NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
    2163          73 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
    2164          73 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
    2165          73 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2166             :                 }
    2167          73 :                 if (ndr_flags & NDR_BUFFERS) {
    2168             :                 }
    2169          73 :                 ndr->flags = _flags_save_STRUCT;
    2170             :         }
    2171          73 :         return NDR_ERR_SUCCESS;
    2172             : }
    2173             : 
    2174           0 : static void ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_print *ndr, const char *name, int unused, const struct NETLOGON_SAM_LOGON_RESPONSE *r)
    2175             : {
    2176           0 :         ndr_print_NETLOGON_SAM_LOGON_RESPONSE(ndr, name, r);
    2177           0 : }
    2178             : 
    2179           0 : _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE *r)
    2180             : {
    2181           0 :         ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE");
    2182           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2183             :         {
    2184           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2185           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2186           0 :                 ndr->depth++;
    2187           0 :                 ndr_print_netlogon_command(ndr, "command", r->command);
    2188             :                 {
    2189           0 :                         uint32_t _flags_save_string = ndr->flags;
    2190           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2191           0 :                         ndr_print_string(ndr, "pdc_name", r->pdc_name);
    2192           0 :                         ndr->flags = _flags_save_string;
    2193             :                 }
    2194             :                 {
    2195           0 :                         uint32_t _flags_save_string = ndr->flags;
    2196           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2197           0 :                         ndr_print_string(ndr, "user_name", r->user_name);
    2198           0 :                         ndr->flags = _flags_save_string;
    2199             :                 }
    2200             :                 {
    2201           0 :                         uint32_t _flags_save_string = ndr->flags;
    2202           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2203           0 :                         ndr_print_string(ndr, "domain_name", r->domain_name);
    2204           0 :                         ndr->flags = _flags_save_string;
    2205             :                 }
    2206           0 :                 ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid);
    2207           0 :                 ndr_print_GUID(ndr, "zero_uuid", &r->zero_uuid);
    2208           0 :                 ndr_print_nbt_string(ndr, "forest", r->forest);
    2209           0 :                 ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain);
    2210           0 :                 ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name);
    2211           0 :                 ndr_print_ipv4address(ndr, "pdc_ip", r->pdc_ip);
    2212           0 :                 ndr_print_nbt_server_type(ndr, "server_type", r->server_type);
    2213           0 :                 ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
    2214           0 :                 ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
    2215           0 :                 ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
    2216           0 :                 ndr->depth--;
    2217           0 :                 ndr->flags = _flags_save_STRUCT;
    2218             :         }
    2219             : }
    2220             : 
    2221          49 : _PUBLIC_ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r)
    2222             : {
    2223             :         {
    2224          49 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2225          49 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2226          49 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2227          49 :                 if (ndr_flags & NDR_SCALARS) {
    2228          49 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    2229          49 :                         NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
    2230          49 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->sbz));
    2231          49 :                         NDR_CHECK(ndr_push_nbt_server_type(ndr, NDR_SCALARS, r->server_type));
    2232          49 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_uuid));
    2233          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->forest));
    2234          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dns_domain));
    2235          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_dns_name));
    2236          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->domain_name));
    2237          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->pdc_name));
    2238          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->user_name));
    2239          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->server_site));
    2240          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->client_site));
    2241          49 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
    2242             :                         {
    2243             :                                 struct ndr_push *_ndr_sockaddr;
    2244          49 :                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
    2245          49 :                                 NDR_CHECK(ndr_push_nbt_sockaddr(_ndr_sockaddr, NDR_SCALARS, &r->sockaddr));
    2246          49 :                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sockaddr, 0, ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags)));
    2247             :                         }
    2248          49 :                         NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->next_closest_site));
    2249          49 :                         NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
    2250          49 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
    2251          49 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
    2252          49 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2253             :                 }
    2254          49 :                 if (ndr_flags & NDR_BUFFERS) {
    2255             :                 }
    2256          49 :                 ndr->flags = _flags_save_STRUCT;
    2257             :         }
    2258          49 :         return NDR_ERR_SUCCESS;
    2259             : }
    2260             : 
    2261          25 : _PUBLIC_ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_EX *r)
    2262             : {
    2263             :         {
    2264          25 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2265          25 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2266          25 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2267          25 :                 if (ndr_flags & NDR_SCALARS) {
    2268          25 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    2269          25 :                         NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
    2270          25 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->sbz));
    2271          25 :                         NDR_CHECK(ndr_pull_nbt_server_type(ndr, NDR_SCALARS, &r->server_type));
    2272          25 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_uuid));
    2273          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->forest));
    2274          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dns_domain));
    2275          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_dns_name));
    2276          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->domain_name));
    2277          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->pdc_name));
    2278          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->user_name));
    2279          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->server_site));
    2280          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->client_site));
    2281          25 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sockaddr_size));
    2282             :                         {
    2283             :                                 struct ndr_pull *_ndr_sockaddr;
    2284          25 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sockaddr, 0, r->sockaddr_size));
    2285          25 :                                 NDR_CHECK(ndr_pull_nbt_sockaddr(_ndr_sockaddr, NDR_SCALARS, &r->sockaddr));
    2286          25 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sockaddr, 0, r->sockaddr_size));
    2287             :                         }
    2288          25 :                         NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->next_closest_site));
    2289          25 :                         NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
    2290          25 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
    2291          25 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
    2292          25 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2293             :                 }
    2294          25 :                 if (ndr_flags & NDR_BUFFERS) {
    2295             :                 }
    2296          25 :                 ndr->flags = _flags_save_STRUCT;
    2297             :         }
    2298          25 :         return NDR_ERR_SUCCESS;
    2299             : }
    2300             : 
    2301           0 : static void ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_print *ndr, const char *name, int unused, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r)
    2302             : {
    2303           0 :         ndr_print_NETLOGON_SAM_LOGON_RESPONSE_EX(ndr, name, r);
    2304           0 : }
    2305             : 
    2306           6 : _PUBLIC_ void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r)
    2307             : {
    2308           6 :         ndr_print_struct(ndr, name, "NETLOGON_SAM_LOGON_RESPONSE_EX");
    2309           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2310             :         {
    2311           6 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2312           6 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2313           6 :                 ndr->depth++;
    2314           6 :                 ndr_print_netlogon_command(ndr, "command", r->command);
    2315           6 :                 ndr_print_uint16(ndr, "sbz", r->sbz);
    2316           6 :                 ndr_print_nbt_server_type(ndr, "server_type", r->server_type);
    2317           6 :                 ndr_print_GUID(ndr, "domain_uuid", &r->domain_uuid);
    2318           6 :                 ndr_print_nbt_string(ndr, "forest", r->forest);
    2319           6 :                 ndr_print_nbt_string(ndr, "dns_domain", r->dns_domain);
    2320           6 :                 ndr_print_nbt_string(ndr, "pdc_dns_name", r->pdc_dns_name);
    2321           6 :                 ndr_print_nbt_string(ndr, "domain_name", r->domain_name);
    2322           6 :                 ndr_print_nbt_string(ndr, "pdc_name", r->pdc_name);
    2323           6 :                 ndr_print_nbt_string(ndr, "user_name", r->user_name);
    2324           6 :                 ndr_print_nbt_string(ndr, "server_site", r->server_site);
    2325           6 :                 ndr_print_nbt_string(ndr, "client_site", r->client_site);
    2326           6 :                 ndr_print_uint8(ndr, "sockaddr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_nbt_sockaddr(&r->sockaddr, ndr->flags):r->sockaddr_size);
    2327           6 :                 ndr_print_nbt_sockaddr(ndr, "sockaddr", &r->sockaddr);
    2328           6 :                 ndr_print_nbt_string(ndr, "next_closest_site", r->next_closest_site);
    2329           6 :                 ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
    2330           6 :                 ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
    2331           6 :                 ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
    2332           6 :                 ndr->depth--;
    2333           6 :                 ndr->flags = _flags_save_STRUCT;
    2334             :         }
    2335             : }
    2336             : 
    2337          17 : static enum ndr_err_code ndr_push_nbt_netlogon_query_for_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_query_for_pdc *r)
    2338             : {
    2339          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2340          17 :         if (ndr_flags & NDR_SCALARS) {
    2341          17 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2342             :                 {
    2343          17 :                         uint32_t _flags_save_string = ndr->flags;
    2344          17 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2345          17 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
    2346          17 :                         ndr->flags = _flags_save_string;
    2347             :                 }
    2348             :                 {
    2349          17 :                         uint32_t _flags_save_string = ndr->flags;
    2350          17 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2351          17 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mailslot_name));
    2352          17 :                         ndr->flags = _flags_save_string;
    2353             :                 }
    2354             :                 {
    2355          17 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2356          17 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2357          17 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
    2358          17 :                         ndr->flags = _flags_save_DATA_BLOB;
    2359             :                 }
    2360             :                 {
    2361          17 :                         uint32_t _flags_save_string = ndr->flags;
    2362          17 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2363          17 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_name));
    2364          17 :                         ndr->flags = _flags_save_string;
    2365             :                 }
    2366          17 :                 NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
    2367          17 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
    2368          17 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
    2369          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2370             :         }
    2371          15 :         if (ndr_flags & NDR_BUFFERS) {
    2372             :         }
    2373          17 :         return NDR_ERR_SUCCESS;
    2374             : }
    2375             : 
    2376          19 : static enum ndr_err_code ndr_pull_nbt_netlogon_query_for_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_query_for_pdc *r)
    2377             : {
    2378          19 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2379          19 :         if (ndr_flags & NDR_SCALARS) {
    2380          19 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2381             :                 {
    2382          19 :                         uint32_t _flags_save_string = ndr->flags;
    2383          19 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2384          19 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
    2385          19 :                         ndr->flags = _flags_save_string;
    2386             :                 }
    2387             :                 {
    2388          19 :                         uint32_t _flags_save_string = ndr->flags;
    2389          19 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2390          19 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mailslot_name));
    2391          19 :                         ndr->flags = _flags_save_string;
    2392             :                 }
    2393             :                 {
    2394          19 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2395          19 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2396          19 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
    2397          19 :                         ndr->flags = _flags_save_DATA_BLOB;
    2398             :                 }
    2399             :                 {
    2400          19 :                         uint32_t _flags_save_string = ndr->flags;
    2401          19 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2402          19 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_name));
    2403          19 :                         ndr->flags = _flags_save_string;
    2404             :                 }
    2405          19 :                 NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
    2406          19 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
    2407          19 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
    2408          19 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2409             :         }
    2410          15 :         if (ndr_flags & NDR_BUFFERS) {
    2411             :         }
    2412          19 :         return NDR_ERR_SUCCESS;
    2413             : }
    2414             : 
    2415           4 : _PUBLIC_ void ndr_print_nbt_netlogon_query_for_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc *r)
    2416             : {
    2417           4 :         ndr_print_struct(ndr, name, "nbt_netlogon_query_for_pdc");
    2418           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2419           4 :         ndr->depth++;
    2420             :         {
    2421           4 :                 uint32_t _flags_save_string = ndr->flags;
    2422           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2423           4 :                 ndr_print_string(ndr, "computer_name", r->computer_name);
    2424           4 :                 ndr->flags = _flags_save_string;
    2425             :         }
    2426             :         {
    2427           4 :                 uint32_t _flags_save_string = ndr->flags;
    2428           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2429           4 :                 ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
    2430           4 :                 ndr->flags = _flags_save_string;
    2431             :         }
    2432             :         {
    2433           4 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2434           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2435           4 :                 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
    2436           4 :                 ndr->flags = _flags_save_DATA_BLOB;
    2437             :         }
    2438             :         {
    2439           4 :                 uint32_t _flags_save_string = ndr->flags;
    2440           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2441           4 :                 ndr_print_string(ndr, "unicode_name", r->unicode_name);
    2442           4 :                 ndr->flags = _flags_save_string;
    2443             :         }
    2444           4 :         ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
    2445           4 :         ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
    2446           4 :         ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
    2447           4 :         ndr->depth--;
    2448             : }
    2449             : 
    2450          15 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response_from_pdc *r)
    2451             : {
    2452          15 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2453          15 :         if (ndr_flags & NDR_SCALARS) {
    2454          15 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2455          15 :                 NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
    2456             :                 {
    2457          15 :                         uint32_t _flags_save_string = ndr->flags;
    2458          15 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2459          15 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
    2460          15 :                         ndr->flags = _flags_save_string;
    2461             :                 }
    2462             :                 {
    2463          15 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2464          15 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2465          15 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
    2466          15 :                         ndr->flags = _flags_save_DATA_BLOB;
    2467             :                 }
    2468             :                 {
    2469          15 :                         uint32_t _flags_save_string = ndr->flags;
    2470          15 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2471          15 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_pdc_name));
    2472          15 :                         ndr->flags = _flags_save_string;
    2473             :                 }
    2474             :                 {
    2475          15 :                         uint32_t _flags_save_string = ndr->flags;
    2476          15 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2477          15 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
    2478          15 :                         ndr->flags = _flags_save_string;
    2479             :                 }
    2480          15 :                 NDR_CHECK(ndr_push_netlogon_nt_version_flags(ndr, NDR_SCALARS, r->nt_version));
    2481          15 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
    2482          15 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
    2483          15 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2484             :         }
    2485          15 :         if (ndr_flags & NDR_BUFFERS) {
    2486             :         }
    2487          15 :         return NDR_ERR_SUCCESS;
    2488             : }
    2489             : 
    2490          15 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response_from_pdc *r)
    2491             : {
    2492          15 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2493          15 :         if (ndr_flags & NDR_SCALARS) {
    2494          15 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2495          15 :                 NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
    2496             :                 {
    2497          15 :                         uint32_t _flags_save_string = ndr->flags;
    2498          15 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2499          15 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
    2500          15 :                         ndr->flags = _flags_save_string;
    2501             :                 }
    2502             :                 {
    2503          15 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2504          15 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2505          15 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
    2506          15 :                         ndr->flags = _flags_save_DATA_BLOB;
    2507             :                 }
    2508             :                 {
    2509          15 :                         uint32_t _flags_save_string = ndr->flags;
    2510          15 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2511          15 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_pdc_name));
    2512          15 :                         ndr->flags = _flags_save_string;
    2513             :                 }
    2514             :                 {
    2515          15 :                         uint32_t _flags_save_string = ndr->flags;
    2516          15 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2517          15 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
    2518          15 :                         ndr->flags = _flags_save_string;
    2519             :                 }
    2520          15 :                 NDR_CHECK(ndr_pull_netlogon_nt_version_flags(ndr, NDR_SCALARS, &r->nt_version));
    2521          15 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
    2522          15 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
    2523          15 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2524             :         }
    2525          15 :         if (ndr_flags & NDR_BUFFERS) {
    2526             :         }
    2527          15 :         return NDR_ERR_SUCCESS;
    2528             : }
    2529             : 
    2530           0 : static void ndr_print_flags_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, int unused, const struct nbt_netlogon_response_from_pdc *r)
    2531             : {
    2532           0 :         ndr_print_nbt_netlogon_response_from_pdc(ndr, name, r);
    2533           0 : }
    2534             : 
    2535           0 : _PUBLIC_ void ndr_print_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc *r)
    2536             : {
    2537           0 :         ndr_print_struct(ndr, name, "nbt_netlogon_response_from_pdc");
    2538           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2539           0 :         ndr->depth++;
    2540           0 :         ndr_print_netlogon_command(ndr, "command", r->command);
    2541             :         {
    2542           0 :                 uint32_t _flags_save_string = ndr->flags;
    2543           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2544           0 :                 ndr_print_string(ndr, "pdc_name", r->pdc_name);
    2545           0 :                 ndr->flags = _flags_save_string;
    2546             :         }
    2547             :         {
    2548           0 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2549           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2550           0 :                 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
    2551           0 :                 ndr->flags = _flags_save_DATA_BLOB;
    2552             :         }
    2553             :         {
    2554           0 :                 uint32_t _flags_save_string = ndr->flags;
    2555           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2556           0 :                 ndr_print_string(ndr, "unicode_pdc_name", r->unicode_pdc_name);
    2557           0 :                 ndr->flags = _flags_save_string;
    2558             :         }
    2559             :         {
    2560           0 :                 uint32_t _flags_save_string = ndr->flags;
    2561           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2562           0 :                 ndr_print_string(ndr, "domain_name", r->domain_name);
    2563           0 :                 ndr->flags = _flags_save_string;
    2564             :         }
    2565           0 :         ndr_print_netlogon_nt_version_flags(ndr, "nt_version", r->nt_version);
    2566           0 :         ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
    2567           0 :         ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
    2568           0 :         ndr->depth--;
    2569             : }
    2570             : 
    2571           0 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_response2(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response2 *r)
    2572             : {
    2573             :         {
    2574           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2575           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2576           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2577           0 :                 if (ndr_flags & NDR_SCALARS) {
    2578           0 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    2579           0 :                         NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
    2580             :                         {
    2581           0 :                                 uint32_t _flags_save_string = ndr->flags;
    2582           0 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2583           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
    2584           0 :                                 ndr->flags = _flags_save_string;
    2585             :                         }
    2586           0 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
    2587           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2588             :                 }
    2589           0 :                 if (ndr_flags & NDR_BUFFERS) {
    2590             :                 }
    2591           0 :                 ndr->flags = _flags_save_STRUCT;
    2592             :         }
    2593           0 :         return NDR_ERR_SUCCESS;
    2594             : }
    2595             : 
    2596           2 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_response2(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response2 *r)
    2597             : {
    2598             :         {
    2599           2 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2600           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2601           2 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2602           2 :                 if (ndr_flags & NDR_SCALARS) {
    2603           2 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    2604           2 :                         NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
    2605             :                         {
    2606           2 :                                 uint32_t _flags_save_string = ndr->flags;
    2607           2 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2608           2 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
    2609           2 :                                 ndr->flags = _flags_save_string;
    2610             :                         }
    2611           2 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
    2612           2 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2613             :                 }
    2614           0 :                 if (ndr_flags & NDR_BUFFERS) {
    2615             :                 }
    2616           2 :                 ndr->flags = _flags_save_STRUCT;
    2617             :         }
    2618           2 :         return NDR_ERR_SUCCESS;
    2619             : }
    2620             : 
    2621           0 : static void ndr_print_flags_nbt_netlogon_response2(struct ndr_print *ndr, const char *name, int unused, const struct nbt_netlogon_response2 *r)
    2622             : {
    2623           0 :         ndr_print_nbt_netlogon_response2(ndr, name, r);
    2624           0 : }
    2625             : 
    2626           2 : _PUBLIC_ void ndr_print_nbt_netlogon_response2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response2 *r)
    2627             : {
    2628           2 :         ndr_print_struct(ndr, name, "nbt_netlogon_response2");
    2629           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2630             :         {
    2631           2 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    2632           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    2633           2 :                 ndr->depth++;
    2634           2 :                 ndr_print_netlogon_command(ndr, "command", r->command);
    2635             :                 {
    2636           2 :                         uint32_t _flags_save_string = ndr->flags;
    2637           2 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2638           2 :                         ndr_print_string(ndr, "pdc_name", r->pdc_name);
    2639           2 :                         ndr->flags = _flags_save_string;
    2640             :                 }
    2641           2 :                 ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
    2642           2 :                 ndr->depth--;
    2643           2 :                 ndr->flags = _flags_save_STRUCT;
    2644             :         }
    2645             : }
    2646             : 
    2647           0 : static enum ndr_err_code ndr_push_nbt_db_change_info(struct ndr_push *ndr, int ndr_flags, const struct nbt_db_change_info *r)
    2648             : {
    2649           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2650           0 :         if (ndr_flags & NDR_SCALARS) {
    2651           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2652           0 :                 NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->db_index));
    2653           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->serial));
    2654           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->timestamp));
    2655           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2656             :         }
    2657           0 :         if (ndr_flags & NDR_BUFFERS) {
    2658             :         }
    2659           0 :         return NDR_ERR_SUCCESS;
    2660             : }
    2661             : 
    2662           0 : static enum ndr_err_code ndr_pull_nbt_db_change_info(struct ndr_pull *ndr, int ndr_flags, struct nbt_db_change_info *r)
    2663             : {
    2664           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2665           0 :         if (ndr_flags & NDR_SCALARS) {
    2666           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2667           0 :                 NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->db_index));
    2668           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->serial));
    2669           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->timestamp));
    2670           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2671             :         }
    2672           0 :         if (ndr_flags & NDR_BUFFERS) {
    2673             :         }
    2674           0 :         return NDR_ERR_SUCCESS;
    2675             : }
    2676             : 
    2677           0 : _PUBLIC_ void ndr_print_nbt_db_change_info(struct ndr_print *ndr, const char *name, const struct nbt_db_change_info *r)
    2678             : {
    2679           0 :         ndr_print_struct(ndr, name, "nbt_db_change_info");
    2680           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2681           0 :         ndr->depth++;
    2682           0 :         ndr_print_netr_SamDatabaseID(ndr, "db_index", r->db_index);
    2683           0 :         ndr_print_hyper(ndr, "serial", r->serial);
    2684           0 :         ndr_print_NTTIME(ndr, "timestamp", r->timestamp);
    2685           0 :         ndr->depth--;
    2686             : }
    2687             : 
    2688           0 : static enum ndr_err_code ndr_push_NETLOGON_DB_CHANGE(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_DB_CHANGE *r)
    2689             : {
    2690             :         uint32_t cntr_dbchange_0;
    2691           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2692           0 :         if (ndr_flags & NDR_SCALARS) {
    2693           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2694           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_lo));
    2695           0 :                 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->timestamp));
    2696           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pulse));
    2697           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->random));
    2698             :                 {
    2699           0 :                         uint32_t _flags_save_string = ndr->flags;
    2700           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2701           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pdc_name));
    2702           0 :                         ndr->flags = _flags_save_string;
    2703             :                 }
    2704             :                 {
    2705           0 :                         uint32_t _flags_save_string = ndr->flags;
    2706           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2707           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain));
    2708           0 :                         ndr->flags = _flags_save_string;
    2709             :                 }
    2710             :                 {
    2711           0 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2712           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2713           0 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
    2714           0 :                         ndr->flags = _flags_save_DATA_BLOB;
    2715             :                 }
    2716             :                 {
    2717           0 :                         uint32_t _flags_save_string = ndr->flags;
    2718           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2719           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_pdc_name));
    2720           0 :                         ndr->flags = _flags_save_string;
    2721             :                 }
    2722             :                 {
    2723           0 :                         uint32_t _flags_save_string = ndr->flags;
    2724           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2725           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unicode_domain));
    2726           0 :                         ndr->flags = _flags_save_string;
    2727             :                 }
    2728           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->db_count));
    2729           0 :                 for (cntr_dbchange_0 = 0; cntr_dbchange_0 < (r->db_count); cntr_dbchange_0++) {
    2730           0 :                         NDR_CHECK(ndr_push_nbt_db_change_info(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0]));
    2731             :                 }
    2732           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags)));
    2733             :                 {
    2734             :                         struct ndr_push *_ndr_sid;
    2735           0 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
    2736           0 :                         NDR_CHECK(ndr_push_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
    2737           0 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
    2738             :                 }
    2739           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_format_version));
    2740           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->message_token));
    2741           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2742             :         }
    2743           0 :         if (ndr_flags & NDR_BUFFERS) {
    2744             :         }
    2745           0 :         return NDR_ERR_SUCCESS;
    2746             : }
    2747             : 
    2748           0 : static enum ndr_err_code ndr_pull_NETLOGON_DB_CHANGE(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_DB_CHANGE *r)
    2749             : {
    2750           0 :         uint32_t size_dbchange_0 = 0;
    2751             :         uint32_t cntr_dbchange_0;
    2752           0 :         TALLOC_CTX *_mem_save_dbchange_0 = NULL;
    2753           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2754           0 :         if (ndr_flags & NDR_SCALARS) {
    2755           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2756           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_lo));
    2757           0 :                 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->timestamp));
    2758           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pulse));
    2759           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->random));
    2760             :                 {
    2761           0 :                         uint32_t _flags_save_string = ndr->flags;
    2762           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2763           0 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pdc_name));
    2764           0 :                         ndr->flags = _flags_save_string;
    2765             :                 }
    2766             :                 {
    2767           0 :                         uint32_t _flags_save_string = ndr->flags;
    2768           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2769           0 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain));
    2770           0 :                         ndr->flags = _flags_save_string;
    2771             :                 }
    2772             :                 {
    2773           0 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2774           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2775           0 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
    2776           0 :                         ndr->flags = _flags_save_DATA_BLOB;
    2777             :                 }
    2778             :                 {
    2779           0 :                         uint32_t _flags_save_string = ndr->flags;
    2780           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2781           0 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_pdc_name));
    2782           0 :                         ndr->flags = _flags_save_string;
    2783             :                 }
    2784             :                 {
    2785           0 :                         uint32_t _flags_save_string = ndr->flags;
    2786           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2787           0 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unicode_domain));
    2788           0 :                         ndr->flags = _flags_save_string;
    2789             :                 }
    2790           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->db_count));
    2791           0 :                 size_dbchange_0 = r->db_count;
    2792           0 :                 NDR_PULL_ALLOC_N(ndr, r->dbchange, size_dbchange_0);
    2793           0 :                 _mem_save_dbchange_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2794           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->dbchange, 0);
    2795           0 :                 for (cntr_dbchange_0 = 0; cntr_dbchange_0 < (size_dbchange_0); cntr_dbchange_0++) {
    2796           0 :                         NDR_CHECK(ndr_pull_nbt_db_change_info(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0]));
    2797             :                 }
    2798           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dbchange_0, 0);
    2799           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size));
    2800             :                 {
    2801             :                         struct ndr_pull *_ndr_sid;
    2802           0 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sid, 0, r->sid_size));
    2803           0 :                         NDR_CHECK(ndr_pull_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
    2804           0 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size));
    2805             :                 }
    2806           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_format_version));
    2807           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->message_token));
    2808           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2809             :         }
    2810           0 :         if (ndr_flags & NDR_BUFFERS) {
    2811             :         }
    2812           0 :         return NDR_ERR_SUCCESS;
    2813             : }
    2814             : 
    2815           0 : _PUBLIC_ void ndr_print_NETLOGON_DB_CHANGE(struct ndr_print *ndr, const char *name, const struct NETLOGON_DB_CHANGE *r)
    2816             : {
    2817             :         uint32_t cntr_dbchange_0;
    2818           0 :         ndr_print_struct(ndr, name, "NETLOGON_DB_CHANGE");
    2819           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2820           0 :         ndr->depth++;
    2821           0 :         ndr_print_uint32(ndr, "serial_lo", r->serial_lo);
    2822           0 :         ndr_print_time_t(ndr, "timestamp", r->timestamp);
    2823           0 :         ndr_print_uint32(ndr, "pulse", r->pulse);
    2824           0 :         ndr_print_uint32(ndr, "random", r->random);
    2825             :         {
    2826           0 :                 uint32_t _flags_save_string = ndr->flags;
    2827           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2828           0 :                 ndr_print_string(ndr, "pdc_name", r->pdc_name);
    2829           0 :                 ndr->flags = _flags_save_string;
    2830             :         }
    2831             :         {
    2832           0 :                 uint32_t _flags_save_string = ndr->flags;
    2833           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    2834           0 :                 ndr_print_string(ndr, "domain", r->domain);
    2835           0 :                 ndr->flags = _flags_save_string;
    2836             :         }
    2837             :         {
    2838           0 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2839           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
    2840           0 :                 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
    2841           0 :                 ndr->flags = _flags_save_DATA_BLOB;
    2842             :         }
    2843             :         {
    2844           0 :                 uint32_t _flags_save_string = ndr->flags;
    2845           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2846           0 :                 ndr_print_string(ndr, "unicode_pdc_name", r->unicode_pdc_name);
    2847           0 :                 ndr->flags = _flags_save_string;
    2848             :         }
    2849             :         {
    2850           0 :                 uint32_t _flags_save_string = ndr->flags;
    2851           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2852           0 :                 ndr_print_string(ndr, "unicode_domain", r->unicode_domain);
    2853           0 :                 ndr->flags = _flags_save_string;
    2854             :         }
    2855           0 :         ndr_print_uint32(ndr, "db_count", r->db_count);
    2856           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "dbchange", (int)r->db_count);
    2857           0 :         ndr->depth++;
    2858           0 :         for (cntr_dbchange_0 = 0; cntr_dbchange_0 < (r->db_count); cntr_dbchange_0++) {
    2859           0 :                 ndr_print_nbt_db_change_info(ndr, "dbchange", &r->dbchange[cntr_dbchange_0]);
    2860             :         }
    2861           0 :         ndr->depth--;
    2862           0 :         ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
    2863           0 :         ndr_print_dom_sid0(ndr, "sid", &r->sid);
    2864           0 :         ndr_print_uint32(ndr, "message_format_version", r->message_format_version);
    2865           0 :         ndr_print_uint32(ndr, "message_token", r->message_token);
    2866           0 :         ndr->depth--;
    2867             : }
    2868             : 
    2869         102 : static enum ndr_err_code ndr_push_nbt_netlogon_request(struct ndr_push *ndr, int ndr_flags, const union nbt_netlogon_request *r)
    2870             : {
    2871             :         uint32_t level;
    2872         102 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2873         102 :         if (ndr_flags & NDR_SCALARS) {
    2874             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    2875          51 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    2876          51 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    2877          51 :                 switch (level) {
    2878           0 :                         case LOGON_REQUEST: {
    2879           0 :                                 NDR_CHECK(ndr_push_NETLOGON_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon0));
    2880           0 :                         break; }
    2881             : 
    2882          34 :                         case LOGON_SAM_LOGON_REQUEST: {
    2883          34 :                                 NDR_CHECK(ndr_push_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon));
    2884          32 :                         break; }
    2885             : 
    2886          17 :                         case LOGON_PRIMARY_QUERY: {
    2887          17 :                                 NDR_CHECK(ndr_push_nbt_netlogon_query_for_pdc(ndr, NDR_SCALARS, &r->pdc));
    2888          15 :                         break; }
    2889             : 
    2890           0 :                         case NETLOGON_ANNOUNCE_UAS: {
    2891           0 :                                 NDR_CHECK(ndr_push_NETLOGON_DB_CHANGE(ndr, NDR_SCALARS, &r->uas));
    2892           0 :                         break; }
    2893             : 
    2894           0 :                         default:
    2895           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    2896             :                 }
    2897          41 :         }
    2898         102 :         if (ndr_flags & NDR_BUFFERS) {
    2899          51 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2900             :                         /* We didn't get it above, and the token is not needed after this. */
    2901          51 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    2902             :                 }
    2903          51 :                 switch (level) {
    2904           0 :                         case LOGON_REQUEST:
    2905           0 :                         break;
    2906             : 
    2907          34 :                         case LOGON_SAM_LOGON_REQUEST:
    2908          34 :                                 NDR_CHECK(ndr_push_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_BUFFERS, &r->logon));
    2909          32 :                         break;
    2910             : 
    2911          15 :                         case LOGON_PRIMARY_QUERY:
    2912          15 :                         break;
    2913             : 
    2914           0 :                         case NETLOGON_ANNOUNCE_UAS:
    2915           0 :                                 NDR_CHECK(ndr_push_NETLOGON_DB_CHANGE(ndr, NDR_BUFFERS, &r->uas));
    2916           0 :                         break;
    2917             : 
    2918           0 :                         default:
    2919           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    2920             :                 }
    2921          41 :         }
    2922          94 :         return NDR_ERR_SUCCESS;
    2923             : }
    2924             : 
    2925         130 : static enum ndr_err_code ndr_pull_nbt_netlogon_request(struct ndr_pull *ndr, int ndr_flags, union nbt_netlogon_request *r)
    2926             : {
    2927             :         uint32_t level;
    2928         130 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2929         130 :         if (ndr_flags & NDR_SCALARS) {
    2930             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    2931          65 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2932          65 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    2933          65 :                 switch (level) {
    2934           2 :                         case LOGON_REQUEST: {
    2935           2 :                                 NDR_CHECK(ndr_pull_NETLOGON_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon0));
    2936           0 :                         break; }
    2937             : 
    2938          44 :                         case LOGON_SAM_LOGON_REQUEST: {
    2939          44 :                                 NDR_CHECK(ndr_pull_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_SCALARS, &r->logon));
    2940          42 :                         break; }
    2941             : 
    2942          19 :                         case LOGON_PRIMARY_QUERY: {
    2943          19 :                                 NDR_CHECK(ndr_pull_nbt_netlogon_query_for_pdc(ndr, NDR_SCALARS, &r->pdc));
    2944          15 :                         break; }
    2945             : 
    2946           0 :                         case NETLOGON_ANNOUNCE_UAS: {
    2947           0 :                                 NDR_CHECK(ndr_pull_NETLOGON_DB_CHANGE(ndr, NDR_SCALARS, &r->uas));
    2948           0 :                         break; }
    2949             : 
    2950           0 :                         default:
    2951           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    2952             :                 }
    2953          55 :         }
    2954         130 :         if (ndr_flags & NDR_BUFFERS) {
    2955          65 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2956             :                         /* We didn't get it above, and the token is not needed after this. */
    2957          65 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2958             :                 }
    2959          65 :                 switch (level) {
    2960           0 :                         case LOGON_REQUEST:
    2961           0 :                         break;
    2962             : 
    2963          44 :                         case LOGON_SAM_LOGON_REQUEST:
    2964          44 :                                 NDR_CHECK(ndr_pull_NETLOGON_SAM_LOGON_REQUEST(ndr, NDR_BUFFERS, &r->logon));
    2965          42 :                         break;
    2966             : 
    2967          15 :                         case LOGON_PRIMARY_QUERY:
    2968          15 :                         break;
    2969             : 
    2970           0 :                         case NETLOGON_ANNOUNCE_UAS:
    2971           0 :                                 NDR_CHECK(ndr_pull_NETLOGON_DB_CHANGE(ndr, NDR_BUFFERS, &r->uas));
    2972           0 :                         break;
    2973             : 
    2974           0 :                         default:
    2975           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    2976             :                 }
    2977          55 :         }
    2978         114 :         return NDR_ERR_SUCCESS;
    2979             : }
    2980             : 
    2981           8 : _PUBLIC_ void ndr_print_nbt_netlogon_request(struct ndr_print *ndr, const char *name, const union nbt_netlogon_request *r)
    2982             : {
    2983             :         uint32_t level;
    2984           8 :         level = ndr_print_steal_switch_value(ndr, r);
    2985           8 :         ndr_print_union(ndr, name, level, "nbt_netlogon_request");
    2986           8 :         switch (level) {
    2987           2 :                 case LOGON_REQUEST:
    2988           2 :                         ndr_print_NETLOGON_LOGON_REQUEST(ndr, "logon0", &r->logon0);
    2989           2 :                 break;
    2990             : 
    2991           2 :                 case LOGON_SAM_LOGON_REQUEST:
    2992           2 :                         ndr_print_NETLOGON_SAM_LOGON_REQUEST(ndr, "logon", &r->logon);
    2993           2 :                 break;
    2994             : 
    2995           4 :                 case LOGON_PRIMARY_QUERY:
    2996           4 :                         ndr_print_nbt_netlogon_query_for_pdc(ndr, "pdc", &r->pdc);
    2997           4 :                 break;
    2998             : 
    2999           0 :                 case NETLOGON_ANNOUNCE_UAS:
    3000           0 :                         ndr_print_NETLOGON_DB_CHANGE(ndr, "uas", &r->uas);
    3001           0 :                 break;
    3002             : 
    3003           0 :                 default:
    3004           0 :                         ndr_print_bad_level(ndr, name, level);
    3005             :         }
    3006           8 : }
    3007             : 
    3008          51 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_netlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_packet *r)
    3009             : {
    3010             :         {
    3011          51 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    3012          51 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    3013          51 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3014          51 :                 if (ndr_flags & NDR_SCALARS) {
    3015          51 :                         NDR_CHECK(ndr_push_align(ndr, 8));
    3016          51 :                         NDR_CHECK(ndr_push_netlogon_command(ndr, NDR_SCALARS, r->command));
    3017          51 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->req, r->command));
    3018          51 :                         NDR_CHECK(ndr_push_nbt_netlogon_request(ndr, NDR_SCALARS, &r->req));
    3019          51 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    3020             :                 }
    3021          51 :                 if (ndr_flags & NDR_BUFFERS) {
    3022          51 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->req, r->command));
    3023          51 :                         NDR_CHECK(ndr_push_nbt_netlogon_request(ndr, NDR_BUFFERS, &r->req));
    3024             :                 }
    3025          51 :                 ndr->flags = _flags_save_STRUCT;
    3026             :         }
    3027          51 :         return NDR_ERR_SUCCESS;
    3028             : }
    3029             : 
    3030          65 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_netlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_packet *r)
    3031             : {
    3032             :         {
    3033          65 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    3034          65 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    3035          65 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3036          65 :                 if (ndr_flags & NDR_SCALARS) {
    3037          65 :                         NDR_CHECK(ndr_pull_align(ndr, 8));
    3038          65 :                         NDR_CHECK(ndr_pull_netlogon_command(ndr, NDR_SCALARS, &r->command));
    3039          65 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->req, r->command));
    3040          65 :                         NDR_CHECK(ndr_pull_nbt_netlogon_request(ndr, NDR_SCALARS, &r->req));
    3041          65 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    3042             :                 }
    3043          65 :                 if (ndr_flags & NDR_BUFFERS) {
    3044          65 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->req, r->command));
    3045          65 :                         NDR_CHECK(ndr_pull_nbt_netlogon_request(ndr, NDR_BUFFERS, &r->req));
    3046             :                 }
    3047          65 :                 ndr->flags = _flags_save_STRUCT;
    3048             :         }
    3049          65 :         return NDR_ERR_SUCCESS;
    3050             : }
    3051             : 
    3052           0 : static void ndr_print_flags_nbt_netlogon_packet(struct ndr_print *ndr, const char *name, int unused, const struct nbt_netlogon_packet *r)
    3053             : {
    3054           0 :         ndr_print_nbt_netlogon_packet(ndr, name, r);
    3055           0 : }
    3056             : 
    3057           8 : _PUBLIC_ void ndr_print_nbt_netlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_packet *r)
    3058             : {
    3059           8 :         ndr_print_struct(ndr, name, "nbt_netlogon_packet");
    3060           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3061             :         {
    3062           8 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    3063           8 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    3064           8 :                 ndr->depth++;
    3065           8 :                 ndr_print_netlogon_command(ndr, "command", r->command);
    3066           8 :                 ndr_print_set_switch_value(ndr, &r->req, r->command);
    3067           8 :                 ndr_print_nbt_netlogon_request(ndr, "req", &r->req);
    3068           8 :                 ndr->depth--;
    3069           8 :                 ndr->flags = _flags_save_STRUCT;
    3070             :         }
    3071             : }
    3072             : 
    3073           0 : static enum ndr_err_code ndr_push_nbt_browse_opcode(struct ndr_push *ndr, int ndr_flags, enum nbt_browse_opcode r)
    3074             : {
    3075           0 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
    3076           0 :         return NDR_ERR_SUCCESS;
    3077             : }
    3078             : 
    3079         527 : static enum ndr_err_code ndr_pull_nbt_browse_opcode(struct ndr_pull *ndr, int ndr_flags, enum nbt_browse_opcode *r)
    3080             : {
    3081             :         uint8_t v;
    3082         527 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
    3083         527 :         *r = v;
    3084         527 :         return NDR_ERR_SUCCESS;
    3085             : }
    3086             : 
    3087           0 : _PUBLIC_ void ndr_print_nbt_browse_opcode(struct ndr_print *ndr, const char *name, enum nbt_browse_opcode r)
    3088             : {
    3089           0 :         const char *val = NULL;
    3090             : 
    3091           0 :         switch (r) {
    3092           0 :                 case HostAnnouncement: val = "HostAnnouncement"; break;
    3093           0 :                 case AnnouncementRequest: val = "AnnouncementRequest"; break;
    3094           0 :                 case Election: val = "Election"; break;
    3095           0 :                 case GetBackupListReq: val = "GetBackupListReq"; break;
    3096           0 :                 case GetBackupListResp: val = "GetBackupListResp"; break;
    3097           0 :                 case BecomeBackup: val = "BecomeBackup"; break;
    3098           0 :                 case DomainAnnouncement: val = "DomainAnnouncement"; break;
    3099           0 :                 case MasterAnnouncement: val = "MasterAnnouncement"; break;
    3100           0 :                 case ResetBrowserState: val = "ResetBrowserState"; break;
    3101           0 :                 case LocalMasterAnnouncement: val = "LocalMasterAnnouncement"; break;
    3102             :         }
    3103           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    3104           0 : }
    3105             : 
    3106           0 : static enum ndr_err_code ndr_push_nbt_browse_host_announcement(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_host_announcement *r)
    3107             : {
    3108           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3109           0 :         if (ndr_flags & NDR_SCALARS) {
    3110           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3111           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->UpdateCount));
    3112           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Periodicity));
    3113           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ServerName, 16, sizeof(uint8_t), CH_DOS));
    3114           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMajor));
    3115           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMinor));
    3116           0 :                 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->ServerType));
    3117           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BroMajorVer));
    3118           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BroMinorVer));
    3119           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Signature));
    3120             :                 {
    3121           0 :                         uint32_t _flags_save_string = ndr->flags;
    3122           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3123           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment));
    3124           0 :                         ndr->flags = _flags_save_string;
    3125             :                 }
    3126           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3127             :         }
    3128           0 :         if (ndr_flags & NDR_BUFFERS) {
    3129             :         }
    3130           0 :         return NDR_ERR_SUCCESS;
    3131             : }
    3132             : 
    3133         175 : static enum ndr_err_code ndr_pull_nbt_browse_host_announcement(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_host_announcement *r)
    3134             : {
    3135         175 :         uint32_t size_ServerName_0 = 0;
    3136         175 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3137         175 :         if (ndr_flags & NDR_SCALARS) {
    3138         175 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3139         175 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->UpdateCount));
    3140         175 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Periodicity));
    3141         175 :                 size_ServerName_0 = 16;
    3142         175 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ServerName, size_ServerName_0, sizeof(uint8_t), CH_DOS));
    3143         175 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMajor));
    3144         175 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMinor));
    3145         175 :                 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->ServerType));
    3146         175 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BroMajorVer));
    3147         175 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BroMinorVer));
    3148         175 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Signature));
    3149             :                 {
    3150         175 :                         uint32_t _flags_save_string = ndr->flags;
    3151         175 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3152         175 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment));
    3153         175 :                         ndr->flags = _flags_save_string;
    3154             :                 }
    3155         175 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3156             :         }
    3157         175 :         if (ndr_flags & NDR_BUFFERS) {
    3158             :         }
    3159         175 :         return NDR_ERR_SUCCESS;
    3160             : }
    3161             : 
    3162           0 : _PUBLIC_ void ndr_print_nbt_browse_host_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_host_announcement *r)
    3163             : {
    3164           0 :         ndr_print_struct(ndr, name, "nbt_browse_host_announcement");
    3165           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3166           0 :         ndr->depth++;
    3167           0 :         ndr_print_uint8(ndr, "UpdateCount", r->UpdateCount);
    3168           0 :         ndr_print_uint32(ndr, "Periodicity", r->Periodicity);
    3169           0 :         ndr_print_string(ndr, "ServerName", r->ServerName);
    3170           0 :         ndr_print_uint8(ndr, "OSMajor", r->OSMajor);
    3171           0 :         ndr_print_uint8(ndr, "OSMinor", r->OSMinor);
    3172           0 :         ndr_print_svcctl_ServerType(ndr, "ServerType", r->ServerType);
    3173           0 :         ndr_print_uint8(ndr, "BroMajorVer", r->BroMajorVer);
    3174           0 :         ndr_print_uint8(ndr, "BroMinorVer", r->BroMinorVer);
    3175           0 :         ndr_print_uint16(ndr, "Signature", r->Signature);
    3176             :         {
    3177           0 :                 uint32_t _flags_save_string = ndr->flags;
    3178           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3179           0 :                 ndr_print_string(ndr, "Comment", r->Comment);
    3180           0 :                 ndr->flags = _flags_save_string;
    3181             :         }
    3182           0 :         ndr->depth--;
    3183             : }
    3184             : 
    3185           0 : static enum ndr_err_code ndr_push_nbt_browse_announcement_request(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_announcement_request *r)
    3186             : {
    3187           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3188           0 :         if (ndr_flags & NDR_SCALARS) {
    3189           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3190           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Unused));
    3191             :                 {
    3192           0 :                         uint32_t _flags_save_string = ndr->flags;
    3193           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3194           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ResponseName));
    3195           0 :                         ndr->flags = _flags_save_string;
    3196             :                 }
    3197           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3198             :         }
    3199           0 :         if (ndr_flags & NDR_BUFFERS) {
    3200             :         }
    3201           0 :         return NDR_ERR_SUCCESS;
    3202             : }
    3203             : 
    3204          26 : static enum ndr_err_code ndr_pull_nbt_browse_announcement_request(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_announcement_request *r)
    3205             : {
    3206          26 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3207          26 :         if (ndr_flags & NDR_SCALARS) {
    3208          26 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3209          26 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Unused));
    3210             :                 {
    3211          26 :                         uint32_t _flags_save_string = ndr->flags;
    3212          26 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3213          26 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ResponseName));
    3214          26 :                         ndr->flags = _flags_save_string;
    3215             :                 }
    3216          26 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3217             :         }
    3218          26 :         if (ndr_flags & NDR_BUFFERS) {
    3219             :         }
    3220          26 :         return NDR_ERR_SUCCESS;
    3221             : }
    3222             : 
    3223           0 : _PUBLIC_ void ndr_print_nbt_browse_announcement_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_announcement_request *r)
    3224             : {
    3225           0 :         ndr_print_struct(ndr, name, "nbt_browse_announcement_request");
    3226           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3227           0 :         ndr->depth++;
    3228           0 :         ndr_print_uint8(ndr, "Unused", r->Unused);
    3229             :         {
    3230           0 :                 uint32_t _flags_save_string = ndr->flags;
    3231           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3232           0 :                 ndr_print_string(ndr, "ResponseName", r->ResponseName);
    3233           0 :                 ndr->flags = _flags_save_string;
    3234             :         }
    3235           0 :         ndr->depth--;
    3236             : }
    3237             : 
    3238           0 : static enum ndr_err_code ndr_push_nbt_browse_election_request(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_election_request *r)
    3239             : {
    3240           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3241           0 :         if (ndr_flags & NDR_SCALARS) {
    3242           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3243           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Version));
    3244           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Criteria));
    3245           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->UpTime));
    3246           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved));
    3247             :                 {
    3248           0 :                         uint32_t _flags_save_string = ndr->flags;
    3249           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3250           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ServerName));
    3251           0 :                         ndr->flags = _flags_save_string;
    3252             :                 }
    3253           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3254             :         }
    3255           0 :         if (ndr_flags & NDR_BUFFERS) {
    3256             :         }
    3257           0 :         return NDR_ERR_SUCCESS;
    3258             : }
    3259             : 
    3260         130 : static enum ndr_err_code ndr_pull_nbt_browse_election_request(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_election_request *r)
    3261             : {
    3262         130 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3263         130 :         if (ndr_flags & NDR_SCALARS) {
    3264         130 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3265         130 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Version));
    3266         130 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Criteria));
    3267         130 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UpTime));
    3268         130 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved));
    3269             :                 {
    3270         130 :                         uint32_t _flags_save_string = ndr->flags;
    3271         130 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3272         130 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ServerName));
    3273         130 :                         ndr->flags = _flags_save_string;
    3274             :                 }
    3275         130 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3276             :         }
    3277         130 :         if (ndr_flags & NDR_BUFFERS) {
    3278             :         }
    3279         130 :         return NDR_ERR_SUCCESS;
    3280             : }
    3281             : 
    3282           0 : _PUBLIC_ void ndr_print_nbt_browse_election_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_election_request *r)
    3283             : {
    3284           0 :         ndr_print_struct(ndr, name, "nbt_browse_election_request");
    3285           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3286           0 :         ndr->depth++;
    3287           0 :         ndr_print_uint8(ndr, "Version", r->Version);
    3288           0 :         ndr_print_uint32(ndr, "Criteria", r->Criteria);
    3289           0 :         ndr_print_uint32(ndr, "UpTime", r->UpTime);
    3290           0 :         ndr_print_uint32(ndr, "Reserved", r->Reserved);
    3291             :         {
    3292           0 :                 uint32_t _flags_save_string = ndr->flags;
    3293           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3294           0 :                 ndr_print_string(ndr, "ServerName", r->ServerName);
    3295           0 :                 ndr->flags = _flags_save_string;
    3296             :         }
    3297           0 :         ndr->depth--;
    3298             : }
    3299             : 
    3300           0 : static enum ndr_err_code ndr_push_nbt_browse_backup_list_request(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_backup_list_request *r)
    3301             : {
    3302           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3303           0 :         if (ndr_flags & NDR_SCALARS) {
    3304           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3305           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ReqCount));
    3306           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Token));
    3307           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3308             :         }
    3309           0 :         if (ndr_flags & NDR_BUFFERS) {
    3310             :         }
    3311           0 :         return NDR_ERR_SUCCESS;
    3312             : }
    3313             : 
    3314           0 : static enum ndr_err_code ndr_pull_nbt_browse_backup_list_request(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_backup_list_request *r)
    3315             : {
    3316           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3317           0 :         if (ndr_flags & NDR_SCALARS) {
    3318           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3319           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ReqCount));
    3320           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Token));
    3321           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3322             :         }
    3323           0 :         if (ndr_flags & NDR_BUFFERS) {
    3324             :         }
    3325           0 :         return NDR_ERR_SUCCESS;
    3326             : }
    3327             : 
    3328           0 : _PUBLIC_ void ndr_print_nbt_browse_backup_list_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_request *r)
    3329             : {
    3330           0 :         ndr_print_struct(ndr, name, "nbt_browse_backup_list_request");
    3331           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3332           0 :         ndr->depth++;
    3333           0 :         ndr_print_uint8(ndr, "ReqCount", r->ReqCount);
    3334           0 :         ndr_print_uint32(ndr, "Token", r->Token);
    3335           0 :         ndr->depth--;
    3336             : }
    3337             : 
    3338           0 : static enum ndr_err_code ndr_push_nbt_browse_backup_list_response(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_backup_list_response *r)
    3339             : {
    3340             :         uint32_t cntr_BackupServerList_0;
    3341           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3342           0 :         if (ndr_flags & NDR_SCALARS) {
    3343           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3344           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BackupCount));
    3345           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Token));
    3346           0 :                 for (cntr_BackupServerList_0 = 0; cntr_BackupServerList_0 < (r->BackupCount); cntr_BackupServerList_0++) {
    3347           0 :                         NDR_CHECK(ndr_push_nbt_name(ndr, NDR_SCALARS, &r->BackupServerList[cntr_BackupServerList_0]));
    3348             :                 }
    3349           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3350             :         }
    3351           0 :         if (ndr_flags & NDR_BUFFERS) {
    3352             :         }
    3353           0 :         return NDR_ERR_SUCCESS;
    3354             : }
    3355             : 
    3356           0 : static enum ndr_err_code ndr_pull_nbt_browse_backup_list_response(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_backup_list_response *r)
    3357             : {
    3358           0 :         uint32_t size_BackupServerList_0 = 0;
    3359             :         uint32_t cntr_BackupServerList_0;
    3360           0 :         TALLOC_CTX *_mem_save_BackupServerList_0 = NULL;
    3361           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3362           0 :         if (ndr_flags & NDR_SCALARS) {
    3363           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3364           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BackupCount));
    3365           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Token));
    3366           0 :                 size_BackupServerList_0 = r->BackupCount;
    3367           0 :                 NDR_PULL_ALLOC_N(ndr, r->BackupServerList, size_BackupServerList_0);
    3368           0 :                 _mem_save_BackupServerList_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3369           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->BackupServerList, 0);
    3370           0 :                 for (cntr_BackupServerList_0 = 0; cntr_BackupServerList_0 < (size_BackupServerList_0); cntr_BackupServerList_0++) {
    3371           0 :                         NDR_CHECK(ndr_pull_nbt_name(ndr, NDR_SCALARS, &r->BackupServerList[cntr_BackupServerList_0]));
    3372             :                 }
    3373           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_BackupServerList_0, 0);
    3374           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3375             :         }
    3376           0 :         if (ndr_flags & NDR_BUFFERS) {
    3377             :         }
    3378           0 :         return NDR_ERR_SUCCESS;
    3379             : }
    3380             : 
    3381           0 : _PUBLIC_ void ndr_print_nbt_browse_backup_list_response(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_response *r)
    3382             : {
    3383             :         uint32_t cntr_BackupServerList_0;
    3384           0 :         ndr_print_struct(ndr, name, "nbt_browse_backup_list_response");
    3385           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3386           0 :         ndr->depth++;
    3387           0 :         ndr_print_uint8(ndr, "BackupCount", r->BackupCount);
    3388           0 :         ndr_print_uint32(ndr, "Token", r->Token);
    3389           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "BackupServerList", (int)r->BackupCount);
    3390           0 :         ndr->depth++;
    3391           0 :         for (cntr_BackupServerList_0 = 0; cntr_BackupServerList_0 < (r->BackupCount); cntr_BackupServerList_0++) {
    3392           0 :                 ndr_print_nbt_name(ndr, "BackupServerList", &r->BackupServerList[cntr_BackupServerList_0]);
    3393             :         }
    3394           0 :         ndr->depth--;
    3395           0 :         ndr->depth--;
    3396             : }
    3397             : 
    3398           0 : static enum ndr_err_code ndr_push_nbt_browse_become_backup(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_become_backup *r)
    3399             : {
    3400           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3401           0 :         if (ndr_flags & NDR_SCALARS) {
    3402           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3403             :                 {
    3404           0 :                         uint32_t _flags_save_string = ndr->flags;
    3405           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3406           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->BrowserName));
    3407           0 :                         ndr->flags = _flags_save_string;
    3408             :                 }
    3409           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3410             :         }
    3411           0 :         if (ndr_flags & NDR_BUFFERS) {
    3412             :         }
    3413           0 :         return NDR_ERR_SUCCESS;
    3414             : }
    3415             : 
    3416           0 : static enum ndr_err_code ndr_pull_nbt_browse_become_backup(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_become_backup *r)
    3417             : {
    3418           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3419           0 :         if (ndr_flags & NDR_SCALARS) {
    3420           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3421             :                 {
    3422           0 :                         uint32_t _flags_save_string = ndr->flags;
    3423           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3424           0 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->BrowserName));
    3425           0 :                         ndr->flags = _flags_save_string;
    3426             :                 }
    3427           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3428             :         }
    3429           0 :         if (ndr_flags & NDR_BUFFERS) {
    3430             :         }
    3431           0 :         return NDR_ERR_SUCCESS;
    3432             : }
    3433             : 
    3434           0 : _PUBLIC_ void ndr_print_nbt_browse_become_backup(struct ndr_print *ndr, const char *name, const struct nbt_browse_become_backup *r)
    3435             : {
    3436           0 :         ndr_print_struct(ndr, name, "nbt_browse_become_backup");
    3437           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3438           0 :         ndr->depth++;
    3439             :         {
    3440           0 :                 uint32_t _flags_save_string = ndr->flags;
    3441           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3442           0 :                 ndr_print_string(ndr, "BrowserName", r->BrowserName);
    3443           0 :                 ndr->flags = _flags_save_string;
    3444             :         }
    3445           0 :         ndr->depth--;
    3446             : }
    3447             : 
    3448           0 : static enum ndr_err_code ndr_push_nbt_browse_domain_announcement(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_domain_announcement *r)
    3449             : {
    3450           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3451           0 :         if (ndr_flags & NDR_SCALARS) {
    3452           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3453           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->UpdateCount));
    3454           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Periodicity));
    3455           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ServerName, 16, sizeof(uint8_t), CH_DOS));
    3456           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMajor));
    3457           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMinor));
    3458           0 :                 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->ServerType));
    3459           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MysteriousField));
    3460             :                 {
    3461           0 :                         uint32_t _flags_save_string = ndr->flags;
    3462           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3463           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment));
    3464           0 :                         ndr->flags = _flags_save_string;
    3465             :                 }
    3466           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3467             :         }
    3468           0 :         if (ndr_flags & NDR_BUFFERS) {
    3469             :         }
    3470           0 :         return NDR_ERR_SUCCESS;
    3471             : }
    3472             : 
    3473          73 : static enum ndr_err_code ndr_pull_nbt_browse_domain_announcement(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_domain_announcement *r)
    3474             : {
    3475          73 :         uint32_t size_ServerName_0 = 0;
    3476          73 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3477          73 :         if (ndr_flags & NDR_SCALARS) {
    3478          73 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3479          73 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->UpdateCount));
    3480          73 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Periodicity));
    3481          73 :                 size_ServerName_0 = 16;
    3482          73 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ServerName, size_ServerName_0, sizeof(uint8_t), CH_DOS));
    3483          73 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMajor));
    3484          73 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMinor));
    3485          73 :                 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->ServerType));
    3486          73 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MysteriousField));
    3487             :                 {
    3488          73 :                         uint32_t _flags_save_string = ndr->flags;
    3489          73 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3490          73 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment));
    3491          73 :                         ndr->flags = _flags_save_string;
    3492             :                 }
    3493          73 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3494             :         }
    3495          73 :         if (ndr_flags & NDR_BUFFERS) {
    3496             :         }
    3497          73 :         return NDR_ERR_SUCCESS;
    3498             : }
    3499             : 
    3500           0 : _PUBLIC_ void ndr_print_nbt_browse_domain_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_domain_announcement *r)
    3501             : {
    3502           0 :         ndr_print_struct(ndr, name, "nbt_browse_domain_announcement");
    3503           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3504           0 :         ndr->depth++;
    3505           0 :         ndr_print_uint8(ndr, "UpdateCount", r->UpdateCount);
    3506           0 :         ndr_print_uint32(ndr, "Periodicity", r->Periodicity);
    3507           0 :         ndr_print_string(ndr, "ServerName", r->ServerName);
    3508           0 :         ndr_print_uint8(ndr, "OSMajor", r->OSMajor);
    3509           0 :         ndr_print_uint8(ndr, "OSMinor", r->OSMinor);
    3510           0 :         ndr_print_svcctl_ServerType(ndr, "ServerType", r->ServerType);
    3511           0 :         ndr_print_uint32(ndr, "MysteriousField", r->MysteriousField);
    3512             :         {
    3513           0 :                 uint32_t _flags_save_string = ndr->flags;
    3514           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3515           0 :                 ndr_print_string(ndr, "Comment", r->Comment);
    3516           0 :                 ndr->flags = _flags_save_string;
    3517             :         }
    3518           0 :         ndr->depth--;
    3519             : }
    3520             : 
    3521           0 : static enum ndr_err_code ndr_push_nbt_browse_master_announcement(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_master_announcement *r)
    3522             : {
    3523           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3524           0 :         if (ndr_flags & NDR_SCALARS) {
    3525           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3526             :                 {
    3527           0 :                         uint32_t _flags_save_string = ndr->flags;
    3528           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3529           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->ServerName));
    3530           0 :                         ndr->flags = _flags_save_string;
    3531             :                 }
    3532           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3533             :         }
    3534           0 :         if (ndr_flags & NDR_BUFFERS) {
    3535             :         }
    3536           0 :         return NDR_ERR_SUCCESS;
    3537             : }
    3538             : 
    3539           0 : static enum ndr_err_code ndr_pull_nbt_browse_master_announcement(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_master_announcement *r)
    3540             : {
    3541           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3542           0 :         if (ndr_flags & NDR_SCALARS) {
    3543           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3544             :                 {
    3545           0 :                         uint32_t _flags_save_string = ndr->flags;
    3546           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3547           0 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->ServerName));
    3548           0 :                         ndr->flags = _flags_save_string;
    3549             :                 }
    3550           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3551             :         }
    3552           0 :         if (ndr_flags & NDR_BUFFERS) {
    3553             :         }
    3554           0 :         return NDR_ERR_SUCCESS;
    3555             : }
    3556             : 
    3557           0 : _PUBLIC_ void ndr_print_nbt_browse_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_master_announcement *r)
    3558             : {
    3559           0 :         ndr_print_struct(ndr, name, "nbt_browse_master_announcement");
    3560           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3561           0 :         ndr->depth++;
    3562             :         {
    3563           0 :                 uint32_t _flags_save_string = ndr->flags;
    3564           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3565           0 :                 ndr_print_string(ndr, "ServerName", r->ServerName);
    3566           0 :                 ndr->flags = _flags_save_string;
    3567             :         }
    3568           0 :         ndr->depth--;
    3569             : }
    3570             : 
    3571           0 : static enum ndr_err_code ndr_push_nbt_browse_reset_state(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_reset_state *r)
    3572             : {
    3573           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3574           0 :         if (ndr_flags & NDR_SCALARS) {
    3575           0 :                 NDR_CHECK(ndr_push_align(ndr, 1));
    3576           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Command));
    3577           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    3578             :         }
    3579           0 :         if (ndr_flags & NDR_BUFFERS) {
    3580             :         }
    3581           0 :         return NDR_ERR_SUCCESS;
    3582             : }
    3583             : 
    3584           0 : static enum ndr_err_code ndr_pull_nbt_browse_reset_state(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_reset_state *r)
    3585             : {
    3586           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3587           0 :         if (ndr_flags & NDR_SCALARS) {
    3588           0 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
    3589           0 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Command));
    3590           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    3591             :         }
    3592           0 :         if (ndr_flags & NDR_BUFFERS) {
    3593             :         }
    3594           0 :         return NDR_ERR_SUCCESS;
    3595             : }
    3596             : 
    3597           0 : _PUBLIC_ void ndr_print_nbt_browse_reset_state(struct ndr_print *ndr, const char *name, const struct nbt_browse_reset_state *r)
    3598             : {
    3599           0 :         ndr_print_struct(ndr, name, "nbt_browse_reset_state");
    3600           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3601           0 :         ndr->depth++;
    3602           0 :         ndr_print_uint8(ndr, "Command", r->Command);
    3603           0 :         ndr->depth--;
    3604             : }
    3605             : 
    3606           0 : static enum ndr_err_code ndr_push_nbt_browse_local_master_announcement(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_local_master_announcement *r)
    3607             : {
    3608           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3609           0 :         if (ndr_flags & NDR_SCALARS) {
    3610           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    3611           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->UpdateCount));
    3612           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Periodicity));
    3613           0 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ServerName, 16, sizeof(uint8_t), CH_DOS));
    3614           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMajor));
    3615           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->OSMinor));
    3616           0 :                 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->ServerType));
    3617           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BroMajorVer));
    3618           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->BroMinorVer));
    3619           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Signature));
    3620             :                 {
    3621           0 :                         uint32_t _flags_save_string = ndr->flags;
    3622           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3623           0 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Comment));
    3624           0 :                         ndr->flags = _flags_save_string;
    3625             :                 }
    3626           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3627             :         }
    3628           0 :         if (ndr_flags & NDR_BUFFERS) {
    3629             :         }
    3630           0 :         return NDR_ERR_SUCCESS;
    3631             : }
    3632             : 
    3633         123 : static enum ndr_err_code ndr_pull_nbt_browse_local_master_announcement(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_local_master_announcement *r)
    3634             : {
    3635         123 :         uint32_t size_ServerName_0 = 0;
    3636         123 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3637         123 :         if (ndr_flags & NDR_SCALARS) {
    3638         123 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    3639         123 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->UpdateCount));
    3640         123 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Periodicity));
    3641         123 :                 size_ServerName_0 = 16;
    3642         123 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ServerName, size_ServerName_0, sizeof(uint8_t), CH_DOS));
    3643         123 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMajor));
    3644         123 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->OSMinor));
    3645         123 :                 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->ServerType));
    3646         123 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BroMajorVer));
    3647         123 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->BroMinorVer));
    3648         123 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Signature));
    3649             :                 {
    3650         123 :                         uint32_t _flags_save_string = ndr->flags;
    3651         123 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3652         123 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Comment));
    3653         123 :                         ndr->flags = _flags_save_string;
    3654             :                 }
    3655         123 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3656             :         }
    3657         123 :         if (ndr_flags & NDR_BUFFERS) {
    3658             :         }
    3659         123 :         return NDR_ERR_SUCCESS;
    3660             : }
    3661             : 
    3662           0 : _PUBLIC_ void ndr_print_nbt_browse_local_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_local_master_announcement *r)
    3663             : {
    3664           0 :         ndr_print_struct(ndr, name, "nbt_browse_local_master_announcement");
    3665           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3666           0 :         ndr->depth++;
    3667           0 :         ndr_print_uint8(ndr, "UpdateCount", r->UpdateCount);
    3668           0 :         ndr_print_uint32(ndr, "Periodicity", r->Periodicity);
    3669           0 :         ndr_print_string(ndr, "ServerName", r->ServerName);
    3670           0 :         ndr_print_uint8(ndr, "OSMajor", r->OSMajor);
    3671           0 :         ndr_print_uint8(ndr, "OSMinor", r->OSMinor);
    3672           0 :         ndr_print_svcctl_ServerType(ndr, "ServerType", r->ServerType);
    3673           0 :         ndr_print_uint8(ndr, "BroMajorVer", r->BroMajorVer);
    3674           0 :         ndr_print_uint8(ndr, "BroMinorVer", r->BroMinorVer);
    3675           0 :         ndr_print_uint16(ndr, "Signature", r->Signature);
    3676             :         {
    3677           0 :                 uint32_t _flags_save_string = ndr->flags;
    3678           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
    3679           0 :                 ndr_print_string(ndr, "Comment", r->Comment);
    3680           0 :                 ndr->flags = _flags_save_string;
    3681             :         }
    3682           0 :         ndr->depth--;
    3683             : }
    3684             : 
    3685           0 : static enum ndr_err_code ndr_push_nbt_browse_payload(struct ndr_push *ndr, int ndr_flags, const union nbt_browse_payload *r)
    3686             : {
    3687             :         uint32_t level;
    3688           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3689           0 :         if (ndr_flags & NDR_SCALARS) {
    3690             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3691           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3692           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    3693           0 :                 switch (level) {
    3694           0 :                         case HostAnnouncement: {
    3695           0 :                                 NDR_CHECK(ndr_push_nbt_browse_host_announcement(ndr, NDR_SCALARS, &r->host_annoucement));
    3696           0 :                         break; }
    3697             : 
    3698           0 :                         case AnnouncementRequest: {
    3699           0 :                                 NDR_CHECK(ndr_push_nbt_browse_announcement_request(ndr, NDR_SCALARS, &r->announcement_request));
    3700           0 :                         break; }
    3701             : 
    3702           0 :                         case Election: {
    3703           0 :                                 NDR_CHECK(ndr_push_nbt_browse_election_request(ndr, NDR_SCALARS, &r->election_request));
    3704           0 :                         break; }
    3705             : 
    3706           0 :                         case GetBackupListReq: {
    3707           0 :                                 NDR_CHECK(ndr_push_nbt_browse_backup_list_request(ndr, NDR_SCALARS, &r->backup_list_request));
    3708           0 :                         break; }
    3709             : 
    3710           0 :                         case GetBackupListResp: {
    3711           0 :                                 NDR_CHECK(ndr_push_nbt_browse_backup_list_response(ndr, NDR_SCALARS, &r->backup_list_response));
    3712           0 :                         break; }
    3713             : 
    3714           0 :                         case BecomeBackup: {
    3715           0 :                                 NDR_CHECK(ndr_push_nbt_browse_become_backup(ndr, NDR_SCALARS, &r->become_backup));
    3716           0 :                         break; }
    3717             : 
    3718           0 :                         case DomainAnnouncement: {
    3719           0 :                                 NDR_CHECK(ndr_push_nbt_browse_domain_announcement(ndr, NDR_SCALARS, &r->domain_announcement));
    3720           0 :                         break; }
    3721             : 
    3722           0 :                         case MasterAnnouncement: {
    3723           0 :                                 NDR_CHECK(ndr_push_nbt_browse_master_announcement(ndr, NDR_SCALARS, &r->master_announcement));
    3724           0 :                         break; }
    3725             : 
    3726           0 :                         case ResetBrowserState: {
    3727           0 :                                 NDR_CHECK(ndr_push_nbt_browse_reset_state(ndr, NDR_SCALARS, &r->reset_browser_state));
    3728           0 :                         break; }
    3729             : 
    3730           0 :                         case LocalMasterAnnouncement: {
    3731           0 :                                 NDR_CHECK(ndr_push_nbt_browse_local_master_announcement(ndr, NDR_SCALARS, &r->local_master_announcement));
    3732           0 :                         break; }
    3733             : 
    3734           0 :                         default:
    3735           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    3736             :                 }
    3737           0 :         }
    3738           0 :         if (ndr_flags & NDR_BUFFERS) {
    3739           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    3740             :                         /* We didn't get it above, and the token is not needed after this. */
    3741           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3742             :                 }
    3743           0 :                 switch (level) {
    3744           0 :                         case HostAnnouncement:
    3745           0 :                         break;
    3746             : 
    3747           0 :                         case AnnouncementRequest:
    3748           0 :                         break;
    3749             : 
    3750           0 :                         case Election:
    3751           0 :                         break;
    3752             : 
    3753           0 :                         case GetBackupListReq:
    3754           0 :                         break;
    3755             : 
    3756           0 :                         case GetBackupListResp:
    3757           0 :                         break;
    3758             : 
    3759           0 :                         case BecomeBackup:
    3760           0 :                         break;
    3761             : 
    3762           0 :                         case DomainAnnouncement:
    3763           0 :                         break;
    3764             : 
    3765           0 :                         case MasterAnnouncement:
    3766           0 :                         break;
    3767             : 
    3768           0 :                         case ResetBrowserState:
    3769           0 :                         break;
    3770             : 
    3771           0 :                         case LocalMasterAnnouncement:
    3772           0 :                         break;
    3773             : 
    3774           0 :                         default:
    3775           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    3776             :                 }
    3777           0 :         }
    3778           0 :         return NDR_ERR_SUCCESS;
    3779             : }
    3780             : 
    3781         527 : static enum ndr_err_code ndr_pull_nbt_browse_payload(struct ndr_pull *ndr, int ndr_flags, union nbt_browse_payload *r)
    3782             : {
    3783             :         uint32_t level;
    3784         527 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3785         527 :         if (ndr_flags & NDR_SCALARS) {
    3786             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3787         527 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3788         527 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    3789         527 :                 switch (level) {
    3790         175 :                         case HostAnnouncement: {
    3791         175 :                                 NDR_CHECK(ndr_pull_nbt_browse_host_announcement(ndr, NDR_SCALARS, &r->host_annoucement));
    3792         175 :                         break; }
    3793             : 
    3794          26 :                         case AnnouncementRequest: {
    3795          26 :                                 NDR_CHECK(ndr_pull_nbt_browse_announcement_request(ndr, NDR_SCALARS, &r->announcement_request));
    3796          26 :                         break; }
    3797             : 
    3798         130 :                         case Election: {
    3799         130 :                                 NDR_CHECK(ndr_pull_nbt_browse_election_request(ndr, NDR_SCALARS, &r->election_request));
    3800         130 :                         break; }
    3801             : 
    3802           0 :                         case GetBackupListReq: {
    3803           0 :                                 NDR_CHECK(ndr_pull_nbt_browse_backup_list_request(ndr, NDR_SCALARS, &r->backup_list_request));
    3804           0 :                         break; }
    3805             : 
    3806           0 :                         case GetBackupListResp: {
    3807           0 :                                 NDR_CHECK(ndr_pull_nbt_browse_backup_list_response(ndr, NDR_SCALARS, &r->backup_list_response));
    3808           0 :                         break; }
    3809             : 
    3810           0 :                         case BecomeBackup: {
    3811           0 :                                 NDR_CHECK(ndr_pull_nbt_browse_become_backup(ndr, NDR_SCALARS, &r->become_backup));
    3812           0 :                         break; }
    3813             : 
    3814          73 :                         case DomainAnnouncement: {
    3815          73 :                                 NDR_CHECK(ndr_pull_nbt_browse_domain_announcement(ndr, NDR_SCALARS, &r->domain_announcement));
    3816          73 :                         break; }
    3817             : 
    3818           0 :                         case MasterAnnouncement: {
    3819           0 :                                 NDR_CHECK(ndr_pull_nbt_browse_master_announcement(ndr, NDR_SCALARS, &r->master_announcement));
    3820           0 :                         break; }
    3821             : 
    3822           0 :                         case ResetBrowserState: {
    3823           0 :                                 NDR_CHECK(ndr_pull_nbt_browse_reset_state(ndr, NDR_SCALARS, &r->reset_browser_state));
    3824           0 :                         break; }
    3825             : 
    3826         123 :                         case LocalMasterAnnouncement: {
    3827         123 :                                 NDR_CHECK(ndr_pull_nbt_browse_local_master_announcement(ndr, NDR_SCALARS, &r->local_master_announcement));
    3828         123 :                         break; }
    3829             : 
    3830           0 :                         default:
    3831           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    3832             :                 }
    3833           0 :         }
    3834         527 :         if (ndr_flags & NDR_BUFFERS) {
    3835           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    3836             :                         /* We didn't get it above, and the token is not needed after this. */
    3837           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3838             :                 }
    3839           0 :                 switch (level) {
    3840           0 :                         case HostAnnouncement:
    3841           0 :                         break;
    3842             : 
    3843           0 :                         case AnnouncementRequest:
    3844           0 :                         break;
    3845             : 
    3846           0 :                         case Election:
    3847           0 :                         break;
    3848             : 
    3849           0 :                         case GetBackupListReq:
    3850           0 :                         break;
    3851             : 
    3852           0 :                         case GetBackupListResp:
    3853           0 :                         break;
    3854             : 
    3855           0 :                         case BecomeBackup:
    3856           0 :                         break;
    3857             : 
    3858           0 :                         case DomainAnnouncement:
    3859           0 :                         break;
    3860             : 
    3861           0 :                         case MasterAnnouncement:
    3862           0 :                         break;
    3863             : 
    3864           0 :                         case ResetBrowserState:
    3865           0 :                         break;
    3866             : 
    3867           0 :                         case LocalMasterAnnouncement:
    3868           0 :                         break;
    3869             : 
    3870           0 :                         default:
    3871           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    3872             :                 }
    3873         266 :         }
    3874         527 :         return NDR_ERR_SUCCESS;
    3875             : }
    3876             : 
    3877           0 : _PUBLIC_ void ndr_print_nbt_browse_payload(struct ndr_print *ndr, const char *name, const union nbt_browse_payload *r)
    3878             : {
    3879             :         uint32_t level;
    3880           0 :         level = ndr_print_steal_switch_value(ndr, r);
    3881           0 :         ndr_print_union(ndr, name, level, "nbt_browse_payload");
    3882           0 :         switch (level) {
    3883           0 :                 case HostAnnouncement:
    3884           0 :                         ndr_print_nbt_browse_host_announcement(ndr, "host_annoucement", &r->host_annoucement);
    3885           0 :                 break;
    3886             : 
    3887           0 :                 case AnnouncementRequest:
    3888           0 :                         ndr_print_nbt_browse_announcement_request(ndr, "announcement_request", &r->announcement_request);
    3889           0 :                 break;
    3890             : 
    3891           0 :                 case Election:
    3892           0 :                         ndr_print_nbt_browse_election_request(ndr, "election_request", &r->election_request);
    3893           0 :                 break;
    3894             : 
    3895           0 :                 case GetBackupListReq:
    3896           0 :                         ndr_print_nbt_browse_backup_list_request(ndr, "backup_list_request", &r->backup_list_request);
    3897           0 :                 break;
    3898             : 
    3899           0 :                 case GetBackupListResp:
    3900           0 :                         ndr_print_nbt_browse_backup_list_response(ndr, "backup_list_response", &r->backup_list_response);
    3901           0 :                 break;
    3902             : 
    3903           0 :                 case BecomeBackup:
    3904           0 :                         ndr_print_nbt_browse_become_backup(ndr, "become_backup", &r->become_backup);
    3905           0 :                 break;
    3906             : 
    3907           0 :                 case DomainAnnouncement:
    3908           0 :                         ndr_print_nbt_browse_domain_announcement(ndr, "domain_announcement", &r->domain_announcement);
    3909           0 :                 break;
    3910             : 
    3911           0 :                 case MasterAnnouncement:
    3912           0 :                         ndr_print_nbt_browse_master_announcement(ndr, "master_announcement", &r->master_announcement);
    3913           0 :                 break;
    3914             : 
    3915           0 :                 case ResetBrowserState:
    3916           0 :                         ndr_print_nbt_browse_reset_state(ndr, "reset_browser_state", &r->reset_browser_state);
    3917           0 :                 break;
    3918             : 
    3919           0 :                 case LocalMasterAnnouncement:
    3920           0 :                         ndr_print_nbt_browse_local_master_announcement(ndr, "local_master_announcement", &r->local_master_announcement);
    3921           0 :                 break;
    3922             : 
    3923           0 :                 default:
    3924           0 :                         ndr_print_bad_level(ndr, name, level);
    3925             :         }
    3926           0 : }
    3927             : 
    3928           0 : _PUBLIC_ enum ndr_err_code ndr_push_nbt_browse_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_packet *r)
    3929             : {
    3930             :         {
    3931           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    3932           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    3933           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3934           0 :                 if (ndr_flags & NDR_SCALARS) {
    3935           0 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    3936           0 :                         NDR_CHECK(ndr_push_nbt_browse_opcode(ndr, NDR_SCALARS, r->opcode));
    3937           0 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->payload, r->opcode));
    3938           0 :                         NDR_CHECK(ndr_push_nbt_browse_payload(ndr, NDR_SCALARS, &r->payload));
    3939           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    3940             :                 }
    3941           0 :                 if (ndr_flags & NDR_BUFFERS) {
    3942             :                 }
    3943           0 :                 ndr->flags = _flags_save_STRUCT;
    3944             :         }
    3945           0 :         return NDR_ERR_SUCCESS;
    3946             : }
    3947             : 
    3948         527 : _PUBLIC_ enum ndr_err_code ndr_pull_nbt_browse_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_packet *r)
    3949             : {
    3950             :         {
    3951         527 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    3952         527 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    3953         527 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3954         527 :                 if (ndr_flags & NDR_SCALARS) {
    3955         527 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    3956         527 :                         NDR_CHECK(ndr_pull_nbt_browse_opcode(ndr, NDR_SCALARS, &r->opcode));
    3957         527 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->payload, r->opcode));
    3958         527 :                         NDR_CHECK(ndr_pull_nbt_browse_payload(ndr, NDR_SCALARS, &r->payload));
    3959         527 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    3960             :                 }
    3961         527 :                 if (ndr_flags & NDR_BUFFERS) {
    3962             :                 }
    3963         527 :                 ndr->flags = _flags_save_STRUCT;
    3964             :         }
    3965         527 :         return NDR_ERR_SUCCESS;
    3966             : }
    3967             : 
    3968           0 : static void ndr_print_flags_nbt_browse_packet(struct ndr_print *ndr, const char *name, int unused, const struct nbt_browse_packet *r)
    3969             : {
    3970           0 :         ndr_print_nbt_browse_packet(ndr, name, r);
    3971           0 : }
    3972             : 
    3973           0 : _PUBLIC_ void ndr_print_nbt_browse_packet(struct ndr_print *ndr, const char *name, const struct nbt_browse_packet *r)
    3974             : {
    3975           0 :         ndr_print_struct(ndr, name, "nbt_browse_packet");
    3976           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3977             :         {
    3978           0 :                 uint32_t _flags_save_STRUCT = ndr->flags;
    3979           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
    3980           0 :                 ndr->depth++;
    3981           0 :                 ndr_print_nbt_browse_opcode(ndr, "opcode", r->opcode);
    3982           0 :                 ndr_print_set_switch_value(ndr, &r->payload, r->opcode);
    3983           0 :                 ndr_print_nbt_browse_payload(ndr, "payload", &r->payload);
    3984           0 :                 ndr->depth--;
    3985           0 :                 ndr->flags = _flags_save_STRUCT;
    3986             :         }
    3987             : }
    3988             : 
    3989             : #ifndef SKIP_NDR_TABLE_nbt
    3990             : static const struct ndr_interface_public_struct nbt_public_structs[] = {
    3991             :         {
    3992             :                 .name = "nbt_name",
    3993             :                 .struct_size = sizeof(struct nbt_name ),
    3994             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_name,
    3995             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_name,
    3996             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_name,
    3997             :         },
    3998             :         {
    3999             :                 .name = "nbt_name_packet",
    4000             :                 .struct_size = sizeof(struct nbt_name_packet ),
    4001             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_name_packet,
    4002             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_name_packet,
    4003             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_name_packet,
    4004             :         },
    4005             :         {
    4006             :                 .name = "dgram_smb_packet",
    4007             :                 .struct_size = sizeof(struct dgram_smb_packet ),
    4008             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_dgram_smb_packet,
    4009             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_dgram_smb_packet,
    4010             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_dgram_smb_packet,
    4011             :         },
    4012             :         {
    4013             :                 .name = "nbt_dgram_packet",
    4014             :                 .struct_size = sizeof(struct nbt_dgram_packet ),
    4015             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_dgram_packet,
    4016             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_dgram_packet,
    4017             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_dgram_packet,
    4018             :         },
    4019             :         {
    4020             :                 .name = "nbt_sockaddr",
    4021             :                 .struct_size = sizeof(struct nbt_sockaddr ),
    4022             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_sockaddr,
    4023             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_sockaddr,
    4024             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_sockaddr,
    4025             :         },
    4026             :         {
    4027             :                 .name = "NETLOGON_SAM_LOGON_RESPONSE_NT40",
    4028             :                 .struct_size = sizeof(struct NETLOGON_SAM_LOGON_RESPONSE_NT40 ),
    4029             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40,
    4030             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40,
    4031             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE_NT40,
    4032             :         },
    4033             :         {
    4034             :                 .name = "NETLOGON_SAM_LOGON_RESPONSE",
    4035             :                 .struct_size = sizeof(struct NETLOGON_SAM_LOGON_RESPONSE ),
    4036             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NETLOGON_SAM_LOGON_RESPONSE,
    4037             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NETLOGON_SAM_LOGON_RESPONSE,
    4038             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE,
    4039             :         },
    4040             :         {
    4041             :                 .name = "NETLOGON_SAM_LOGON_RESPONSE_EX",
    4042             :                 .struct_size = sizeof(struct NETLOGON_SAM_LOGON_RESPONSE_EX ),
    4043             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX,
    4044             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX,
    4045             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NETLOGON_SAM_LOGON_RESPONSE_EX,
    4046             :         },
    4047             :         {
    4048             :                 .name = "nbt_netlogon_response_from_pdc",
    4049             :                 .struct_size = sizeof(struct nbt_netlogon_response_from_pdc ),
    4050             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_netlogon_response_from_pdc,
    4051             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_netlogon_response_from_pdc,
    4052             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_netlogon_response_from_pdc,
    4053             :         },
    4054             :         {
    4055             :                 .name = "nbt_netlogon_response2",
    4056             :                 .struct_size = sizeof(struct nbt_netlogon_response2 ),
    4057             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_netlogon_response2,
    4058             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_netlogon_response2,
    4059             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_netlogon_response2,
    4060             :         },
    4061             :         {
    4062             :                 .name = "nbt_netlogon_packet",
    4063             :                 .struct_size = sizeof(struct nbt_netlogon_packet ),
    4064             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_netlogon_packet,
    4065             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_netlogon_packet,
    4066             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_netlogon_packet,
    4067             :         },
    4068             :         {
    4069             :                 .name = "nbt_browse_packet",
    4070             :                 .struct_size = sizeof(struct nbt_browse_packet ),
    4071             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_nbt_browse_packet,
    4072             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_nbt_browse_packet,
    4073             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_nbt_browse_packet,
    4074             :         },
    4075             :         { .name = NULL }
    4076             : };
    4077             : 
    4078             : static const struct ndr_interface_call nbt_calls[] = {
    4079             :         { .name = NULL }
    4080             : };
    4081             : 
    4082             : static const char * const nbt_endpoint_strings[] = {
    4083             :         "ncacn_np:[\\pipe\\nbt]", 
    4084             : };
    4085             : 
    4086             : static const struct ndr_interface_string_array nbt_endpoints = {
    4087             :         .count  = 1,
    4088             :         .names  = nbt_endpoint_strings
    4089             : };
    4090             : 
    4091             : static const char * const nbt_authservice_strings[] = {
    4092             :         "host", 
    4093             : };
    4094             : 
    4095             : static const struct ndr_interface_string_array nbt_authservices = {
    4096             :         .count  = 1,
    4097             :         .names  = nbt_authservice_strings
    4098             : };
    4099             : 
    4100             : 
    4101             : const struct ndr_interface_table ndr_table_nbt = {
    4102             :         .name           = "nbt",
    4103             :         .syntax_id      = {
    4104             :                 {0x6def41b6,0x86e4,0x4c32,{0x99,0x7c},{0xed,0x33,0xaf,0x7b,0xcd,0x8e}},
    4105             :                 NDR_NBT_VERSION
    4106             :         },
    4107             :         .helpstring     = NDR_NBT_HELPSTRING,
    4108             :         .num_calls      = 0,
    4109             :         .calls          = nbt_calls,
    4110             :         .num_public_structs     = 12,
    4111             :         .public_structs         = nbt_public_structs,
    4112             :         .endpoints      = &nbt_endpoints,
    4113             :         .authservices   = &nbt_authservices
    4114             : };
    4115             : 
    4116             : #endif /* SKIP_NDR_TABLE_nbt */

Generated by: LCOV version 1.13