LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_ntlmssp.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 1221 1622 75.3 %
Date: 2024-04-21 15:09:00 Functions: 54 86 62.8 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_ntlmssp.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_security.h"
       7           6 : static enum ndr_err_code ndr_push_ntlmssp_MessageType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ntlmssp_MessageType r)
       8             : {
       9           6 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
      10           0 :         return NDR_ERR_SUCCESS;
      11             : }
      12             : 
      13          20 : static enum ndr_err_code ndr_pull_ntlmssp_MessageType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ntlmssp_MessageType *r)
      14             : {
      15          14 :         uint32_t v;
      16          20 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
      17          20 :         *r = v;
      18          20 :         return NDR_ERR_SUCCESS;
      19             : }
      20             : 
      21          20 : _PUBLIC_ void ndr_print_ntlmssp_MessageType(struct ndr_print *ndr, const char *name, enum ntlmssp_MessageType r)
      22             : {
      23          20 :         const char *val = NULL;
      24             : 
      25          20 :         switch (r) {
      26           6 :                 case NtLmNegotiate: val = "NtLmNegotiate"; break;
      27           7 :                 case NtLmChallenge: val = "NtLmChallenge"; break;
      28           5 :                 case NtLmAuthenticate: val = "NtLmAuthenticate"; break;
      29             :         }
      30          20 :         ndr_print_enum(ndr, name, "ENUM", val, r);
      31          20 : }
      32             : 
      33           6 : static enum ndr_err_code ndr_push_NEGOTIATE(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
      34             : {
      35           6 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      36           0 :         return NDR_ERR_SUCCESS;
      37             : }
      38             : 
      39          20 : static enum ndr_err_code ndr_pull_NEGOTIATE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
      40             : {
      41          14 :         uint32_t v;
      42          20 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      43          20 :         *r = v;
      44          20 :         return NDR_ERR_SUCCESS;
      45             : }
      46             : 
      47          20 : _PUBLIC_ void ndr_print_NEGOTIATE(struct ndr_print *ndr, const char *name, uint32_t r)
      48             : {
      49          20 :         ndr_print_uint32(ndr, name, r);
      50          20 :         ndr->depth++;
      51          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_UNICODE", NTLMSSP_NEGOTIATE_UNICODE, r);
      52          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_OEM", NTLMSSP_NEGOTIATE_OEM, r);
      53          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_REQUEST_TARGET", NTLMSSP_REQUEST_TARGET, r);
      54          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_SIGN", NTLMSSP_NEGOTIATE_SIGN, r);
      55          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_SEAL", NTLMSSP_NEGOTIATE_SEAL, r);
      56          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_DATAGRAM", NTLMSSP_NEGOTIATE_DATAGRAM, r);
      57          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_LM_KEY", NTLMSSP_NEGOTIATE_LM_KEY, r);
      58          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_NETWARE", NTLMSSP_NEGOTIATE_NETWARE, r);
      59          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_NTLM", NTLMSSP_NEGOTIATE_NTLM, r);
      60          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_NT_ONLY", NTLMSSP_NEGOTIATE_NT_ONLY, r);
      61          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_ANONYMOUS", NTLMSSP_ANONYMOUS, r);
      62          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED", NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED, r);
      63          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED", NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED, r);
      64          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL", NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL, r);
      65          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_ALWAYS_SIGN", NTLMSSP_NEGOTIATE_ALWAYS_SIGN, r);
      66          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_TARGET_TYPE_DOMAIN", NTLMSSP_TARGET_TYPE_DOMAIN, r);
      67          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_TARGET_TYPE_SERVER", NTLMSSP_TARGET_TYPE_SERVER, r);
      68          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_TARGET_TYPE_SHARE", NTLMSSP_TARGET_TYPE_SHARE, r);
      69          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY", NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY, r);
      70          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_IDENTIFY", NTLMSSP_NEGOTIATE_IDENTIFY, r);
      71          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_REQUEST_NON_NT_SESSION_KEY", NTLMSSP_REQUEST_NON_NT_SESSION_KEY, r);
      72          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_TARGET_INFO", NTLMSSP_NEGOTIATE_TARGET_INFO, r);
      73          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_VERSION", NTLMSSP_NEGOTIATE_VERSION, r);
      74          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_128", NTLMSSP_NEGOTIATE_128, r);
      75          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_KEY_EXCH", NTLMSSP_NEGOTIATE_KEY_EXCH, r);
      76          20 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_NEGOTIATE_56", NTLMSSP_NEGOTIATE_56, r);
      77          20 :         ndr->depth--;
      78          20 : }
      79             : 
      80           5 : static enum ndr_err_code ndr_push_ntlmssp_WindowsMajorVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ntlmssp_WindowsMajorVersion r)
      81             : {
      82           5 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
      83           0 :         return NDR_ERR_SUCCESS;
      84             : }
      85             : 
      86          18 : static enum ndr_err_code ndr_pull_ntlmssp_WindowsMajorVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ntlmssp_WindowsMajorVersion *r)
      87             : {
      88          12 :         uint8_t v;
      89          18 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
      90          18 :         *r = v;
      91          18 :         return NDR_ERR_SUCCESS;
      92             : }
      93             : 
      94          18 : _PUBLIC_ void ndr_print_ntlmssp_WindowsMajorVersion(struct ndr_print *ndr, const char *name, enum ntlmssp_WindowsMajorVersion r)
      95             : {
      96          18 :         const char *val = NULL;
      97             : 
      98          18 :         switch (r) {
      99           0 :                 case NTLMSSP_WINDOWS_MAJOR_VERSION_5: val = "NTLMSSP_WINDOWS_MAJOR_VERSION_5"; break;
     100          16 :                 case NTLMSSP_WINDOWS_MAJOR_VERSION_6: val = "NTLMSSP_WINDOWS_MAJOR_VERSION_6"; break;
     101           0 :                 case NTLMSSP_WINDOWS_MAJOR_VERSION_10: val = "NTLMSSP_WINDOWS_MAJOR_VERSION_10"; break;
     102             :         }
     103          18 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     104          18 : }
     105             : 
     106           5 : static enum ndr_err_code ndr_push_ntlmssp_WindowsMinorVersion(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ntlmssp_WindowsMinorVersion r)
     107             : {
     108           5 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
     109           0 :         return NDR_ERR_SUCCESS;
     110             : }
     111             : 
     112          18 : static enum ndr_err_code ndr_pull_ntlmssp_WindowsMinorVersion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ntlmssp_WindowsMinorVersion *r)
     113             : {
     114          12 :         uint8_t v;
     115          18 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
     116          18 :         *r = v;
     117          18 :         return NDR_ERR_SUCCESS;
     118             : }
     119             : 
     120          18 : _PUBLIC_ void ndr_print_ntlmssp_WindowsMinorVersion(struct ndr_print *ndr, const char *name, enum ntlmssp_WindowsMinorVersion r)
     121             : {
     122          18 :         const char *val = NULL;
     123             : 
     124          18 :         switch (r) {
     125           2 :                 case NTLMSSP_WINDOWS_MINOR_VERSION_0: val = "NTLMSSP_WINDOWS_MINOR_VERSION_0"; break;
     126          16 :                 case NTLMSSP_WINDOWS_MINOR_VERSION_1: val = "NTLMSSP_WINDOWS_MINOR_VERSION_1"; break;
     127           0 :                 case NTLMSSP_WINDOWS_MINOR_VERSION_2: val = "NTLMSSP_WINDOWS_MINOR_VERSION_2"; break;
     128           0 :                 case NTLMSSP_WINDOWS_MINOR_VERSION_3: val = "NTLMSSP_WINDOWS_MINOR_VERSION_3"; break;
     129             :         }
     130          18 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     131          18 : }
     132             : 
     133           5 : static enum ndr_err_code ndr_push_ntlmssp_NTLMRevisionCurrent(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ntlmssp_NTLMRevisionCurrent r)
     134             : {
     135           5 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
     136           0 :         return NDR_ERR_SUCCESS;
     137             : }
     138             : 
     139          18 : static enum ndr_err_code ndr_pull_ntlmssp_NTLMRevisionCurrent(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ntlmssp_NTLMRevisionCurrent *r)
     140             : {
     141          12 :         uint8_t v;
     142          18 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
     143          18 :         *r = v;
     144          18 :         return NDR_ERR_SUCCESS;
     145             : }
     146             : 
     147          18 : _PUBLIC_ void ndr_print_ntlmssp_NTLMRevisionCurrent(struct ndr_print *ndr, const char *name, enum ntlmssp_NTLMRevisionCurrent r)
     148             : {
     149          18 :         const char *val = NULL;
     150             : 
     151          18 :         switch (r) {
     152           0 :                 case NTLMSSP_REVISION_W2K3_RC1: val = "NTLMSSP_REVISION_W2K3_RC1"; break;
     153          16 :                 case NTLMSSP_REVISION_W2K3: val = "NTLMSSP_REVISION_W2K3"; break;
     154             :         }
     155          18 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     156          18 : }
     157             : 
     158           5 : _PUBLIC_ enum ndr_err_code ndr_push_ntlmssp_VERSION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ntlmssp_VERSION *r)
     159             : {
     160           5 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     161           5 :         if (ndr_flags & NDR_SCALARS) {
     162           5 :                 NDR_CHECK(ndr_push_align(ndr, 2));
     163          10 :                 NDR_CHECK(ndr_push_ntlmssp_WindowsMajorVersion(ndr, NDR_SCALARS, r->ProductMajorVersion));
     164          10 :                 NDR_CHECK(ndr_push_ntlmssp_WindowsMinorVersion(ndr, NDR_SCALARS, r->ProductMinorVersion));
     165           5 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ProductBuild));
     166           5 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Reserved, 3));
     167          10 :                 NDR_CHECK(ndr_push_ntlmssp_NTLMRevisionCurrent(ndr, NDR_SCALARS, r->NTLMRevisionCurrent));
     168           5 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
     169             :         }
     170           5 :         if (ndr_flags & NDR_BUFFERS) {
     171           5 :         }
     172           5 :         return NDR_ERR_SUCCESS;
     173             : }
     174             : 
     175          18 : _PUBLIC_ enum ndr_err_code ndr_pull_ntlmssp_VERSION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ntlmssp_VERSION *r)
     176             : {
     177          18 :         uint32_t size_Reserved_0 = 0;
     178          18 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     179          18 :         if (ndr_flags & NDR_SCALARS) {
     180          18 :                 NDR_CHECK(ndr_pull_align(ndr, 2));
     181          30 :                 NDR_CHECK(ndr_pull_ntlmssp_WindowsMajorVersion(ndr, NDR_SCALARS, &r->ProductMajorVersion));
     182          30 :                 NDR_CHECK(ndr_pull_ntlmssp_WindowsMinorVersion(ndr, NDR_SCALARS, &r->ProductMinorVersion));
     183          18 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ProductBuild));
     184          18 :                 size_Reserved_0 = 3;
     185          18 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Reserved, size_Reserved_0));
     186          30 :                 NDR_CHECK(ndr_pull_ntlmssp_NTLMRevisionCurrent(ndr, NDR_SCALARS, &r->NTLMRevisionCurrent));
     187          18 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
     188             :         }
     189          18 :         if (ndr_flags & NDR_BUFFERS) {
     190          12 :         }
     191          18 :         return NDR_ERR_SUCCESS;
     192             : }
     193             : 
     194           0 : static void ndr_print_flags_ntlmssp_VERSION(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ntlmssp_VERSION *r)
     195             : {
     196           0 :         ndr_print_ntlmssp_VERSION(ndr, name, r);
     197           0 : }
     198             : 
     199          18 : _PUBLIC_ void ndr_print_ntlmssp_VERSION(struct ndr_print *ndr, const char *name, const struct ntlmssp_VERSION *r)
     200             : {
     201          18 :         ndr_print_struct(ndr, name, "ntlmssp_VERSION");
     202          18 :         if (r == NULL) { ndr_print_null(ndr); return; }
     203          18 :         ndr->depth++;
     204          18 :         ndr_print_ntlmssp_WindowsMajorVersion(ndr, "ProductMajorVersion", r->ProductMajorVersion);
     205          18 :         ndr_print_ntlmssp_WindowsMinorVersion(ndr, "ProductMinorVersion", r->ProductMinorVersion);
     206          18 :         ndr_print_uint16(ndr, "ProductBuild", r->ProductBuild);
     207          18 :         ndr_print_array_uint8(ndr, "Reserved", r->Reserved, 3);
     208          18 :         ndr_print_ntlmssp_NTLMRevisionCurrent(ndr, "NTLMRevisionCurrent", r->NTLMRevisionCurrent);
     209          18 :         ndr->depth--;
     210             : }
     211             : 
     212           6 : static enum ndr_err_code ndr_push_ntlmssp_Version(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union ntlmssp_Version *r)
     213             : {
     214           6 :         uint32_t level;
     215           6 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     216           6 :         if (ndr_flags & NDR_SCALARS) {
     217             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     218           6 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     219           6 :                 NDR_CHECK(ndr_push_union_align(ndr, 2));
     220           6 :                 switch (level) {
     221           5 :                         case NTLMSSP_NEGOTIATE_VERSION: {
     222           5 :                                 NDR_CHECK(ndr_push_ntlmssp_VERSION(ndr, NDR_SCALARS, &r->version));
     223           0 :                         break; }
     224             : 
     225           0 :                         default: {
     226           0 :                         break; }
     227             : 
     228             :                 }
     229             :         }
     230           0 :         return NDR_ERR_SUCCESS;
     231             : }
     232             : 
     233          40 : static enum ndr_err_code ndr_pull_ntlmssp_Version(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union ntlmssp_Version *r)
     234             : {
     235          28 :         uint32_t level;
     236          40 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     237          40 :         if (ndr_flags & NDR_SCALARS) {
     238             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     239          20 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     240          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 2));
     241          20 :                 switch (level) {
     242          18 :                         case NTLMSSP_NEGOTIATE_VERSION: {
     243          18 :                                 NDR_CHECK(ndr_pull_ntlmssp_VERSION(ndr, NDR_SCALARS, &r->version));
     244           6 :                         break; }
     245             : 
     246           0 :                         default: {
     247           0 :                         break; }
     248             : 
     249             :                 }
     250             :         }
     251          12 :         return NDR_ERR_SUCCESS;
     252             : }
     253             : 
     254           2 : _PUBLIC_ enum ndr_err_code ndr_push_NEGOTIATE_MESSAGE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NEGOTIATE_MESSAGE *r)
     255             : {
     256           2 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     257           2 :         if (ndr_flags & NDR_SCALARS) {
     258           2 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     259           2 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "NTLMSSP", 8, sizeof(uint8_t), CH_DOS));
     260           4 :                 NDR_CHECK(ndr_push_ntlmssp_MessageType(ndr, NDR_SCALARS, NtLmNegotiate));
     261           4 :                 NDR_CHECK(ndr_push_NEGOTIATE(ndr, NDR_SCALARS, r->NegotiateFlags));
     262           2 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->DomainName?strlen(r->DomainName):0));
     263           2 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->DomainName?strlen(r->DomainName):0));
     264             :                 {
     265           2 :                         libndr_flags _flags_save_string = ndr->flags;
     266           2 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     267           2 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->DomainName));
     268           2 :                         ndr->flags = _flags_save_string;
     269             :                 }
     270           2 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Workstation?strlen(r->Workstation):0));
     271           2 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Workstation?strlen(r->Workstation):0));
     272             :                 {
     273           2 :                         libndr_flags _flags_save_string = ndr->flags;
     274           2 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     275           2 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->Workstation));
     276           2 :                         ndr->flags = _flags_save_string;
     277             :                 }
     278           2 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
     279           2 :                 NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
     280           2 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     281             :         }
     282           2 :         if (ndr_flags & NDR_BUFFERS) {
     283             :                 {
     284           2 :                         libndr_flags _flags_save_string = ndr->flags;
     285           2 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     286           2 :                         if (r->DomainName) {
     287           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->DomainName));
     288             :                                 {
     289           0 :                                         struct ndr_push *_ndr_DomainName;
     290           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_DomainName, 0, r->DomainName?strlen(r->DomainName):0));
     291           0 :                                         NDR_CHECK(ndr_push_string(_ndr_DomainName, NDR_SCALARS, r->DomainName));
     292           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_DomainName, 0, r->DomainName?strlen(r->DomainName):0));
     293             :                                 }
     294           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->DomainName));
     295             :                         }
     296           2 :                         ndr->flags = _flags_save_string;
     297             :                 }
     298             :                 {
     299           2 :                         libndr_flags _flags_save_string = ndr->flags;
     300           2 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     301           2 :                         if (r->Workstation) {
     302           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->Workstation));
     303             :                                 {
     304           0 :                                         struct ndr_push *_ndr_Workstation;
     305           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_Workstation, 0, r->Workstation?strlen(r->Workstation):0));
     306           0 :                                         NDR_CHECK(ndr_push_string(_ndr_Workstation, NDR_SCALARS, r->Workstation));
     307           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Workstation, 0, r->Workstation?strlen(r->Workstation):0));
     308             :                                 }
     309           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->Workstation));
     310             :                         }
     311           2 :                         ndr->flags = _flags_save_string;
     312             :                 }
     313           2 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
     314           0 :                 NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
     315             :         }
     316           0 :         return NDR_ERR_SUCCESS;
     317             : }
     318             : 
     319           6 : _PUBLIC_ enum ndr_err_code ndr_pull_NEGOTIATE_MESSAGE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NEGOTIATE_MESSAGE *r)
     320             : {
     321           6 :         uint32_t size_Signature_0 = 0;
     322           4 :         uint32_t _ptr_DomainName;
     323           6 :         TALLOC_CTX *_mem_save_DomainName_0 = NULL;
     324           4 :         uint32_t _ptr_Workstation;
     325           6 :         TALLOC_CTX *_mem_save_Workstation_0 = NULL;
     326           6 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     327           6 :         if (ndr_flags & NDR_SCALARS) {
     328           6 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     329           6 :                 size_Signature_0 = 8;
     330           6 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, size_Signature_0, sizeof(uint8_t), CH_DOS));
     331          10 :                 NDR_CHECK(ndr_pull_ntlmssp_MessageType(ndr, NDR_SCALARS, &r->MessageType));
     332          10 :                 NDR_CHECK(ndr_pull_NEGOTIATE(ndr, NDR_SCALARS, &r->NegotiateFlags));
     333           6 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DomainNameLen));
     334           6 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DomainNameMaxLen));
     335             :                 {
     336           6 :                         libndr_flags _flags_save_string = ndr->flags;
     337           6 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     338           6 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DomainName));
     339           6 :                         if (_ptr_DomainName) {
     340           2 :                                 NDR_PULL_ALLOC(ndr, r->DomainName);
     341           2 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DomainName, _ptr_DomainName));
     342             :                         } else {
     343           4 :                                 r->DomainName = NULL;
     344             :                         }
     345           6 :                         ndr->flags = _flags_save_string;
     346             :                 }
     347           6 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WorkstationLen));
     348           6 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WorkstationMaxLen));
     349             :                 {
     350           6 :                         libndr_flags _flags_save_string = ndr->flags;
     351           6 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     352           6 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Workstation));
     353           6 :                         if (_ptr_Workstation) {
     354           2 :                                 NDR_PULL_ALLOC(ndr, r->Workstation);
     355           2 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->Workstation, _ptr_Workstation));
     356             :                         } else {
     357           4 :                                 r->Workstation = NULL;
     358             :                         }
     359           6 :                         ndr->flags = _flags_save_string;
     360             :                 }
     361           6 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
     362           6 :                 NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
     363           6 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     364             :         }
     365           6 :         if (ndr_flags & NDR_BUFFERS) {
     366             :                 {
     367           6 :                         libndr_flags _flags_save_string = ndr->flags;
     368           6 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     369           6 :                         if (r->DomainName) {
     370           0 :                                 uint32_t _relative_save_offset;
     371           2 :                                 _relative_save_offset = ndr->offset;
     372           2 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DomainName));
     373           2 :                                 _mem_save_DomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
     374           2 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->DomainName, 0);
     375             :                                 {
     376           0 :                                         struct ndr_pull *_ndr_DomainName;
     377           2 :                                         ssize_t sub_size = r->DomainNameLen;
     378           2 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_DomainName, 0, sub_size));
     379           2 :                                         NDR_CHECK(ndr_pull_string(_ndr_DomainName, NDR_SCALARS, &r->DomainName));
     380           2 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_DomainName, 0, sub_size));
     381             :                                 }
     382           2 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DomainName_0, 0);
     383           2 :                                 if (ndr->offset > ndr->relative_highest_offset) {
     384           2 :                                         ndr->relative_highest_offset = ndr->offset;
     385             :                                 }
     386           2 :                                 ndr->offset = _relative_save_offset;
     387             :                         }
     388           6 :                         ndr->flags = _flags_save_string;
     389             :                 }
     390             :                 {
     391           6 :                         libndr_flags _flags_save_string = ndr->flags;
     392           6 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     393           6 :                         if (r->Workstation) {
     394           0 :                                 uint32_t _relative_save_offset;
     395           2 :                                 _relative_save_offset = ndr->offset;
     396           2 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->Workstation));
     397           2 :                                 _mem_save_Workstation_0 = NDR_PULL_GET_MEM_CTX(ndr);
     398           2 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->Workstation, 0);
     399             :                                 {
     400           0 :                                         struct ndr_pull *_ndr_Workstation;
     401           2 :                                         ssize_t sub_size = r->WorkstationLen;
     402           2 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_Workstation, 0, sub_size));
     403           2 :                                         NDR_CHECK(ndr_pull_string(_ndr_Workstation, NDR_SCALARS, &r->Workstation));
     404           2 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Workstation, 0, sub_size));
     405             :                                 }
     406           2 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Workstation_0, 0);
     407           2 :                                 if (ndr->offset > ndr->relative_highest_offset) {
     408           0 :                                         ndr->relative_highest_offset = ndr->offset;
     409             :                                 }
     410           2 :                                 ndr->offset = _relative_save_offset;
     411             :                         }
     412           6 :                         ndr->flags = _flags_save_string;
     413             :                 }
     414           6 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
     415           6 :                 NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
     416             :         }
     417           2 :         return NDR_ERR_SUCCESS;
     418             : }
     419             : 
     420           0 : static void ndr_print_flags_NEGOTIATE_MESSAGE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NEGOTIATE_MESSAGE *r)
     421             : {
     422           0 :         ndr_print_NEGOTIATE_MESSAGE(ndr, name, r);
     423           0 : }
     424             : 
     425           6 : _PUBLIC_ void ndr_print_NEGOTIATE_MESSAGE(struct ndr_print *ndr, const char *name, const struct NEGOTIATE_MESSAGE *r)
     426             : {
     427           6 :         ndr_print_struct(ndr, name, "NEGOTIATE_MESSAGE");
     428           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
     429           6 :         ndr->depth++;
     430           6 :         ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"NTLMSSP":r->Signature);
     431           6 :         ndr_print_ntlmssp_MessageType(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NtLmNegotiate:r->MessageType);
     432           6 :         ndr_print_NEGOTIATE(ndr, "NegotiateFlags", r->NegotiateFlags);
     433           6 :         ndr_print_uint16(ndr, "DomainNameLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->DomainName?strlen(r->DomainName):0:r->DomainNameLen);
     434           6 :         ndr_print_uint16(ndr, "DomainNameMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->DomainNameLen:r->DomainNameMaxLen);
     435             :         {
     436           6 :                 libndr_flags _flags_save_string = ndr->flags;
     437           6 :                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     438           6 :                 ndr_print_ptr(ndr, "DomainName", r->DomainName);
     439           6 :                 ndr->depth++;
     440           6 :                 if (r->DomainName) {
     441           2 :                         ndr_print_string(ndr, "DomainName", r->DomainName);
     442             :                 }
     443           6 :                 ndr->depth--;
     444           6 :                 ndr->flags = _flags_save_string;
     445             :         }
     446           6 :         ndr_print_uint16(ndr, "WorkstationLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->Workstation?strlen(r->Workstation):0:r->WorkstationLen);
     447           6 :         ndr_print_uint16(ndr, "WorkstationMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->WorkstationLen:r->WorkstationMaxLen);
     448             :         {
     449           6 :                 libndr_flags _flags_save_string = ndr->flags;
     450           6 :                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM));
     451           6 :                 ndr_print_ptr(ndr, "Workstation", r->Workstation);
     452           6 :                 ndr->depth++;
     453           6 :                 if (r->Workstation) {
     454           2 :                         ndr_print_string(ndr, "Workstation", r->Workstation);
     455             :                 }
     456           6 :                 ndr->depth--;
     457           6 :                 ndr->flags = _flags_save_string;
     458             :         }
     459           6 :         ndr_print_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION);
     460           6 :         ndr_print_ntlmssp_Version(ndr, "Version", &r->Version);
     461           6 :         ndr->depth--;
     462             : }
     463             : 
     464      585502 : static enum ndr_err_code ndr_push_ntlmssp_AvId(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum ntlmssp_AvId r)
     465             : {
     466      585502 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
     467      583184 :         return NDR_ERR_SUCCESS;
     468             : }
     469             : 
     470      599796 : static enum ndr_err_code ndr_pull_ntlmssp_AvId(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum ntlmssp_AvId *r)
     471             : {
     472        5688 :         uint16_t v;
     473      599796 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
     474      599796 :         *r = v;
     475      599796 :         return NDR_ERR_SUCCESS;
     476             : }
     477             : 
     478          68 : _PUBLIC_ void ndr_print_ntlmssp_AvId(struct ndr_print *ndr, const char *name, enum ntlmssp_AvId r)
     479             : {
     480          68 :         const char *val = NULL;
     481             : 
     482          68 :         switch (r) {
     483          10 :                 case MsvAvEOL: val = "MsvAvEOL"; break;
     484          10 :                 case MsvAvNbComputerName: val = "MsvAvNbComputerName"; break;
     485          10 :                 case MsvAvNbDomainName: val = "MsvAvNbDomainName"; break;
     486          10 :                 case MsvAvDnsComputerName: val = "MsvAvDnsComputerName"; break;
     487          10 :                 case MsvAvDnsDomainName: val = "MsvAvDnsDomainName"; break;
     488           0 :                 case MsvAvDnsTreeName: val = "MsvAvDnsTreeName"; break;
     489           2 :                 case MsvAvFlags: val = "MsvAvFlags"; break;
     490           4 :                 case MsvAvTimestamp: val = "MsvAvTimestamp"; break;
     491           4 :                 case MsvAvSingleHost: val = "MsvAvSingleHost"; break;
     492           4 :                 case MsvAvTargetName: val = "MsvAvTargetName"; break;
     493           4 :                 case MsvChannelBindings: val = "MsvChannelBindings"; break;
     494             :         }
     495          68 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     496          68 : }
     497             : 
     498      146200 : static enum ndr_err_code ndr_push_ntlmssp_SingleHostData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ntlmssp_SingleHostData *r)
     499             : {
     500             :         {
     501      146200 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     502      146200 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     503      146200 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     504      146200 :                 if (ndr_flags & NDR_SCALARS) {
     505      146200 :                         NDR_CHECK(ndr_push_align(ndr, 4));
     506      146200 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 8 + ndr_size_LSAP_TOKEN_INFO_INTEGRITY(&r->token_info, 0) + r->remaining.length));
     507      146200 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
     508      146200 :                         NDR_CHECK(ndr_push_LSAP_TOKEN_INFO_INTEGRITY(ndr, NDR_SCALARS, &r->token_info));
     509             :                         {
     510      146200 :                                 libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     511      146200 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     512      146200 :                                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->remaining));
     513      146200 :                                 ndr->flags = _flags_save_DATA_BLOB;
     514             :                         }
     515      146200 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     516             :                 }
     517      146200 :                 if (ndr_flags & NDR_BUFFERS) {
     518         552 :                 }
     519      146200 :                 ndr->flags = _flags_save_STRUCT;
     520             :         }
     521      146200 :         return NDR_ERR_SUCCESS;
     522             : }
     523             : 
     524       35976 : static enum ndr_err_code ndr_pull_ntlmssp_SingleHostData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ntlmssp_SingleHostData *r)
     525             : {
     526             :         {
     527       35976 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     528       35976 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     529       35976 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     530       35976 :                 if (ndr_flags & NDR_SCALARS) {
     531       35976 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
     532       35976 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Size));
     533       35976 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Z4));
     534       35976 :                         NDR_CHECK(ndr_pull_LSAP_TOKEN_INFO_INTEGRITY(ndr, NDR_SCALARS, &r->token_info));
     535             :                         {
     536       35976 :                                 libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     537       35976 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     538       35976 :                                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->remaining));
     539       35976 :                                 ndr->flags = _flags_save_DATA_BLOB;
     540             :                         }
     541       35976 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     542             :                 }
     543       35976 :                 if (ndr_flags & NDR_BUFFERS) {
     544         138 :                 }
     545       35976 :                 ndr->flags = _flags_save_STRUCT;
     546             :         }
     547       35976 :         return NDR_ERR_SUCCESS;
     548             : }
     549             : 
     550           4 : _PUBLIC_ void ndr_print_ntlmssp_SingleHostData(struct ndr_print *ndr, const char *name, const struct ntlmssp_SingleHostData *r)
     551             : {
     552           4 :         ndr_print_struct(ndr, name, "ntlmssp_SingleHostData");
     553           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     554             :         {
     555           4 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     556           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     557           4 :                 ndr->depth++;
     558           4 :                 ndr_print_uint32(ndr, "Size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8 + ndr_size_LSAP_TOKEN_INFO_INTEGRITY(&r->token_info, 0) + r->remaining.length:r->Size);
     559           4 :                 ndr_print_uint32(ndr, "Z4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->Z4);
     560           4 :                 ndr_print_LSAP_TOKEN_INFO_INTEGRITY(ndr, "token_info", &r->token_info);
     561             :                 {
     562           4 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     563           4 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     564           4 :                         ndr_print_DATA_BLOB(ndr, "remaining", r->remaining);
     565           4 :                         ndr->flags = _flags_save_DATA_BLOB;
     566             :                 }
     567           4 :                 ndr->depth--;
     568           4 :                 ndr->flags = _flags_save_STRUCT;
     569             :         }
     570             : }
     571             : 
     572      139260 : static enum ndr_err_code ndr_push_ntlmssp_AvFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
     573             : {
     574      139260 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     575      138708 :         return NDR_ERR_SUCCESS;
     576             : }
     577             : 
     578       34212 : static enum ndr_err_code ndr_pull_ntlmssp_AvFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
     579             : {
     580         136 :         uint32_t v;
     581       34212 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     582       34212 :         *r = v;
     583       34212 :         return NDR_ERR_SUCCESS;
     584             : }
     585             : 
     586           2 : _PUBLIC_ void ndr_print_ntlmssp_AvFlags(struct ndr_print *ndr, const char *name, uint32_t r)
     587             : {
     588           2 :         ndr_print_uint32(ndr, name, r);
     589           2 :         ndr->depth++;
     590           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_AVFLAG_CONSTRAINTED_ACCOUNT", NTLMSSP_AVFLAG_CONSTRAINTED_ACCOUNT, r);
     591           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_AVFLAG_MIC_IN_AUTHENTICATE_MESSAGE", NTLMSSP_AVFLAG_MIC_IN_AUTHENTICATE_MESSAGE, r);
     592           2 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NTLMSSP_AVFLAG_TARGET_SPN_FROM_UNTRUSTED_SOURCE", NTLMSSP_AVFLAG_TARGET_SPN_FROM_UNTRUSTED_SOURCE, r);
     593           2 :         ndr->depth--;
     594           2 : }
     595             : 
     596     2342008 : static enum ndr_err_code ndr_push_ntlmssp_AvValue(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union ntlmssp_AvValue *r)
     597             : {
     598        9272 :         uint32_t level;
     599             :         {
     600     2342008 :                 libndr_flags _flags_save_UNION = ndr->flags;
     601     2342008 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     602     2342008 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     603     2342008 :                 if (ndr_flags & NDR_SCALARS) {
     604             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     605     2342008 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     606     2342008 :                         NDR_CHECK(ndr_push_union_align(ndr, 4));
     607     2342008 :                         switch (level) {
     608      295340 :                                 case MsvAvEOL: {
     609      295340 :                                 break; }
     610             : 
     611      296524 :                                 case MsvAvNbComputerName: {
     612             :                                         {
     613      296524 :                                                 libndr_flags _flags_save_string = ndr->flags;
     614      296524 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     615      296524 :                                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvNbComputerName));
     616      295340 :                                                 ndr->flags = _flags_save_string;
     617             :                                         }
     618      295340 :                                 break; }
     619             : 
     620      296524 :                                 case MsvAvNbDomainName: {
     621             :                                         {
     622      296524 :                                                 libndr_flags _flags_save_string = ndr->flags;
     623      296524 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     624      296524 :                                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvNbDomainName));
     625      295340 :                                                 ndr->flags = _flags_save_string;
     626             :                                         }
     627      295340 :                                 break; }
     628             : 
     629      296036 :                                 case MsvAvDnsComputerName: {
     630             :                                         {
     631      296036 :                                                 libndr_flags _flags_save_string = ndr->flags;
     632      296036 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     633      296036 :                                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvDnsComputerName));
     634      294852 :                                                 ndr->flags = _flags_save_string;
     635             :                                         }
     636      294852 :                                 break; }
     637             : 
     638      296036 :                                 case MsvAvDnsDomainName: {
     639             :                                         {
     640      296036 :                                                 libndr_flags _flags_save_string = ndr->flags;
     641      296036 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     642      296036 :                                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvDnsDomainName));
     643      294852 :                                                 ndr->flags = _flags_save_string;
     644             :                                         }
     645      294852 :                                 break; }
     646             : 
     647           0 :                                 case MsvAvDnsTreeName: {
     648             :                                         {
     649           0 :                                                 libndr_flags _flags_save_string = ndr->flags;
     650           0 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     651           0 :                                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvDnsTreeName));
     652           0 :                                                 ndr->flags = _flags_save_string;
     653             :                                         }
     654           0 :                                 break; }
     655             : 
     656      139260 :                                 case MsvAvFlags: {
     657      139812 :                                         NDR_CHECK(ndr_push_ntlmssp_AvFlags(ndr, NDR_SCALARS, r->AvFlags));
     658      138708 :                                 break; }
     659             : 
     660      284228 :                                 case MsvAvTimestamp: {
     661      284228 :                                         NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->AvTimestamp));
     662      283084 :                                 break; }
     663             : 
     664      146200 :                                 case MsvAvSingleHost: {
     665      146200 :                                         NDR_CHECK(ndr_push_ntlmssp_SingleHostData(ndr, NDR_SCALARS, &r->AvSingleHost));
     666      145648 :                                 break; }
     667             : 
     668      144476 :                                 case MsvAvTargetName: {
     669             :                                         {
     670      144476 :                                                 libndr_flags _flags_save_string = ndr->flags;
     671      144476 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     672      144476 :                                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->AvTargetName));
     673      143924 :                                                 ndr->flags = _flags_save_string;
     674             :                                         }
     675      143924 :                                 break; }
     676             : 
     677      146200 :                                 case MsvChannelBindings: {
     678      146200 :                                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ChannelBindings, 16));
     679      145648 :                                 break; }
     680             : 
     681           0 :                                 default: {
     682             :                                         {
     683           0 :                                                 libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     684           0 :                                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     685           0 :                                                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
     686           0 :                                                 ndr->flags = _flags_save_DATA_BLOB;
     687             :                                         }
     688           0 :                                 break; }
     689             : 
     690             :                         }
     691             :                 }
     692     2342008 :                 ndr->flags = _flags_save_UNION;
     693             :         }
     694     2342008 :         return NDR_ERR_SUCCESS;
     695             : }
     696             : 
     697      599784 : static enum ndr_err_code ndr_pull_ntlmssp_AvValue(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union ntlmssp_AvValue *r)
     698             : {
     699        5686 :         uint32_t level;
     700      599784 :         uint32_t size_ChannelBindings_0 = 0;
     701             :         {
     702      599784 :                 libndr_flags _flags_save_UNION = ndr->flags;
     703      599784 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     704      599784 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     705      599784 :                 if (ndr_flags & NDR_SCALARS) {
     706             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     707      599784 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     708      599784 :                         NDR_CHECK(ndr_pull_union_align(ndr, 4));
     709      599784 :                         switch (level) {
     710       79700 :                                 case MsvAvEOL: {
     711       79700 :                                 break; }
     712             : 
     713       81134 :                                 case MsvAvNbComputerName: {
     714             :                                         {
     715       81134 :                                                 libndr_flags _flags_save_string = ndr->flags;
     716       81134 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     717       81134 :                                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvNbComputerName));
     718       79700 :                                                 ndr->flags = _flags_save_string;
     719             :                                         }
     720       79700 :                                 break; }
     721             : 
     722       81134 :                                 case MsvAvNbDomainName: {
     723             :                                         {
     724       81134 :                                                 libndr_flags _flags_save_string = ndr->flags;
     725       81134 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     726       81134 :                                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvNbDomainName));
     727       79700 :                                                 ndr->flags = _flags_save_string;
     728             :                                         }
     729       79700 :                                 break; }
     730             : 
     731       72556 :                                 case MsvAvDnsComputerName: {
     732             :                                         {
     733       72556 :                                                 libndr_flags _flags_save_string = ndr->flags;
     734       72556 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     735       72556 :                                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvDnsComputerName));
     736       72276 :                                                 ndr->flags = _flags_save_string;
     737             :                                         }
     738       72276 :                                 break; }
     739             : 
     740       72556 :                                 case MsvAvDnsDomainName: {
     741             :                                         {
     742       72556 :                                                 libndr_flags _flags_save_string = ndr->flags;
     743       72556 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     744       72556 :                                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvDnsDomainName));
     745       72276 :                                                 ndr->flags = _flags_save_string;
     746             :                                         }
     747       72276 :                                 break; }
     748             : 
     749           0 :                                 case MsvAvDnsTreeName: {
     750             :                                         {
     751           0 :                                                 libndr_flags _flags_save_string = ndr->flags;
     752           0 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     753           0 :                                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvDnsTreeName));
     754           0 :                                                 ndr->flags = _flags_save_string;
     755             :                                         }
     756           0 :                                 break; }
     757             : 
     758       34212 :                                 case MsvAvFlags: {
     759       34348 :                                         NDR_CHECK(ndr_pull_ntlmssp_AvFlags(ndr, NDR_SCALARS, &r->AvFlags));
     760       34076 :                                 break; }
     761             : 
     762       69586 :                                 case MsvAvTimestamp: {
     763       69586 :                                         NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->AvTimestamp));
     764       69312 :                                 break; }
     765             : 
     766       35976 :                                 case MsvAvSingleHost: {
     767       35976 :                                         NDR_CHECK(ndr_pull_ntlmssp_SingleHostData(ndr, NDR_SCALARS, &r->AvSingleHost));
     768       35838 :                                 break; }
     769             : 
     770       35520 :                                 case MsvAvTargetName: {
     771             :                                         {
     772       35520 :                                                 libndr_flags _flags_save_string = ndr->flags;
     773       35520 :                                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     774       35520 :                                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->AvTargetName));
     775       35382 :                                                 ndr->flags = _flags_save_string;
     776             :                                         }
     777       35382 :                                 break; }
     778             : 
     779       35976 :                                 case MsvChannelBindings: {
     780       35976 :                                         size_ChannelBindings_0 = 16;
     781       35976 :                                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ChannelBindings, size_ChannelBindings_0));
     782       35838 :                                 break; }
     783             : 
     784           0 :                                 default: {
     785             :                                         {
     786           0 :                                                 libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     787           0 :                                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     788           0 :                                                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob));
     789           0 :                                                 ndr->flags = _flags_save_DATA_BLOB;
     790             :                                         }
     791           0 :                                 break; }
     792             : 
     793             :                         }
     794             :                 }
     795      599784 :                 ndr->flags = _flags_save_UNION;
     796             :         }
     797      599784 :         return NDR_ERR_SUCCESS;
     798             : }
     799             : 
     800          68 : _PUBLIC_ void ndr_print_ntlmssp_AvValue(struct ndr_print *ndr, const char *name, const union ntlmssp_AvValue *r)
     801             : {
     802          36 :         uint32_t level;
     803             :         {
     804          68 :                 libndr_flags _flags_save_UNION = ndr->flags;
     805          68 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     806          68 :                 level = ndr_print_steal_switch_value(ndr, r);
     807          68 :                 ndr_print_union(ndr, name, level, "ntlmssp_AvValue");
     808          68 :                 switch (level) {
     809           4 :                         case MsvAvEOL:
     810           4 :                         break;
     811             : 
     812          10 :                         case MsvAvNbComputerName:
     813             :                                 {
     814          10 :                                         libndr_flags _flags_save_string = ndr->flags;
     815          10 :                                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     816          10 :                                         ndr_print_string(ndr, "AvNbComputerName", r->AvNbComputerName);
     817          10 :                                         ndr->flags = _flags_save_string;
     818             :                                 }
     819          10 :                         break;
     820             : 
     821          10 :                         case MsvAvNbDomainName:
     822             :                                 {
     823          10 :                                         libndr_flags _flags_save_string = ndr->flags;
     824          10 :                                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     825          10 :                                         ndr_print_string(ndr, "AvNbDomainName", r->AvNbDomainName);
     826          10 :                                         ndr->flags = _flags_save_string;
     827             :                                 }
     828          10 :                         break;
     829             : 
     830          10 :                         case MsvAvDnsComputerName:
     831             :                                 {
     832          10 :                                         libndr_flags _flags_save_string = ndr->flags;
     833          10 :                                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     834          10 :                                         ndr_print_string(ndr, "AvDnsComputerName", r->AvDnsComputerName);
     835          10 :                                         ndr->flags = _flags_save_string;
     836             :                                 }
     837          10 :                         break;
     838             : 
     839          10 :                         case MsvAvDnsDomainName:
     840             :                                 {
     841          10 :                                         libndr_flags _flags_save_string = ndr->flags;
     842          10 :                                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     843          10 :                                         ndr_print_string(ndr, "AvDnsDomainName", r->AvDnsDomainName);
     844          10 :                                         ndr->flags = _flags_save_string;
     845             :                                 }
     846          10 :                         break;
     847             : 
     848           0 :                         case MsvAvDnsTreeName:
     849             :                                 {
     850           0 :                                         libndr_flags _flags_save_string = ndr->flags;
     851           0 :                                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     852           0 :                                         ndr_print_string(ndr, "AvDnsTreeName", r->AvDnsTreeName);
     853           0 :                                         ndr->flags = _flags_save_string;
     854             :                                 }
     855           0 :                         break;
     856             : 
     857           2 :                         case MsvAvFlags:
     858           2 :                                 ndr_print_ntlmssp_AvFlags(ndr, "AvFlags", r->AvFlags);
     859           2 :                         break;
     860             : 
     861           4 :                         case MsvAvTimestamp:
     862           4 :                                 ndr_print_NTTIME(ndr, "AvTimestamp", r->AvTimestamp);
     863           4 :                         break;
     864             : 
     865           4 :                         case MsvAvSingleHost:
     866           4 :                                 ndr_print_ntlmssp_SingleHostData(ndr, "AvSingleHost", &r->AvSingleHost);
     867           4 :                         break;
     868             : 
     869           4 :                         case MsvAvTargetName:
     870             :                                 {
     871           4 :                                         libndr_flags _flags_save_string = ndr->flags;
     872           4 :                                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE));
     873           4 :                                         ndr_print_string(ndr, "AvTargetName", r->AvTargetName);
     874           4 :                                         ndr->flags = _flags_save_string;
     875             :                                 }
     876           4 :                         break;
     877             : 
     878           4 :                         case MsvChannelBindings:
     879           4 :                                 ndr_print_array_uint8(ndr, "ChannelBindings", r->ChannelBindings, 16);
     880           4 :                         break;
     881             : 
     882           0 :                         default:
     883             :                                 {
     884           0 :                                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     885           0 :                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     886           0 :                                         ndr_print_DATA_BLOB(ndr, "blob", r->blob);
     887           0 :                                         ndr->flags = _flags_save_DATA_BLOB;
     888             :                                 }
     889           0 :                         break;
     890             : 
     891             :                 }
     892          68 :                 ndr->flags = _flags_save_UNION;
     893             :         }
     894          68 : }
     895             : 
     896     1756506 : static size_t ndr_size_ntlmssp_AvValue(const union ntlmssp_AvValue *r, uint32_t level, libndr_flags flags)
     897             : {
     898     1756506 :         flags |= LIBNDR_FLAG_NOALIGN;
     899     1756506 :         return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_ntlmssp_AvValue);
     900             : }
     901             : 
     902     1171004 : _PUBLIC_ enum ndr_err_code ndr_push_AV_PAIR(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct AV_PAIR *r)
     903             : {
     904             :         {
     905     1171004 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     906     1171004 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     907     1171004 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     908     1171004 :                 if (ndr_flags & NDR_SCALARS) {
     909      585502 :                         NDR_CHECK(ndr_push_align(ndr, 4));
     910      587820 :                         NDR_CHECK(ndr_push_ntlmssp_AvId(ndr, NDR_SCALARS, r->AvId));
     911      585502 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, 0)));
     912             :                         {
     913        2318 :                                 struct ndr_push *_ndr_Value;
     914      585502 :                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_Value, 0, ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, 0)));
     915      585502 :                                 NDR_CHECK(ndr_push_set_switch_value(_ndr_Value, &r->Value, r->AvId));
     916      585502 :                                 NDR_CHECK(ndr_push_ntlmssp_AvValue(_ndr_Value, NDR_SCALARS|NDR_BUFFERS, &r->Value));
     917      585502 :                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Value, 0, ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, 0)));
     918             :                         }
     919      585502 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     920             :                 }
     921     1171004 :                 if (ndr_flags & NDR_BUFFERS) {
     922        4636 :                 }
     923     1171004 :                 ndr->flags = _flags_save_STRUCT;
     924             :         }
     925     1171004 :         return NDR_ERR_SUCCESS;
     926             : }
     927             : 
     928     1199580 : _PUBLIC_ enum ndr_err_code ndr_pull_AV_PAIR(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct AV_PAIR *r)
     929             : {
     930             :         {
     931     1199580 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     932     1199580 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     933     1199580 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     934     1199580 :                 if (ndr_flags & NDR_SCALARS) {
     935      599796 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
     936      605484 :                         NDR_CHECK(ndr_pull_ntlmssp_AvId(ndr, NDR_SCALARS, &r->AvId));
     937      599796 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->AvLen));
     938             :                         {
     939        5688 :                                 struct ndr_pull *_ndr_Value;
     940      599796 :                                 ssize_t sub_size = r->AvLen;
     941      599796 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_Value, 0, sub_size));
     942      599784 :                                 NDR_CHECK(ndr_pull_set_switch_value(_ndr_Value, &r->Value, r->AvId));
     943      599784 :                                 NDR_CHECK(ndr_pull_ntlmssp_AvValue(_ndr_Value, NDR_SCALARS|NDR_BUFFERS, &r->Value));
     944      599784 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Value, 0, sub_size));
     945             :                         }
     946      599784 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     947             :                 }
     948     1199568 :                 if (ndr_flags & NDR_BUFFERS) {
     949       11372 :                 }
     950     1199568 :                 ndr->flags = _flags_save_STRUCT;
     951             :         }
     952     1199568 :         return NDR_ERR_SUCCESS;
     953             : }
     954             : 
     955           0 : static void ndr_print_flags_AV_PAIR(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct AV_PAIR *r)
     956             : {
     957           0 :         ndr_print_AV_PAIR(ndr, name, r);
     958           0 : }
     959             : 
     960          68 : _PUBLIC_ void ndr_print_AV_PAIR(struct ndr_print *ndr, const char *name, const struct AV_PAIR *r)
     961             : {
     962          68 :         ndr_print_struct(ndr, name, "AV_PAIR");
     963          68 :         if (r == NULL) { ndr_print_null(ndr); return; }
     964             :         {
     965          68 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     966          68 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     967          68 :                 ndr->depth++;
     968          68 :                 ndr_print_ntlmssp_AvId(ndr, "AvId", r->AvId);
     969          68 :                 ndr_print_uint16(ndr, "AvLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, 0):r->AvLen);
     970          68 :                 ndr_print_set_switch_value(ndr, &r->Value, r->AvId);
     971          68 :                 ndr_print_ntlmssp_AvValue(ndr, "Value", &r->Value);
     972          68 :                 ndr->depth--;
     973          68 :                 ndr->flags = _flags_save_STRUCT;
     974             :         }
     975             : }
     976             : 
     977           0 : static void ndr_print_flags_AV_PAIR_LIST(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct AV_PAIR_LIST *r)
     978             : {
     979           0 :         ndr_print_AV_PAIR_LIST(ndr, name, r);
     980           0 : }
     981             : 
     982          10 : _PUBLIC_ void ndr_print_AV_PAIR_LIST(struct ndr_print *ndr, const char *name, const struct AV_PAIR_LIST *r)
     983             : {
     984           6 :         uint32_t cntr_pair_0;
     985          10 :         ndr_print_struct(ndr, name, "AV_PAIR_LIST");
     986          10 :         if (r == NULL) { ndr_print_null(ndr); return; }
     987             :         {
     988          10 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     989          10 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     990          10 :                 ndr->depth++;
     991          10 :                 ndr_print_uint32(ndr, "count", r->count);
     992          10 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pair", (uint32_t)(r->count));
     993          10 :                 ndr->depth++;
     994          78 :                 for (cntr_pair_0 = 0; cntr_pair_0 < (r->count); cntr_pair_0++) {
     995          68 :                         ndr_print_AV_PAIR(ndr, "pair", &r->pair[cntr_pair_0]);
     996             :                 }
     997          10 :                 ndr->depth--;
     998          10 :                 ndr->depth--;
     999          10 :                 ndr->flags = _flags_save_STRUCT;
    1000             :         }
    1001             : }
    1002             : 
    1003          10 : _PUBLIC_ size_t ndr_size_AV_PAIR_LIST(const struct AV_PAIR_LIST *r, libndr_flags flags)
    1004             : {
    1005          10 :         flags |= LIBNDR_FLAG_NOALIGN;
    1006          10 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_AV_PAIR_LIST);
    1007             : }
    1008             : 
    1009           3 : _PUBLIC_ enum ndr_err_code ndr_push_CHALLENGE_MESSAGE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct CHALLENGE_MESSAGE *r)
    1010             : {
    1011             :         {
    1012           3 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1013           3 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1014           3 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1015           3 :                 if (ndr_flags & NDR_SCALARS) {
    1016           3 :                         NDR_CHECK(ndr_push_align(ndr, 5));
    1017           3 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "NTLMSSP", 8, sizeof(uint8_t), CH_DOS));
    1018           6 :                         NDR_CHECK(ndr_push_ntlmssp_MessageType(ndr, NDR_SCALARS, NtLmChallenge));
    1019           3 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName)));
    1020           3 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName)));
    1021             :                         {
    1022           3 :                                 libndr_flags _flags_save_string = ndr->flags;
    1023           3 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1024           3 :                                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->TargetName));
    1025           3 :                                 ndr->flags = _flags_save_string;
    1026             :                         }
    1027           6 :                         NDR_CHECK(ndr_push_NEGOTIATE(ndr, NDR_SCALARS, r->NegotiateFlags));
    1028           3 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ServerChallenge, 8));
    1029           3 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Reserved, 8));
    1030           3 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->flags)));
    1031           3 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->flags)));
    1032           3 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->TargetInfo));
    1033           3 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
    1034           3 :                         NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
    1035           3 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1036             :                 }
    1037           3 :                 if (ndr_flags & NDR_BUFFERS) {
    1038             :                         {
    1039           3 :                                 libndr_flags _flags_save_string = ndr->flags;
    1040           3 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1041           3 :                                 if (r->TargetName) {
    1042           3 :                                         NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->TargetName));
    1043             :                                         {
    1044           3 :                                                 struct ndr_push *_ndr_TargetName;
    1045           3 :                                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_TargetName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName)));
    1046           3 :                                                 NDR_CHECK(ndr_push_string(_ndr_TargetName, NDR_SCALARS, r->TargetName));
    1047           3 :                                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_TargetName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName)));
    1048             :                                         }
    1049           3 :                                         NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->TargetName));
    1050             :                                 }
    1051           3 :                                 ndr->flags = _flags_save_string;
    1052             :                         }
    1053           3 :                         if (r->TargetInfo) {
    1054           2 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->TargetInfo));
    1055             :                                 {
    1056           2 :                                         struct ndr_push *_ndr_TargetInfo;
    1057           2 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_TargetInfo, 0, ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->flags)));
    1058           2 :                                         NDR_CHECK(ndr_push_AV_PAIR_LIST(_ndr_TargetInfo, NDR_SCALARS|NDR_BUFFERS, r->TargetInfo));
    1059           2 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_TargetInfo, 0, ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->flags)));
    1060             :                                 }
    1061           2 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->TargetInfo));
    1062             :                         }
    1063           3 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
    1064           3 :                         NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
    1065             :                 }
    1066           3 :                 ndr->flags = _flags_save_STRUCT;
    1067             :         }
    1068           3 :         return NDR_ERR_SUCCESS;
    1069             : }
    1070             : 
    1071           8 : _PUBLIC_ enum ndr_err_code ndr_pull_CHALLENGE_MESSAGE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct CHALLENGE_MESSAGE *r)
    1072             : {
    1073           8 :         uint32_t size_Signature_0 = 0;
    1074           6 :         uint32_t _ptr_TargetName;
    1075           8 :         TALLOC_CTX *_mem_save_TargetName_0 = NULL;
    1076           8 :         uint32_t size_ServerChallenge_0 = 0;
    1077           8 :         uint32_t size_Reserved_0 = 0;
    1078           6 :         uint32_t _ptr_TargetInfo;
    1079           8 :         TALLOC_CTX *_mem_save_TargetInfo_0 = NULL;
    1080             :         {
    1081           8 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1082           8 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1083           8 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1084           8 :                 if (ndr_flags & NDR_SCALARS) {
    1085           8 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
    1086           8 :                         size_Signature_0 = 8;
    1087           8 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, size_Signature_0, sizeof(uint8_t), CH_DOS));
    1088          14 :                         NDR_CHECK(ndr_pull_ntlmssp_MessageType(ndr, NDR_SCALARS, &r->MessageType));
    1089           8 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->TargetNameLen));
    1090           8 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->TargetNameMaxLen));
    1091             :                         {
    1092           8 :                                 libndr_flags _flags_save_string = ndr->flags;
    1093           8 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1094           8 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TargetName));
    1095           8 :                                 if (_ptr_TargetName) {
    1096           8 :                                         NDR_PULL_ALLOC(ndr, r->TargetName);
    1097           8 :                                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->TargetName, _ptr_TargetName));
    1098             :                                 } else {
    1099           0 :                                         r->TargetName = NULL;
    1100             :                                 }
    1101           8 :                                 ndr->flags = _flags_save_string;
    1102             :                         }
    1103          14 :                         NDR_CHECK(ndr_pull_NEGOTIATE(ndr, NDR_SCALARS, &r->NegotiateFlags));
    1104           8 :                         size_ServerChallenge_0 = 8;
    1105           8 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ServerChallenge, size_ServerChallenge_0));
    1106           8 :                         size_Reserved_0 = 8;
    1107           8 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Reserved, size_Reserved_0));
    1108           8 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->TargetInfoLen));
    1109           8 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->TargetInfoMaxLen));
    1110           8 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TargetInfo));
    1111           8 :                         if (_ptr_TargetInfo) {
    1112           6 :                                 NDR_PULL_ALLOC(ndr, r->TargetInfo);
    1113           6 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->TargetInfo, _ptr_TargetInfo));
    1114             :                         } else {
    1115           2 :                                 r->TargetInfo = NULL;
    1116             :                         }
    1117           8 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
    1118           8 :                         NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
    1119           8 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1120             :                 }
    1121           8 :                 if (ndr_flags & NDR_BUFFERS) {
    1122             :                         {
    1123           8 :                                 libndr_flags _flags_save_string = ndr->flags;
    1124           8 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1125           8 :                                 if (r->TargetName) {
    1126           6 :                                         uint32_t _relative_save_offset;
    1127           8 :                                         _relative_save_offset = ndr->offset;
    1128           8 :                                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->TargetName));
    1129           8 :                                         _mem_save_TargetName_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1130           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->TargetName, 0);
    1131             :                                         {
    1132           6 :                                                 struct ndr_pull *_ndr_TargetName;
    1133           8 :                                                 ssize_t sub_size = r->TargetNameLen;
    1134           8 :                                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_TargetName, 0, sub_size));
    1135           8 :                                                 NDR_CHECK(ndr_pull_string(_ndr_TargetName, NDR_SCALARS, &r->TargetName));
    1136           8 :                                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_TargetName, 0, sub_size));
    1137             :                                         }
    1138           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TargetName_0, 0);
    1139           8 :                                         if (ndr->offset > ndr->relative_highest_offset) {
    1140           8 :                                                 ndr->relative_highest_offset = ndr->offset;
    1141             :                                         }
    1142           8 :                                         ndr->offset = _relative_save_offset;
    1143             :                                 }
    1144           8 :                                 ndr->flags = _flags_save_string;
    1145             :                         }
    1146           8 :                         if (r->TargetInfo) {
    1147           4 :                                 uint32_t _relative_save_offset;
    1148           6 :                                 _relative_save_offset = ndr->offset;
    1149           6 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->TargetInfo));
    1150           6 :                                 _mem_save_TargetInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1151           6 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->TargetInfo, 0);
    1152             :                                 {
    1153           4 :                                         struct ndr_pull *_ndr_TargetInfo;
    1154           6 :                                         ssize_t sub_size = r->TargetInfoLen;
    1155           6 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_TargetInfo, 0, sub_size));
    1156           6 :                                         NDR_CHECK(ndr_pull_AV_PAIR_LIST(_ndr_TargetInfo, NDR_SCALARS|NDR_BUFFERS, r->TargetInfo));
    1157           6 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_TargetInfo, 0, sub_size));
    1158             :                                 }
    1159           6 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TargetInfo_0, 0);
    1160           6 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    1161           6 :                                         ndr->relative_highest_offset = ndr->offset;
    1162             :                                 }
    1163           6 :                                 ndr->offset = _relative_save_offset;
    1164             :                         }
    1165           8 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
    1166           8 :                         NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
    1167             :                 }
    1168           8 :                 ndr->flags = _flags_save_STRUCT;
    1169             :         }
    1170           8 :         return NDR_ERR_SUCCESS;
    1171             : }
    1172             : 
    1173           2 : static void ndr_print_flags_CHALLENGE_MESSAGE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct CHALLENGE_MESSAGE *r)
    1174             : {
    1175           2 :         ndr_print_CHALLENGE_MESSAGE(ndr, name, r);
    1176           2 : }
    1177             : 
    1178           8 : _PUBLIC_ void ndr_print_CHALLENGE_MESSAGE(struct ndr_print *ndr, const char *name, const struct CHALLENGE_MESSAGE *r)
    1179             : {
    1180           8 :         ndr_print_struct(ndr, name, "CHALLENGE_MESSAGE");
    1181           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1182             :         {
    1183           8 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1184           8 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1185           8 :                 ndr->depth++;
    1186           8 :                 ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"NTLMSSP":r->Signature);
    1187           8 :                 ndr_print_ntlmssp_MessageType(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NtLmChallenge:r->MessageType);
    1188           8 :                 ndr_print_uint16(ndr, "TargetNameLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_ntlmssp_string_length(r->NegotiateFlags, r->TargetName):r->TargetNameLen);
    1189           8 :                 ndr_print_uint16(ndr, "TargetNameMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->TargetNameLen:r->TargetNameMaxLen);
    1190             :                 {
    1191           8 :                         libndr_flags _flags_save_string = ndr->flags;
    1192           8 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1193           8 :                         ndr_print_ptr(ndr, "TargetName", r->TargetName);
    1194           8 :                         ndr->depth++;
    1195           8 :                         if (r->TargetName) {
    1196           8 :                                 ndr_print_string(ndr, "TargetName", r->TargetName);
    1197             :                         }
    1198           8 :                         ndr->depth--;
    1199           8 :                         ndr->flags = _flags_save_string;
    1200             :                 }
    1201           8 :                 ndr_print_NEGOTIATE(ndr, "NegotiateFlags", r->NegotiateFlags);
    1202           8 :                 ndr_print_array_uint8(ndr, "ServerChallenge", r->ServerChallenge, 8);
    1203           8 :                 ndr_print_array_uint8(ndr, "Reserved", r->Reserved, 8);
    1204           8 :                 ndr_print_uint16(ndr, "TargetInfoLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_AV_PAIR_LIST(r->TargetInfo, ndr->flags):r->TargetInfoLen);
    1205           8 :                 ndr_print_uint16(ndr, "TargetInfoMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->TargetInfoLen:r->TargetInfoMaxLen);
    1206           8 :                 ndr_print_ptr(ndr, "TargetInfo", r->TargetInfo);
    1207           8 :                 ndr->depth++;
    1208           8 :                 if (r->TargetInfo) {
    1209           6 :                         ndr_print_AV_PAIR_LIST(ndr, "TargetInfo", r->TargetInfo);
    1210             :                 }
    1211           8 :                 ndr->depth--;
    1212           8 :                 ndr_print_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION);
    1213           8 :                 ndr_print_ntlmssp_Version(ndr, "Version", &r->Version);
    1214           8 :                 ndr->depth--;
    1215           8 :                 ndr->flags = _flags_save_STRUCT;
    1216             :         }
    1217             : }
    1218             : 
    1219           0 : _PUBLIC_ enum ndr_err_code ndr_push_LM_RESPONSE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct LM_RESPONSE *r)
    1220             : {
    1221             :         {
    1222           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1223           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1224           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1225           0 :                 if (ndr_flags & NDR_SCALARS) {
    1226           0 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    1227           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 24));
    1228           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1229             :                 }
    1230           0 :                 if (ndr_flags & NDR_BUFFERS) {
    1231           0 :                 }
    1232           0 :                 ndr->flags = _flags_save_STRUCT;
    1233             :         }
    1234           0 :         return NDR_ERR_SUCCESS;
    1235             : }
    1236             : 
    1237           4 : _PUBLIC_ enum ndr_err_code ndr_pull_LM_RESPONSE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct LM_RESPONSE *r)
    1238             : {
    1239           4 :         uint32_t size_Response_0 = 0;
    1240             :         {
    1241           4 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1242           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1243           4 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1244           4 :                 if (ndr_flags & NDR_SCALARS) {
    1245           4 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    1246           4 :                         size_Response_0 = 24;
    1247           4 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, size_Response_0));
    1248           4 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1249             :                 }
    1250           4 :                 if (ndr_flags & NDR_BUFFERS) {
    1251           2 :                 }
    1252           4 :                 ndr->flags = _flags_save_STRUCT;
    1253             :         }
    1254           4 :         return NDR_ERR_SUCCESS;
    1255             : }
    1256             : 
    1257           0 : static void ndr_print_flags_LM_RESPONSE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct LM_RESPONSE *r)
    1258             : {
    1259           0 :         ndr_print_LM_RESPONSE(ndr, name, r);
    1260           0 : }
    1261             : 
    1262           4 : _PUBLIC_ void ndr_print_LM_RESPONSE(struct ndr_print *ndr, const char *name, const struct LM_RESPONSE *r)
    1263             : {
    1264           4 :         ndr_print_struct(ndr, name, "LM_RESPONSE");
    1265           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1266             :         {
    1267           4 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1268           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1269           4 :                 ndr->depth++;
    1270           4 :                 ndr_print_array_uint8(ndr, "Response", r->Response, 24);
    1271           4 :                 ndr->depth--;
    1272           4 :                 ndr->flags = _flags_save_STRUCT;
    1273             :         }
    1274             : }
    1275             : 
    1276           0 : _PUBLIC_ enum ndr_err_code ndr_push_LMv2_RESPONSE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct LMv2_RESPONSE *r)
    1277             : {
    1278             :         {
    1279           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1280           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1281           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1282           0 :                 if (ndr_flags & NDR_SCALARS) {
    1283           0 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    1284           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 16));
    1285           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, 8));
    1286           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1287             :                 }
    1288           0 :                 if (ndr_flags & NDR_BUFFERS) {
    1289           0 :                 }
    1290           0 :                 ndr->flags = _flags_save_STRUCT;
    1291             :         }
    1292           0 :         return NDR_ERR_SUCCESS;
    1293             : }
    1294             : 
    1295           0 : _PUBLIC_ enum ndr_err_code ndr_pull_LMv2_RESPONSE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct LMv2_RESPONSE *r)
    1296             : {
    1297           0 :         uint32_t size_Response_0 = 0;
    1298           0 :         uint32_t size_ChallengeFromClient_0 = 0;
    1299             :         {
    1300           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1301           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1302           0 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1303           0 :                 if (ndr_flags & NDR_SCALARS) {
    1304           0 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    1305           0 :                         size_Response_0 = 16;
    1306           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, size_Response_0));
    1307           0 :                         size_ChallengeFromClient_0 = 8;
    1308           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, size_ChallengeFromClient_0));
    1309           0 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1310             :                 }
    1311           0 :                 if (ndr_flags & NDR_BUFFERS) {
    1312           0 :                 }
    1313           0 :                 ndr->flags = _flags_save_STRUCT;
    1314             :         }
    1315           0 :         return NDR_ERR_SUCCESS;
    1316             : }
    1317             : 
    1318           0 : static void ndr_print_flags_LMv2_RESPONSE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct LMv2_RESPONSE *r)
    1319             : {
    1320           0 :         ndr_print_LMv2_RESPONSE(ndr, name, r);
    1321           0 : }
    1322             : 
    1323           0 : _PUBLIC_ void ndr_print_LMv2_RESPONSE(struct ndr_print *ndr, const char *name, const struct LMv2_RESPONSE *r)
    1324             : {
    1325           0 :         ndr_print_struct(ndr, name, "LMv2_RESPONSE");
    1326           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1327             :         {
    1328           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1329           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1330           0 :                 ndr->depth++;
    1331           0 :                 ndr_print_array_uint8(ndr, "Response", r->Response, 16);
    1332           0 :                 ndr_print_array_uint8(ndr, "ChallengeFromClient", r->ChallengeFromClient, 8);
    1333           0 :                 ndr->depth--;
    1334           0 :                 ndr->flags = _flags_save_STRUCT;
    1335             :         }
    1336             : }
    1337             : 
    1338           0 : static enum ndr_err_code ndr_push_ntlmssp_LM_RESPONSE_with_len(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union ntlmssp_LM_RESPONSE_with_len *r)
    1339             : {
    1340           0 :         uint32_t level;
    1341           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1342           0 :         if (ndr_flags & NDR_SCALARS) {
    1343             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1344           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1345           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 1));
    1346           0 :                 switch (level) {
    1347           0 :                         case 24: {
    1348           0 :                                 NDR_CHECK(ndr_push_LM_RESPONSE(ndr, NDR_SCALARS, &r->v1));
    1349           0 :                         break; }
    1350             : 
    1351           0 :                         default: {
    1352           0 :                         break; }
    1353             : 
    1354             :                 }
    1355             :         }
    1356           0 :         return NDR_ERR_SUCCESS;
    1357             : }
    1358             : 
    1359           4 : static enum ndr_err_code ndr_pull_ntlmssp_LM_RESPONSE_with_len(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union ntlmssp_LM_RESPONSE_with_len *r)
    1360             : {
    1361           2 :         uint32_t level;
    1362           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1363           4 :         if (ndr_flags & NDR_SCALARS) {
    1364             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1365           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1366           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 1));
    1367           4 :                 switch (level) {
    1368           4 :                         case 24: {
    1369           4 :                                 NDR_CHECK(ndr_pull_LM_RESPONSE(ndr, NDR_SCALARS, &r->v1));
    1370           2 :                         break; }
    1371             : 
    1372           0 :                         default: {
    1373           0 :                         break; }
    1374             : 
    1375             :                 }
    1376             :         }
    1377           2 :         return NDR_ERR_SUCCESS;
    1378             : }
    1379             : 
    1380           4 : _PUBLIC_ void ndr_print_ntlmssp_LM_RESPONSE_with_len(struct ndr_print *ndr, const char *name, const union ntlmssp_LM_RESPONSE_with_len *r)
    1381             : {
    1382           2 :         uint32_t level;
    1383           4 :         level = ndr_print_steal_switch_value(ndr, r);
    1384           4 :         ndr_print_union(ndr, name, level, "ntlmssp_LM_RESPONSE_with_len");
    1385           4 :         switch (level) {
    1386           4 :                 case 24:
    1387           4 :                         ndr_print_LM_RESPONSE(ndr, "v1", &r->v1);
    1388           4 :                 break;
    1389             : 
    1390           0 :                 default:
    1391           0 :                 break;
    1392             : 
    1393             :         }
    1394           4 : }
    1395             : 
    1396           0 : _PUBLIC_ enum ndr_err_code ndr_push_NTLM_RESPONSE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NTLM_RESPONSE *r)
    1397             : {
    1398             :         {
    1399           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1400           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1401           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1402           0 :                 if (ndr_flags & NDR_SCALARS) {
    1403           0 :                         NDR_CHECK(ndr_push_align(ndr, 1));
    1404           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 24));
    1405           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    1406             :                 }
    1407           0 :                 if (ndr_flags & NDR_BUFFERS) {
    1408           0 :                 }
    1409           0 :                 ndr->flags = _flags_save_STRUCT;
    1410             :         }
    1411           0 :         return NDR_ERR_SUCCESS;
    1412             : }
    1413             : 
    1414           0 : _PUBLIC_ enum ndr_err_code ndr_pull_NTLM_RESPONSE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NTLM_RESPONSE *r)
    1415             : {
    1416           0 :         uint32_t size_Response_0 = 0;
    1417             :         {
    1418           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1419           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1420           0 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1421           0 :                 if (ndr_flags & NDR_SCALARS) {
    1422           0 :                         NDR_CHECK(ndr_pull_align(ndr, 1));
    1423           0 :                         size_Response_0 = 24;
    1424           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, size_Response_0));
    1425           0 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    1426             :                 }
    1427           0 :                 if (ndr_flags & NDR_BUFFERS) {
    1428           0 :                 }
    1429           0 :                 ndr->flags = _flags_save_STRUCT;
    1430             :         }
    1431           0 :         return NDR_ERR_SUCCESS;
    1432             : }
    1433             : 
    1434           0 : static void ndr_print_flags_NTLM_RESPONSE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NTLM_RESPONSE *r)
    1435             : {
    1436           0 :         ndr_print_NTLM_RESPONSE(ndr, name, r);
    1437           0 : }
    1438             : 
    1439           0 : _PUBLIC_ void ndr_print_NTLM_RESPONSE(struct ndr_print *ndr, const char *name, const struct NTLM_RESPONSE *r)
    1440             : {
    1441           0 :         ndr_print_struct(ndr, name, "NTLM_RESPONSE");
    1442           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1443             :         {
    1444           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1445           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1446           0 :                 ndr->depth++;
    1447           0 :                 ndr_print_array_uint8(ndr, "Response", r->Response, 24);
    1448           0 :                 ndr->depth--;
    1449           0 :                 ndr->flags = _flags_save_STRUCT;
    1450             :         }
    1451             : }
    1452             : 
    1453           0 : static enum ndr_err_code ndr_push_NTLMv2_CLIENT_CHALLENGE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NTLMv2_CLIENT_CHALLENGE *r)
    1454             : {
    1455             :         {
    1456           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1457           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1458           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1459           0 :                 if (ndr_flags & NDR_SCALARS) {
    1460           0 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    1461           0 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 1));
    1462           0 :                         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 1));
    1463           0 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Reserved1));
    1464           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved2));
    1465           0 :                         NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->TimeStamp));
    1466           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, 8));
    1467           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Reserved3));
    1468             :                         {
    1469           0 :                                 libndr_flags _flags_save_AV_PAIR_LIST = ndr->flags;
    1470           0 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1471             :                                 {
    1472           0 :                                         struct ndr_push *_ndr_AvPairs;
    1473           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_AvPairs, 0, -1));
    1474           0 :                                         NDR_CHECK(ndr_push_AV_PAIR_LIST(_ndr_AvPairs, NDR_SCALARS|NDR_BUFFERS, &r->AvPairs));
    1475           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_AvPairs, 0, -1));
    1476             :                                 }
    1477           0 :                                 ndr->flags = _flags_save_AV_PAIR_LIST;
    1478             :                         }
    1479           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1480             :                 }
    1481           0 :                 if (ndr_flags & NDR_BUFFERS) {
    1482             :                         {
    1483           0 :                                 libndr_flags _flags_save_AV_PAIR_LIST = ndr->flags;
    1484           0 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1485           0 :                                 ndr->flags = _flags_save_AV_PAIR_LIST;
    1486             :                         }
    1487             :                 }
    1488           0 :                 ndr->flags = _flags_save_STRUCT;
    1489             :         }
    1490           0 :         return NDR_ERR_SUCCESS;
    1491             : }
    1492             : 
    1493       89168 : static enum ndr_err_code ndr_pull_NTLMv2_CLIENT_CHALLENGE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NTLMv2_CLIENT_CHALLENGE *r)
    1494             : {
    1495       89168 :         uint32_t size_ChallengeFromClient_0 = 0;
    1496             :         {
    1497       89168 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1498       89168 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1499       89168 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1500       89168 :                 if (ndr_flags & NDR_SCALARS) {
    1501       44590 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    1502       44590 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->RespType));
    1503       44590 :                         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->HiRespType));
    1504       44590 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Reserved1));
    1505       44590 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved2));
    1506       44590 :                         NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->TimeStamp));
    1507       44590 :                         size_ChallengeFromClient_0 = 8;
    1508       44590 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ChallengeFromClient, size_ChallengeFromClient_0));
    1509       44590 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Reserved3));
    1510             :                         {
    1511       44590 :                                 libndr_flags _flags_save_AV_PAIR_LIST = ndr->flags;
    1512       44590 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1513             :                                 {
    1514        1294 :                                         struct ndr_pull *_ndr_AvPairs;
    1515       44590 :                                         ssize_t sub_size = -1;
    1516       44602 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_AvPairs, 0, sub_size));
    1517       44590 :                                         NDR_CHECK(ndr_pull_AV_PAIR_LIST(_ndr_AvPairs, NDR_SCALARS|NDR_BUFFERS, &r->AvPairs));
    1518       44578 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_AvPairs, 0, sub_size));
    1519             :                                 }
    1520       44578 :                                 ndr->flags = _flags_save_AV_PAIR_LIST;
    1521             :                         }
    1522       44578 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1523             :                 }
    1524       89156 :                 if (ndr_flags & NDR_BUFFERS) {
    1525             :                         {
    1526       44578 :                                 libndr_flags _flags_save_AV_PAIR_LIST = ndr->flags;
    1527       44578 :                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1528       44578 :                                 ndr->flags = _flags_save_AV_PAIR_LIST;
    1529             :                         }
    1530             :                 }
    1531       89156 :                 ndr->flags = _flags_save_STRUCT;
    1532             :         }
    1533       89156 :         return NDR_ERR_SUCCESS;
    1534             : }
    1535             : 
    1536           4 : _PUBLIC_ void ndr_print_NTLMv2_CLIENT_CHALLENGE(struct ndr_print *ndr, const char *name, const struct NTLMv2_CLIENT_CHALLENGE *r)
    1537             : {
    1538           4 :         ndr_print_struct(ndr, name, "NTLMv2_CLIENT_CHALLENGE");
    1539           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1540             :         {
    1541           4 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1542           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1543           4 :                 ndr->depth++;
    1544           4 :                 ndr_print_uint8(ndr, "RespType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->RespType);
    1545           4 :                 ndr_print_uint8(ndr, "HiRespType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->HiRespType);
    1546           4 :                 ndr_print_uint16(ndr, "Reserved1", r->Reserved1);
    1547           4 :                 ndr_print_uint32(ndr, "Reserved2", r->Reserved2);
    1548           4 :                 ndr_print_NTTIME(ndr, "TimeStamp", r->TimeStamp);
    1549           4 :                 ndr_print_array_uint8(ndr, "ChallengeFromClient", r->ChallengeFromClient, 8);
    1550           4 :                 ndr_print_uint32(ndr, "Reserved3", r->Reserved3);
    1551             :                 {
    1552           4 :                         libndr_flags _flags_save_AV_PAIR_LIST = ndr->flags;
    1553           4 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1554           4 :                         ndr_print_AV_PAIR_LIST(ndr, "AvPairs", &r->AvPairs);
    1555           4 :                         ndr->flags = _flags_save_AV_PAIR_LIST;
    1556             :                 }
    1557           4 :                 ndr->depth--;
    1558           4 :                 ndr->flags = _flags_save_STRUCT;
    1559             :         }
    1560             : }
    1561             : 
    1562           0 : _PUBLIC_ enum ndr_err_code ndr_push_NTLMv2_RESPONSE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NTLMv2_RESPONSE *r)
    1563             : {
    1564             :         {
    1565           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1566           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1567           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1568           0 :                 if (ndr_flags & NDR_SCALARS) {
    1569           0 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    1570           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Response, 16));
    1571           0 :                         NDR_CHECK(ndr_push_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_SCALARS, &r->Challenge));
    1572           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1573             :                 }
    1574           0 :                 if (ndr_flags & NDR_BUFFERS) {
    1575           0 :                         NDR_CHECK(ndr_push_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_BUFFERS, &r->Challenge));
    1576             :                 }
    1577           0 :                 ndr->flags = _flags_save_STRUCT;
    1578             :         }
    1579           0 :         return NDR_ERR_SUCCESS;
    1580             : }
    1581             : 
    1582       44594 : _PUBLIC_ enum ndr_err_code ndr_pull_NTLMv2_RESPONSE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NTLMv2_RESPONSE *r)
    1583             : {
    1584       44594 :         uint32_t size_Response_0 = 0;
    1585             :         {
    1586       44594 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1587       44594 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1588       44594 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1589       44594 :                 if (ndr_flags & NDR_SCALARS) {
    1590       44590 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    1591       44590 :                         size_Response_0 = 16;
    1592       44590 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Response, size_Response_0));
    1593       44590 :                         NDR_CHECK(ndr_pull_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_SCALARS, &r->Challenge));
    1594       44578 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1595             :                 }
    1596       44582 :                 if (ndr_flags & NDR_BUFFERS) {
    1597       44578 :                         NDR_CHECK(ndr_pull_NTLMv2_CLIENT_CHALLENGE(ndr, NDR_BUFFERS, &r->Challenge));
    1598             :                 }
    1599       44582 :                 ndr->flags = _flags_save_STRUCT;
    1600             :         }
    1601       44582 :         return NDR_ERR_SUCCESS;
    1602             : }
    1603             : 
    1604           0 : static void ndr_print_flags_NTLMv2_RESPONSE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NTLMv2_RESPONSE *r)
    1605             : {
    1606           0 :         ndr_print_NTLMv2_RESPONSE(ndr, name, r);
    1607           0 : }
    1608             : 
    1609           4 : _PUBLIC_ void ndr_print_NTLMv2_RESPONSE(struct ndr_print *ndr, const char *name, const struct NTLMv2_RESPONSE *r)
    1610             : {
    1611           4 :         ndr_print_struct(ndr, name, "NTLMv2_RESPONSE");
    1612           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1613             :         {
    1614           4 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1615           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1616           4 :                 ndr->depth++;
    1617           4 :                 ndr_print_array_uint8(ndr, "Response", r->Response, 16);
    1618           4 :                 ndr_print_NTLMv2_CLIENT_CHALLENGE(ndr, "Challenge", &r->Challenge);
    1619           4 :                 ndr->depth--;
    1620           4 :                 ndr->flags = _flags_save_STRUCT;
    1621             :         }
    1622             : }
    1623             : 
    1624           0 : _PUBLIC_ enum ndr_err_code ndr_push_ntlmssp_NTLM_RESPONSE_with_len(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union ntlmssp_NTLM_RESPONSE_with_len *r)
    1625             : {
    1626           0 :         uint32_t level;
    1627           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1628           0 :         if (ndr_flags & NDR_SCALARS) {
    1629             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1630           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1631           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    1632           0 :                 switch (level) {
    1633           0 :                         case 0: {
    1634           0 :                         break; }
    1635             : 
    1636           0 :                         case 0x18: {
    1637           0 :                                 NDR_CHECK(ndr_push_NTLM_RESPONSE(ndr, NDR_SCALARS, &r->v1));
    1638           0 :                         break; }
    1639             : 
    1640           0 :                         default: {
    1641           0 :                                 NDR_CHECK(ndr_push_NTLMv2_RESPONSE(ndr, NDR_SCALARS, &r->v2));
    1642           0 :                         break; }
    1643             : 
    1644             :                 }
    1645             :         }
    1646           0 :         if (ndr_flags & NDR_BUFFERS) {
    1647           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1648             :                         /* We didn't get it above, and the token is not needed after this. */
    1649           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1650             :                 }
    1651           0 :                 switch (level) {
    1652           0 :                         case 0:
    1653           0 :                         break;
    1654             : 
    1655           0 :                         case 0x18:
    1656           0 :                         break;
    1657             : 
    1658           0 :                         default:
    1659           0 :                                 NDR_CHECK(ndr_push_NTLMv2_RESPONSE(ndr, NDR_BUFFERS, &r->v2));
    1660           0 :                         break;
    1661             : 
    1662             :                 }
    1663             :         }
    1664           0 :         return NDR_ERR_SUCCESS;
    1665             : }
    1666             : 
    1667           4 : _PUBLIC_ enum ndr_err_code ndr_pull_ntlmssp_NTLM_RESPONSE_with_len(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union ntlmssp_NTLM_RESPONSE_with_len *r)
    1668             : {
    1669           2 :         uint32_t level;
    1670           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1671           4 :         if (ndr_flags & NDR_SCALARS) {
    1672             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1673           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1674           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    1675           4 :                 switch (level) {
    1676           0 :                         case 0: {
    1677           0 :                         break; }
    1678             : 
    1679           0 :                         case 0x18: {
    1680           0 :                                 NDR_CHECK(ndr_pull_NTLM_RESPONSE(ndr, NDR_SCALARS, &r->v1));
    1681           0 :                         break; }
    1682             : 
    1683           4 :                         default: {
    1684           4 :                                 NDR_CHECK(ndr_pull_NTLMv2_RESPONSE(ndr, NDR_SCALARS, &r->v2));
    1685           2 :                         break; }
    1686             : 
    1687             :                 }
    1688             :         }
    1689           4 :         if (ndr_flags & NDR_BUFFERS) {
    1690           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1691             :                         /* We didn't get it above, and the token is not needed after this. */
    1692           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1693             :                 }
    1694           4 :                 switch (level) {
    1695           0 :                         case 0:
    1696           0 :                         break;
    1697             : 
    1698           0 :                         case 0x18:
    1699           0 :                         break;
    1700             : 
    1701           4 :                         default:
    1702           4 :                                 NDR_CHECK(ndr_pull_NTLMv2_RESPONSE(ndr, NDR_BUFFERS, &r->v2));
    1703           2 :                         break;
    1704             : 
    1705             :                 }
    1706             :         }
    1707           2 :         return NDR_ERR_SUCCESS;
    1708             : }
    1709             : 
    1710           4 : _PUBLIC_ void ndr_print_ntlmssp_NTLM_RESPONSE_with_len(struct ndr_print *ndr, const char *name, const union ntlmssp_NTLM_RESPONSE_with_len *r)
    1711             : {
    1712           2 :         uint32_t level;
    1713           4 :         level = ndr_print_steal_switch_value(ndr, r);
    1714           4 :         ndr_print_union(ndr, name, level, "ntlmssp_NTLM_RESPONSE_with_len");
    1715           4 :         switch (level) {
    1716           0 :                 case 0:
    1717           0 :                 break;
    1718             : 
    1719           0 :                 case 0x18:
    1720           0 :                         ndr_print_NTLM_RESPONSE(ndr, "v1", &r->v1);
    1721           0 :                 break;
    1722             : 
    1723           4 :                 default:
    1724           4 :                         ndr_print_NTLMv2_RESPONSE(ndr, "v2", &r->v2);
    1725           4 :                 break;
    1726             : 
    1727             :         }
    1728           4 : }
    1729             : 
    1730           1 : _PUBLIC_ enum ndr_err_code ndr_push_AUTHENTICATE_MESSAGE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct AUTHENTICATE_MESSAGE *r)
    1731             : {
    1732             :         {
    1733           1 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1734           1 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1735           1 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1736           1 :                 if (ndr_flags & NDR_SCALARS) {
    1737           1 :                         NDR_CHECK(ndr_push_align(ndr, 5));
    1738           1 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "NTLMSSP", 8, sizeof(uint8_t), CH_DOS));
    1739           2 :                         NDR_CHECK(ndr_push_ntlmssp_MessageType(ndr, NDR_SCALARS, NtLmAuthenticate));
    1740           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->LmChallengeResponseLen));
    1741           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->LmChallengeResponseLen));
    1742           1 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->LmChallengeResponse));
    1743           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->NtChallengeResponseLen));
    1744           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->NtChallengeResponseLen));
    1745           1 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->NtChallengeResponse));
    1746           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName)));
    1747           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName)));
    1748             :                         {
    1749           1 :                                 libndr_flags _flags_save_string = ndr->flags;
    1750           1 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1751           1 :                                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->DomainName));
    1752           1 :                                 ndr->flags = _flags_save_string;
    1753             :                         }
    1754           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName)));
    1755           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName)));
    1756             :                         {
    1757           1 :                                 libndr_flags _flags_save_string = ndr->flags;
    1758           1 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1759           1 :                                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->UserName));
    1760           1 :                                 ndr->flags = _flags_save_string;
    1761             :                         }
    1762           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation)));
    1763           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation)));
    1764             :                         {
    1765           1 :                                 libndr_flags _flags_save_string = ndr->flags;
    1766           1 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1767           1 :                                 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->Workstation));
    1768           1 :                                 ndr->flags = _flags_save_string;
    1769             :                         }
    1770           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->EncryptedRandomSessionKey == NULL?0:r->EncryptedRandomSessionKey->length));
    1771           1 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->EncryptedRandomSessionKey == NULL?0:r->EncryptedRandomSessionKey->length));
    1772           1 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->EncryptedRandomSessionKey));
    1773           2 :                         NDR_CHECK(ndr_push_NEGOTIATE(ndr, NDR_SCALARS, r->NegotiateFlags));
    1774           1 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
    1775           1 :                         NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
    1776           1 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1777             :                 }
    1778           1 :                 if (ndr_flags & NDR_BUFFERS) {
    1779           1 :                         if (r->LmChallengeResponse) {
    1780           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->LmChallengeResponse));
    1781             :                                 {
    1782           0 :                                         struct ndr_push *_ndr_LmChallengeResponse;
    1783           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_LmChallengeResponse, 0, r->LmChallengeResponseLen));
    1784           0 :                                         NDR_CHECK(ndr_push_set_switch_value(_ndr_LmChallengeResponse, r->LmChallengeResponse, r->LmChallengeResponseLen));
    1785           0 :                                         NDR_CHECK(ndr_push_ntlmssp_LM_RESPONSE_with_len(_ndr_LmChallengeResponse, NDR_SCALARS|NDR_BUFFERS, r->LmChallengeResponse));
    1786           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_LmChallengeResponse, 0, r->LmChallengeResponseLen));
    1787             :                                 }
    1788           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->LmChallengeResponse));
    1789             :                         }
    1790           1 :                         if (r->NtChallengeResponse) {
    1791           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->NtChallengeResponse));
    1792             :                                 {
    1793           0 :                                         struct ndr_push *_ndr_NtChallengeResponse;
    1794           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_NtChallengeResponse, 0, r->NtChallengeResponseLen));
    1795           0 :                                         NDR_CHECK(ndr_push_set_switch_value(_ndr_NtChallengeResponse, r->NtChallengeResponse, r->NtChallengeResponseLen));
    1796           0 :                                         NDR_CHECK(ndr_push_ntlmssp_NTLM_RESPONSE_with_len(_ndr_NtChallengeResponse, NDR_SCALARS|NDR_BUFFERS, r->NtChallengeResponse));
    1797           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_NtChallengeResponse, 0, r->NtChallengeResponseLen));
    1798             :                                 }
    1799           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->NtChallengeResponse));
    1800             :                         }
    1801             :                         {
    1802           1 :                                 libndr_flags _flags_save_string = ndr->flags;
    1803           1 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1804           1 :                                 if (r->DomainName) {
    1805           0 :                                         NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->DomainName));
    1806             :                                         {
    1807           0 :                                                 struct ndr_push *_ndr_DomainName;
    1808           0 :                                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_DomainName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName)));
    1809           0 :                                                 NDR_CHECK(ndr_push_string(_ndr_DomainName, NDR_SCALARS, r->DomainName));
    1810           0 :                                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_DomainName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName)));
    1811             :                                         }
    1812           0 :                                         NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->DomainName));
    1813             :                                 }
    1814           1 :                                 ndr->flags = _flags_save_string;
    1815             :                         }
    1816             :                         {
    1817           1 :                                 libndr_flags _flags_save_string = ndr->flags;
    1818           1 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1819           1 :                                 if (r->UserName) {
    1820           0 :                                         NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->UserName));
    1821             :                                         {
    1822           0 :                                                 struct ndr_push *_ndr_UserName;
    1823           0 :                                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_UserName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName)));
    1824           0 :                                                 NDR_CHECK(ndr_push_string(_ndr_UserName, NDR_SCALARS, r->UserName));
    1825           0 :                                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_UserName, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName)));
    1826             :                                         }
    1827           0 :                                         NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->UserName));
    1828             :                                 }
    1829           1 :                                 ndr->flags = _flags_save_string;
    1830             :                         }
    1831             :                         {
    1832           1 :                                 libndr_flags _flags_save_string = ndr->flags;
    1833           1 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1834           1 :                                 if (r->Workstation) {
    1835           0 :                                         NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->Workstation));
    1836             :                                         {
    1837           0 :                                                 struct ndr_push *_ndr_Workstation;
    1838           0 :                                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_Workstation, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation)));
    1839           0 :                                                 NDR_CHECK(ndr_push_string(_ndr_Workstation, NDR_SCALARS, r->Workstation));
    1840           0 :                                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_Workstation, 0, ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation)));
    1841             :                                         }
    1842           0 :                                         NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->Workstation));
    1843             :                                 }
    1844           1 :                                 ndr->flags = _flags_save_string;
    1845             :                         }
    1846           1 :                         if (r->EncryptedRandomSessionKey) {
    1847           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->EncryptedRandomSessionKey));
    1848             :                                 {
    1849           0 :                                         struct ndr_push *_ndr_EncryptedRandomSessionKey;
    1850           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_EncryptedRandomSessionKey, 0, r->EncryptedRandomSessionKey == NULL?0:r->EncryptedRandomSessionKey->length));
    1851           0 :                                         NDR_CHECK(ndr_push_DATA_BLOB(_ndr_EncryptedRandomSessionKey, NDR_SCALARS, *r->EncryptedRandomSessionKey));
    1852           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_EncryptedRandomSessionKey, 0, r->EncryptedRandomSessionKey == NULL?0:r->EncryptedRandomSessionKey->length));
    1853             :                                 }
    1854           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->EncryptedRandomSessionKey));
    1855             :                         }
    1856           1 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
    1857           1 :                         NDR_CHECK(ndr_push_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
    1858             :                 }
    1859           1 :                 ndr->flags = _flags_save_STRUCT;
    1860             :         }
    1861           1 :         return NDR_ERR_SUCCESS;
    1862             : }
    1863             : 
    1864           6 : _PUBLIC_ enum ndr_err_code ndr_pull_AUTHENTICATE_MESSAGE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct AUTHENTICATE_MESSAGE *r)
    1865             : {
    1866           6 :         uint32_t size_Signature_0 = 0;
    1867           4 :         uint32_t _ptr_LmChallengeResponse;
    1868           6 :         TALLOC_CTX *_mem_save_LmChallengeResponse_0 = NULL;
    1869           4 :         uint32_t _ptr_NtChallengeResponse;
    1870           6 :         TALLOC_CTX *_mem_save_NtChallengeResponse_0 = NULL;
    1871           4 :         uint32_t _ptr_DomainName;
    1872           6 :         TALLOC_CTX *_mem_save_DomainName_0 = NULL;
    1873           4 :         uint32_t _ptr_UserName;
    1874           6 :         TALLOC_CTX *_mem_save_UserName_0 = NULL;
    1875           4 :         uint32_t _ptr_Workstation;
    1876           6 :         TALLOC_CTX *_mem_save_Workstation_0 = NULL;
    1877           4 :         uint32_t _ptr_EncryptedRandomSessionKey;
    1878           6 :         TALLOC_CTX *_mem_save_EncryptedRandomSessionKey_0 = NULL;
    1879             :         {
    1880           6 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    1881           6 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1882           6 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1883           6 :                 if (ndr_flags & NDR_SCALARS) {
    1884           6 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
    1885           6 :                         size_Signature_0 = 8;
    1886           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, size_Signature_0, sizeof(uint8_t), CH_DOS));
    1887          10 :                         NDR_CHECK(ndr_pull_ntlmssp_MessageType(ndr, NDR_SCALARS, &r->MessageType));
    1888           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->LmChallengeResponseLen));
    1889           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->LmChallengeResponseMaxLen));
    1890           6 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LmChallengeResponse));
    1891           6 :                         if (_ptr_LmChallengeResponse) {
    1892           4 :                                 NDR_PULL_ALLOC(ndr, r->LmChallengeResponse);
    1893           4 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->LmChallengeResponse, _ptr_LmChallengeResponse));
    1894             :                         } else {
    1895           2 :                                 r->LmChallengeResponse = NULL;
    1896             :                         }
    1897           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NtChallengeResponseLen));
    1898           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NtChallengeResponseMaxLen));
    1899           6 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_NtChallengeResponse));
    1900           6 :                         if (_ptr_NtChallengeResponse) {
    1901           4 :                                 NDR_PULL_ALLOC(ndr, r->NtChallengeResponse);
    1902           4 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->NtChallengeResponse, _ptr_NtChallengeResponse));
    1903             :                         } else {
    1904           2 :                                 r->NtChallengeResponse = NULL;
    1905             :                         }
    1906           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DomainNameLen));
    1907           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->DomainNameMaxLen));
    1908             :                         {
    1909           6 :                                 libndr_flags _flags_save_string = ndr->flags;
    1910           6 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1911           6 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DomainName));
    1912           6 :                                 if (_ptr_DomainName) {
    1913           4 :                                         NDR_PULL_ALLOC(ndr, r->DomainName);
    1914           4 :                                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->DomainName, _ptr_DomainName));
    1915             :                                 } else {
    1916           2 :                                         r->DomainName = NULL;
    1917             :                                 }
    1918           6 :                                 ndr->flags = _flags_save_string;
    1919             :                         }
    1920           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UserNameLen));
    1921           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->UserNameMaxLen));
    1922             :                         {
    1923           6 :                                 libndr_flags _flags_save_string = ndr->flags;
    1924           6 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1925           6 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_UserName));
    1926           6 :                                 if (_ptr_UserName) {
    1927           4 :                                         NDR_PULL_ALLOC(ndr, r->UserName);
    1928           4 :                                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->UserName, _ptr_UserName));
    1929             :                                 } else {
    1930           2 :                                         r->UserName = NULL;
    1931             :                                 }
    1932           6 :                                 ndr->flags = _flags_save_string;
    1933             :                         }
    1934           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WorkstationLen));
    1935           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->WorkstationMaxLen));
    1936             :                         {
    1937           6 :                                 libndr_flags _flags_save_string = ndr->flags;
    1938           6 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    1939           6 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Workstation));
    1940           6 :                                 if (_ptr_Workstation) {
    1941           4 :                                         NDR_PULL_ALLOC(ndr, r->Workstation);
    1942           4 :                                         NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->Workstation, _ptr_Workstation));
    1943             :                                 } else {
    1944           2 :                                         r->Workstation = NULL;
    1945             :                                 }
    1946           6 :                                 ndr->flags = _flags_save_string;
    1947             :                         }
    1948           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->EncryptedRandomSessionKeyLen));
    1949           6 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->EncryptedRandomSessionKeyMaxLen));
    1950           6 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_EncryptedRandomSessionKey));
    1951           6 :                         if (_ptr_EncryptedRandomSessionKey) {
    1952           4 :                                 NDR_PULL_ALLOC(ndr, r->EncryptedRandomSessionKey);
    1953           4 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->EncryptedRandomSessionKey, _ptr_EncryptedRandomSessionKey));
    1954             :                         } else {
    1955           2 :                                 r->EncryptedRandomSessionKey = NULL;
    1956             :                         }
    1957          10 :                         NDR_CHECK(ndr_pull_NEGOTIATE(ndr, NDR_SCALARS, &r->NegotiateFlags));
    1958           6 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
    1959           6 :                         NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_SCALARS, &r->Version));
    1960           6 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1961             :                 }
    1962           6 :                 if (ndr_flags & NDR_BUFFERS) {
    1963           6 :                         if (r->LmChallengeResponse) {
    1964           2 :                                 uint32_t _relative_save_offset;
    1965           4 :                                 _relative_save_offset = ndr->offset;
    1966           4 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->LmChallengeResponse));
    1967           4 :                                 _mem_save_LmChallengeResponse_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1968           4 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->LmChallengeResponse, 0);
    1969             :                                 {
    1970           2 :                                         struct ndr_pull *_ndr_LmChallengeResponse;
    1971           4 :                                         ssize_t sub_size = r->LmChallengeResponseLen;
    1972           4 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_LmChallengeResponse, 0, sub_size));
    1973           4 :                                         NDR_CHECK(ndr_pull_set_switch_value(_ndr_LmChallengeResponse, r->LmChallengeResponse, r->LmChallengeResponseLen));
    1974           4 :                                         NDR_CHECK(ndr_pull_ntlmssp_LM_RESPONSE_with_len(_ndr_LmChallengeResponse, NDR_SCALARS|NDR_BUFFERS, r->LmChallengeResponse));
    1975           4 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_LmChallengeResponse, 0, sub_size));
    1976             :                                 }
    1977           4 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LmChallengeResponse_0, 0);
    1978           4 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    1979           4 :                                         ndr->relative_highest_offset = ndr->offset;
    1980             :                                 }
    1981           4 :                                 ndr->offset = _relative_save_offset;
    1982             :                         }
    1983           6 :                         if (r->NtChallengeResponse) {
    1984           2 :                                 uint32_t _relative_save_offset;
    1985           4 :                                 _relative_save_offset = ndr->offset;
    1986           4 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->NtChallengeResponse));
    1987           4 :                                 _mem_save_NtChallengeResponse_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1988           4 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->NtChallengeResponse, 0);
    1989             :                                 {
    1990           2 :                                         struct ndr_pull *_ndr_NtChallengeResponse;
    1991           4 :                                         ssize_t sub_size = r->NtChallengeResponseMaxLen;
    1992           4 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_NtChallengeResponse, 0, sub_size));
    1993           4 :                                         NDR_CHECK(ndr_pull_set_switch_value(_ndr_NtChallengeResponse, r->NtChallengeResponse, r->NtChallengeResponseLen));
    1994           4 :                                         NDR_CHECK(ndr_pull_ntlmssp_NTLM_RESPONSE_with_len(_ndr_NtChallengeResponse, NDR_SCALARS|NDR_BUFFERS, r->NtChallengeResponse));
    1995           4 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_NtChallengeResponse, 0, sub_size));
    1996             :                                 }
    1997           4 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NtChallengeResponse_0, 0);
    1998           4 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    1999           4 :                                         ndr->relative_highest_offset = ndr->offset;
    2000             :                                 }
    2001           4 :                                 ndr->offset = _relative_save_offset;
    2002             :                         }
    2003             :                         {
    2004           6 :                                 libndr_flags _flags_save_string = ndr->flags;
    2005           6 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    2006           6 :                                 if (r->DomainName) {
    2007           2 :                                         uint32_t _relative_save_offset;
    2008           4 :                                         _relative_save_offset = ndr->offset;
    2009           4 :                                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->DomainName));
    2010           4 :                                         _mem_save_DomainName_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2011           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->DomainName, 0);
    2012             :                                         {
    2013           2 :                                                 struct ndr_pull *_ndr_DomainName;
    2014           4 :                                                 ssize_t sub_size = r->DomainNameLen;
    2015           4 :                                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_DomainName, 0, sub_size));
    2016           4 :                                                 NDR_CHECK(ndr_pull_string(_ndr_DomainName, NDR_SCALARS, &r->DomainName));
    2017           4 :                                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_DomainName, 0, sub_size));
    2018             :                                         }
    2019           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DomainName_0, 0);
    2020           4 :                                         if (ndr->offset > ndr->relative_highest_offset) {
    2021           2 :                                                 ndr->relative_highest_offset = ndr->offset;
    2022             :                                         }
    2023           4 :                                         ndr->offset = _relative_save_offset;
    2024             :                                 }
    2025           6 :                                 ndr->flags = _flags_save_string;
    2026             :                         }
    2027             :                         {
    2028           6 :                                 libndr_flags _flags_save_string = ndr->flags;
    2029           6 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    2030           6 :                                 if (r->UserName) {
    2031           2 :                                         uint32_t _relative_save_offset;
    2032           4 :                                         _relative_save_offset = ndr->offset;
    2033           4 :                                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->UserName));
    2034           4 :                                         _mem_save_UserName_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2035           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->UserName, 0);
    2036             :                                         {
    2037           2 :                                                 struct ndr_pull *_ndr_UserName;
    2038           4 :                                                 ssize_t sub_size = r->UserNameLen;
    2039           4 :                                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_UserName, 0, sub_size));
    2040           4 :                                                 NDR_CHECK(ndr_pull_string(_ndr_UserName, NDR_SCALARS, &r->UserName));
    2041           4 :                                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_UserName, 0, sub_size));
    2042             :                                         }
    2043           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_UserName_0, 0);
    2044           4 :                                         if (ndr->offset > ndr->relative_highest_offset) {
    2045           2 :                                                 ndr->relative_highest_offset = ndr->offset;
    2046             :                                         }
    2047           4 :                                         ndr->offset = _relative_save_offset;
    2048             :                                 }
    2049           6 :                                 ndr->flags = _flags_save_string;
    2050             :                         }
    2051             :                         {
    2052           6 :                                 libndr_flags _flags_save_string = ndr->flags;
    2053           6 :                                 ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    2054           6 :                                 if (r->Workstation) {
    2055           2 :                                         uint32_t _relative_save_offset;
    2056           4 :                                         _relative_save_offset = ndr->offset;
    2057           4 :                                         NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->Workstation));
    2058           4 :                                         _mem_save_Workstation_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2059           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->Workstation, 0);
    2060             :                                         {
    2061           2 :                                                 struct ndr_pull *_ndr_Workstation;
    2062           4 :                                                 ssize_t sub_size = r->WorkstationLen;
    2063           4 :                                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_Workstation, 0, sub_size));
    2064           4 :                                                 NDR_CHECK(ndr_pull_string(_ndr_Workstation, NDR_SCALARS, &r->Workstation));
    2065           4 :                                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_Workstation, 0, sub_size));
    2066             :                                         }
    2067           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Workstation_0, 0);
    2068           4 :                                         if (ndr->offset > ndr->relative_highest_offset) {
    2069           2 :                                                 ndr->relative_highest_offset = ndr->offset;
    2070             :                                         }
    2071           4 :                                         ndr->offset = _relative_save_offset;
    2072             :                                 }
    2073           6 :                                 ndr->flags = _flags_save_string;
    2074             :                         }
    2075           6 :                         if (r->EncryptedRandomSessionKey) {
    2076           2 :                                 uint32_t _relative_save_offset;
    2077           4 :                                 _relative_save_offset = ndr->offset;
    2078           4 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->EncryptedRandomSessionKey));
    2079           4 :                                 _mem_save_EncryptedRandomSessionKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2080           4 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->EncryptedRandomSessionKey, 0);
    2081             :                                 {
    2082           2 :                                         struct ndr_pull *_ndr_EncryptedRandomSessionKey;
    2083           4 :                                         ssize_t sub_size = r->EncryptedRandomSessionKeyLen;
    2084           4 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_EncryptedRandomSessionKey, 0, sub_size));
    2085           4 :                                         NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_EncryptedRandomSessionKey, NDR_SCALARS, r->EncryptedRandomSessionKey));
    2086           4 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_EncryptedRandomSessionKey, 0, sub_size));
    2087             :                                 }
    2088           4 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_EncryptedRandomSessionKey_0, 0);
    2089           4 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2090           4 :                                         ndr->relative_highest_offset = ndr->offset;
    2091             :                                 }
    2092           4 :                                 ndr->offset = _relative_save_offset;
    2093             :                         }
    2094           6 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION));
    2095           6 :                         NDR_CHECK(ndr_pull_ntlmssp_Version(ndr, NDR_BUFFERS, &r->Version));
    2096             :                 }
    2097           6 :                 ndr->flags = _flags_save_STRUCT;
    2098             :         }
    2099           6 :         return NDR_ERR_SUCCESS;
    2100             : }
    2101             : 
    2102           2 : static void ndr_print_flags_AUTHENTICATE_MESSAGE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct AUTHENTICATE_MESSAGE *r)
    2103             : {
    2104           2 :         ndr_print_AUTHENTICATE_MESSAGE(ndr, name, r);
    2105           2 : }
    2106             : 
    2107           6 : _PUBLIC_ void ndr_print_AUTHENTICATE_MESSAGE(struct ndr_print *ndr, const char *name, const struct AUTHENTICATE_MESSAGE *r)
    2108             : {
    2109           6 :         ndr_print_struct(ndr, name, "AUTHENTICATE_MESSAGE");
    2110           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2111             :         {
    2112           6 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    2113           6 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    2114           6 :                 ndr->depth++;
    2115           6 :                 ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"NTLMSSP":r->Signature);
    2116           6 :                 ndr_print_ntlmssp_MessageType(ndr, "MessageType", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NtLmAuthenticate:r->MessageType);
    2117           6 :                 ndr_print_uint16(ndr, "LmChallengeResponseLen", r->LmChallengeResponseLen);
    2118           6 :                 ndr_print_uint16(ndr, "LmChallengeResponseMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->LmChallengeResponseLen:r->LmChallengeResponseMaxLen);
    2119           6 :                 ndr_print_ptr(ndr, "LmChallengeResponse", r->LmChallengeResponse);
    2120           6 :                 ndr->depth++;
    2121           6 :                 if (r->LmChallengeResponse) {
    2122           4 :                         ndr_print_set_switch_value(ndr, r->LmChallengeResponse, r->LmChallengeResponseLen);
    2123           4 :                         ndr_print_ntlmssp_LM_RESPONSE_with_len(ndr, "LmChallengeResponse", r->LmChallengeResponse);
    2124             :                 }
    2125           6 :                 ndr->depth--;
    2126           6 :                 ndr_print_uint16(ndr, "NtChallengeResponseLen", r->NtChallengeResponseLen);
    2127           6 :                 ndr_print_uint16(ndr, "NtChallengeResponseMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->NtChallengeResponseLen:r->NtChallengeResponseMaxLen);
    2128           6 :                 ndr_print_ptr(ndr, "NtChallengeResponse", r->NtChallengeResponse);
    2129           6 :                 ndr->depth++;
    2130           6 :                 if (r->NtChallengeResponse) {
    2131           4 :                         ndr_print_set_switch_value(ndr, r->NtChallengeResponse, r->NtChallengeResponseLen);
    2132           4 :                         ndr_print_ntlmssp_NTLM_RESPONSE_with_len(ndr, "NtChallengeResponse", r->NtChallengeResponse);
    2133             :                 }
    2134           6 :                 ndr->depth--;
    2135           6 :                 ndr_print_uint16(ndr, "DomainNameLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_ntlmssp_string_length(r->NegotiateFlags, r->DomainName):r->DomainNameLen);
    2136           6 :                 ndr_print_uint16(ndr, "DomainNameMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->DomainNameLen:r->DomainNameMaxLen);
    2137             :                 {
    2138           6 :                         libndr_flags _flags_save_string = ndr->flags;
    2139           6 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    2140           6 :                         ndr_print_ptr(ndr, "DomainName", r->DomainName);
    2141           6 :                         ndr->depth++;
    2142           6 :                         if (r->DomainName) {
    2143           4 :                                 ndr_print_string(ndr, "DomainName", r->DomainName);
    2144             :                         }
    2145           6 :                         ndr->depth--;
    2146           6 :                         ndr->flags = _flags_save_string;
    2147             :                 }
    2148           6 :                 ndr_print_uint16(ndr, "UserNameLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_ntlmssp_string_length(r->NegotiateFlags, r->UserName):r->UserNameLen);
    2149           6 :                 ndr_print_uint16(ndr, "UserNameMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->UserNameLen:r->UserNameMaxLen);
    2150             :                 {
    2151           6 :                         libndr_flags _flags_save_string = ndr->flags;
    2152           6 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    2153           6 :                         ndr_print_ptr(ndr, "UserName", r->UserName);
    2154           6 :                         ndr->depth++;
    2155           6 :                         if (r->UserName) {
    2156           4 :                                 ndr_print_string(ndr, "UserName", r->UserName);
    2157             :                         }
    2158           6 :                         ndr->depth--;
    2159           6 :                         ndr->flags = _flags_save_string;
    2160             :                 }
    2161           6 :                 ndr_print_uint16(ndr, "WorkstationLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_ntlmssp_string_length(r->NegotiateFlags, r->Workstation):r->WorkstationLen);
    2162           6 :                 ndr_print_uint16(ndr, "WorkstationMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->WorkstationLen:r->WorkstationMaxLen);
    2163             :                 {
    2164           6 :                         libndr_flags _flags_save_string = ndr->flags;
    2165           6 :                         ndr_set_flags(&ndr->flags, ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags));
    2166           6 :                         ndr_print_ptr(ndr, "Workstation", r->Workstation);
    2167           6 :                         ndr->depth++;
    2168           6 :                         if (r->Workstation) {
    2169           4 :                                 ndr_print_string(ndr, "Workstation", r->Workstation);
    2170             :                         }
    2171           6 :                         ndr->depth--;
    2172           6 :                         ndr->flags = _flags_save_string;
    2173             :                 }
    2174           6 :                 ndr_print_uint16(ndr, "EncryptedRandomSessionKeyLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->EncryptedRandomSessionKey == NULL?0:r->EncryptedRandomSessionKey->length:r->EncryptedRandomSessionKeyLen);
    2175           6 :                 ndr_print_uint16(ndr, "EncryptedRandomSessionKeyMaxLen", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->EncryptedRandomSessionKeyLen:r->EncryptedRandomSessionKeyMaxLen);
    2176           6 :                 ndr_print_ptr(ndr, "EncryptedRandomSessionKey", r->EncryptedRandomSessionKey);
    2177           6 :                 ndr->depth++;
    2178           6 :                 if (r->EncryptedRandomSessionKey) {
    2179           4 :                         ndr_print_DATA_BLOB(ndr, "EncryptedRandomSessionKey", *r->EncryptedRandomSessionKey);
    2180             :                 }
    2181           6 :                 ndr->depth--;
    2182           6 :                 ndr_print_NEGOTIATE(ndr, "NegotiateFlags", r->NegotiateFlags);
    2183           6 :                 ndr_print_set_switch_value(ndr, &r->Version, r->NegotiateFlags & NTLMSSP_NEGOTIATE_VERSION);
    2184           6 :                 ndr_print_ntlmssp_Version(ndr, "Version", &r->Version);
    2185           6 :                 ndr->depth--;
    2186           6 :                 ndr->flags = _flags_save_STRUCT;
    2187             :         }
    2188             : }
    2189             : 
    2190           0 : _PUBLIC_ enum ndr_err_code ndr_push_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NTLMSSP_MESSAGE_SIGNATURE *r)
    2191             : {
    2192           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2193           0 :         if (ndr_flags & NDR_SCALARS) {
    2194           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2195           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NTLMSSP_SIGN_VERSION));
    2196           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->RandomPad));
    2197           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Checksum));
    2198           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SeqNum));
    2199           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2200             :         }
    2201           0 :         if (ndr_flags & NDR_BUFFERS) {
    2202           0 :         }
    2203           0 :         return NDR_ERR_SUCCESS;
    2204             : }
    2205             : 
    2206           0 : _PUBLIC_ enum ndr_err_code ndr_pull_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NTLMSSP_MESSAGE_SIGNATURE *r)
    2207             : {
    2208           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2209           0 :         if (ndr_flags & NDR_SCALARS) {
    2210           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2211           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version));
    2212           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RandomPad));
    2213           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Checksum));
    2214           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SeqNum));
    2215           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2216             :         }
    2217           0 :         if (ndr_flags & NDR_BUFFERS) {
    2218           0 :         }
    2219           0 :         return NDR_ERR_SUCCESS;
    2220             : }
    2221             : 
    2222           0 : static void ndr_print_flags_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NTLMSSP_MESSAGE_SIGNATURE *r)
    2223             : {
    2224           0 :         ndr_print_NTLMSSP_MESSAGE_SIGNATURE(ndr, name, r);
    2225           0 : }
    2226             : 
    2227           0 : _PUBLIC_ void ndr_print_NTLMSSP_MESSAGE_SIGNATURE(struct ndr_print *ndr, const char *name, const struct NTLMSSP_MESSAGE_SIGNATURE *r)
    2228             : {
    2229           0 :         ndr_print_struct(ndr, name, "NTLMSSP_MESSAGE_SIGNATURE");
    2230           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2231           0 :         ndr->depth++;
    2232           0 :         ndr_print_uint32(ndr, "Version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NTLMSSP_SIGN_VERSION:r->Version);
    2233           0 :         ndr_print_uint32(ndr, "RandomPad", r->RandomPad);
    2234           0 :         ndr_print_uint32(ndr, "Checksum", r->Checksum);
    2235           0 :         ndr_print_uint32(ndr, "SeqNum", r->SeqNum);
    2236           0 :         ndr->depth--;
    2237             : }
    2238             : 
    2239           0 : _PUBLIC_ enum ndr_err_code ndr_push_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 *r)
    2240             : {
    2241             :         {
    2242           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    2243           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2244           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2245           0 :                 if (ndr_flags & NDR_SCALARS) {
    2246           0 :                         NDR_CHECK(ndr_push_align(ndr, 4));
    2247           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, NTLMSSP_SIGN_VERSION));
    2248           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8));
    2249           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->SeqNum));
    2250           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2251             :                 }
    2252           0 :                 if (ndr_flags & NDR_BUFFERS) {
    2253           0 :                 }
    2254           0 :                 ndr->flags = _flags_save_STRUCT;
    2255             :         }
    2256           0 :         return NDR_ERR_SUCCESS;
    2257             : }
    2258             : 
    2259           0 : _PUBLIC_ enum ndr_err_code ndr_pull_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 *r)
    2260             : {
    2261           0 :         uint32_t size_Checksum_0 = 0;
    2262             :         {
    2263           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    2264           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2265           0 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2266           0 :                 if (ndr_flags & NDR_SCALARS) {
    2267           0 :                         NDR_CHECK(ndr_pull_align(ndr, 4));
    2268           0 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Version));
    2269           0 :                         size_Checksum_0 = 8;
    2270           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, size_Checksum_0));
    2271           0 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->SeqNum));
    2272           0 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2273             :                 }
    2274           0 :                 if (ndr_flags & NDR_BUFFERS) {
    2275           0 :                 }
    2276           0 :                 ndr->flags = _flags_save_STRUCT;
    2277             :         }
    2278           0 :         return NDR_ERR_SUCCESS;
    2279             : }
    2280             : 
    2281           0 : static void ndr_print_flags_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 *r)
    2282             : {
    2283           0 :         ndr_print_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(ndr, name, r);
    2284           0 : }
    2285             : 
    2286           0 : _PUBLIC_ void ndr_print_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2(struct ndr_print *ndr, const char *name, const struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 *r)
    2287             : {
    2288           0 :         ndr_print_struct(ndr, name, "NTLMSSP_MESSAGE_SIGNATURE_NTLMv2");
    2289           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2290             :         {
    2291           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
    2292           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    2293           0 :                 ndr->depth++;
    2294           0 :                 ndr_print_uint32(ndr, "Version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NTLMSSP_SIGN_VERSION:r->Version);
    2295           0 :                 ndr_print_array_uint8(ndr, "Checksum", r->Checksum, 8);
    2296           0 :                 ndr_print_uint32(ndr, "SeqNum", r->SeqNum);
    2297           0 :                 ndr->depth--;
    2298           0 :                 ndr->flags = _flags_save_STRUCT;
    2299             :         }
    2300             : }
    2301             : 
    2302             : #ifndef SKIP_NDR_TABLE_ntlmssp
    2303             : static const struct ndr_interface_public_struct ntlmssp_public_structs[] = {
    2304             :         {
    2305             :                 .name = "ntlmssp_VERSION",
    2306             :                 .struct_size = sizeof(struct ntlmssp_VERSION ),
    2307             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_ntlmssp_VERSION,
    2308             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ntlmssp_VERSION,
    2309             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_ntlmssp_VERSION,
    2310             :         },
    2311             :         {
    2312             :                 .name = "NEGOTIATE_MESSAGE",
    2313             :                 .struct_size = sizeof(struct NEGOTIATE_MESSAGE ),
    2314             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NEGOTIATE_MESSAGE,
    2315             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NEGOTIATE_MESSAGE,
    2316             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NEGOTIATE_MESSAGE,
    2317             :         },
    2318             :         {
    2319             :                 .name = "AV_PAIR",
    2320             :                 .struct_size = sizeof(struct AV_PAIR ),
    2321             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_AV_PAIR,
    2322             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_AV_PAIR,
    2323             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_AV_PAIR,
    2324             :         },
    2325             :         {
    2326             :                 .name = "AV_PAIR_LIST",
    2327             :                 .struct_size = sizeof(struct AV_PAIR_LIST ),
    2328             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_AV_PAIR_LIST,
    2329             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_AV_PAIR_LIST,
    2330             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_AV_PAIR_LIST,
    2331             :         },
    2332             :         {
    2333             :                 .name = "CHALLENGE_MESSAGE",
    2334             :                 .struct_size = sizeof(struct CHALLENGE_MESSAGE ),
    2335             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_CHALLENGE_MESSAGE,
    2336             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CHALLENGE_MESSAGE,
    2337             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_CHALLENGE_MESSAGE,
    2338             :         },
    2339             :         {
    2340             :                 .name = "LM_RESPONSE",
    2341             :                 .struct_size = sizeof(struct LM_RESPONSE ),
    2342             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_LM_RESPONSE,
    2343             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_LM_RESPONSE,
    2344             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_LM_RESPONSE,
    2345             :         },
    2346             :         {
    2347             :                 .name = "LMv2_RESPONSE",
    2348             :                 .struct_size = sizeof(struct LMv2_RESPONSE ),
    2349             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_LMv2_RESPONSE,
    2350             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_LMv2_RESPONSE,
    2351             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_LMv2_RESPONSE,
    2352             :         },
    2353             :         {
    2354             :                 .name = "NTLM_RESPONSE",
    2355             :                 .struct_size = sizeof(struct NTLM_RESPONSE ),
    2356             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NTLM_RESPONSE,
    2357             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NTLM_RESPONSE,
    2358             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NTLM_RESPONSE,
    2359             :         },
    2360             :         {
    2361             :                 .name = "NTLMv2_RESPONSE",
    2362             :                 .struct_size = sizeof(struct NTLMv2_RESPONSE ),
    2363             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NTLMv2_RESPONSE,
    2364             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NTLMv2_RESPONSE,
    2365             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NTLMv2_RESPONSE,
    2366             :         },
    2367             :         {
    2368             :                 .name = "AUTHENTICATE_MESSAGE",
    2369             :                 .struct_size = sizeof(struct AUTHENTICATE_MESSAGE ),
    2370             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_AUTHENTICATE_MESSAGE,
    2371             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_AUTHENTICATE_MESSAGE,
    2372             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_AUTHENTICATE_MESSAGE,
    2373             :         },
    2374             :         {
    2375             :                 .name = "NTLMSSP_MESSAGE_SIGNATURE",
    2376             :                 .struct_size = sizeof(struct NTLMSSP_MESSAGE_SIGNATURE ),
    2377             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NTLMSSP_MESSAGE_SIGNATURE,
    2378             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NTLMSSP_MESSAGE_SIGNATURE,
    2379             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NTLMSSP_MESSAGE_SIGNATURE,
    2380             :         },
    2381             :         {
    2382             :                 .name = "NTLMSSP_MESSAGE_SIGNATURE_NTLMv2",
    2383             :                 .struct_size = sizeof(struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 ),
    2384             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2,
    2385             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2,
    2386             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_NTLMSSP_MESSAGE_SIGNATURE_NTLMv2,
    2387             :         },
    2388             :         { .name = NULL }
    2389             : };
    2390             : 
    2391             : static const struct ndr_interface_call ntlmssp_calls[] = {
    2392             :         { .name = NULL }
    2393             : };
    2394             : 
    2395             : static const char * const ntlmssp_endpoint_strings[] = {
    2396             :         "ncacn_np:[\\pipe\\ntlmssp]", 
    2397             : };
    2398             : 
    2399             : static const struct ndr_interface_string_array ntlmssp_endpoints = {
    2400             :         .count  = 1,
    2401             :         .names  = ntlmssp_endpoint_strings
    2402             : };
    2403             : 
    2404             : static const char * const ntlmssp_authservice_strings[] = {
    2405             :         "host", 
    2406             : };
    2407             : 
    2408             : static const struct ndr_interface_string_array ntlmssp_authservices = {
    2409             :         .count  = 1,
    2410             :         .names  = ntlmssp_authservice_strings
    2411             : };
    2412             : 
    2413             : 
    2414             : const struct ndr_interface_table ndr_table_ntlmssp = {
    2415             :         .name           = "ntlmssp",
    2416             :         .syntax_id      = {
    2417             :                 {0x6e746c6d,0x7373,0x700a,{0x00,0x00},{0x00,0x00,0x00,0x00}},
    2418             :                 NDR_NTLMSSP_VERSION
    2419             :         },
    2420             :         .helpstring     = NDR_NTLMSSP_HELPSTRING,
    2421             :         .num_calls      = 0,
    2422             :         .calls          = ntlmssp_calls,
    2423             :         .num_public_structs     = 12,
    2424             :         .public_structs         = ntlmssp_public_structs,
    2425             :         .endpoints      = &ntlmssp_endpoints,
    2426             :         .authservices   = &ntlmssp_authservices
    2427             : };
    2428             : 
    2429             : #endif /* SKIP_NDR_TABLE_ntlmssp */

Generated by: LCOV version 1.14