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 master 2f515e9b Lines: 1471 2920 50.4 %
Date: 2024-04-21 15:09:00 Functions: 93 178 52.2 %

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

Generated by: LCOV version 1.14