4bbb56a8b0587122ac39f066d88738608a90241d
[ira/wip.git] / librpc / gen_ndr / ndr_schannel.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_schannel.h"
5
6 #include "librpc/gen_ndr/ndr_netlogon.h"
7 #include "librpc/gen_ndr/ndr_nbt.h"
8 static enum ndr_err_code ndr_push_schannel_bind_3(struct ndr_push *ndr, int ndr_flags, const struct schannel_bind_3 *r)
9 {
10         if (ndr_flags & NDR_SCALARS) {
11                 NDR_CHECK(ndr_push_align(ndr, 4));
12                 {
13                         uint32_t _flags_save_string = ndr->flags;
14                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
15                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain));
16                         ndr->flags = _flags_save_string;
17                 }
18                 {
19                         uint32_t _flags_save_string = ndr->flags;
20                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
21                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->workstation));
22                         ndr->flags = _flags_save_string;
23                 }
24         }
25         if (ndr_flags & NDR_BUFFERS) {
26         }
27         return NDR_ERR_SUCCESS;
28 }
29
30 static enum ndr_err_code ndr_pull_schannel_bind_3(struct ndr_pull *ndr, int ndr_flags, struct schannel_bind_3 *r)
31 {
32         if (ndr_flags & NDR_SCALARS) {
33                 NDR_CHECK(ndr_pull_align(ndr, 4));
34                 {
35                         uint32_t _flags_save_string = ndr->flags;
36                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
37                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain));
38                         ndr->flags = _flags_save_string;
39                 }
40                 {
41                         uint32_t _flags_save_string = ndr->flags;
42                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
43                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->workstation));
44                         ndr->flags = _flags_save_string;
45                 }
46         }
47         if (ndr_flags & NDR_BUFFERS) {
48         }
49         return NDR_ERR_SUCCESS;
50 }
51
52 _PUBLIC_ void ndr_print_schannel_bind_3(struct ndr_print *ndr, const char *name, const struct schannel_bind_3 *r)
53 {
54         ndr_print_struct(ndr, name, "schannel_bind_3");
55         ndr->depth++;
56         ndr_print_string(ndr, "domain", r->domain);
57         ndr_print_string(ndr, "workstation", r->workstation);
58         ndr->depth--;
59 }
60
61 static enum ndr_err_code ndr_push_schannel_bind_23(struct ndr_push *ndr, int ndr_flags, const struct schannel_bind_23 *r)
62 {
63         if (ndr_flags & NDR_SCALARS) {
64                 NDR_CHECK(ndr_push_align(ndr, 4));
65                 {
66                         uint32_t _flags_save_string = ndr->flags;
67                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
68                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain));
69                         ndr->flags = _flags_save_string;
70                 }
71                 {
72                         uint32_t _flags_save_string = ndr->flags;
73                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
74                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->workstation));
75                         ndr->flags = _flags_save_string;
76                 }
77                 NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dnsdomain));
78                 NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->dnsworkstation));
79         }
80         if (ndr_flags & NDR_BUFFERS) {
81         }
82         return NDR_ERR_SUCCESS;
83 }
84
85 static enum ndr_err_code ndr_pull_schannel_bind_23(struct ndr_pull *ndr, int ndr_flags, struct schannel_bind_23 *r)
86 {
87         if (ndr_flags & NDR_SCALARS) {
88                 NDR_CHECK(ndr_pull_align(ndr, 4));
89                 {
90                         uint32_t _flags_save_string = ndr->flags;
91                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
92                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain));
93                         ndr->flags = _flags_save_string;
94                 }
95                 {
96                         uint32_t _flags_save_string = ndr->flags;
97                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
98                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->workstation));
99                         ndr->flags = _flags_save_string;
100                 }
101                 NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dnsdomain));
102                 NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->dnsworkstation));
103         }
104         if (ndr_flags & NDR_BUFFERS) {
105         }
106         return NDR_ERR_SUCCESS;
107 }
108
109 _PUBLIC_ void ndr_print_schannel_bind_23(struct ndr_print *ndr, const char *name, const struct schannel_bind_23 *r)
110 {
111         ndr_print_struct(ndr, name, "schannel_bind_23");
112         ndr->depth++;
113         ndr_print_string(ndr, "domain", r->domain);
114         ndr_print_string(ndr, "workstation", r->workstation);
115         ndr_print_nbt_string(ndr, "dnsdomain", r->dnsdomain);
116         ndr_print_nbt_string(ndr, "dnsworkstation", r->dnsworkstation);
117         ndr->depth--;
118 }
119
120 static enum ndr_err_code ndr_push_schannel_bind_info(struct ndr_push *ndr, int ndr_flags, const union schannel_bind_info *r)
121 {
122         if (ndr_flags & NDR_SCALARS) {
123                 int level = ndr_push_get_switch_value(ndr, r);
124                 switch (level) {
125                         case 3: {
126                                 NDR_CHECK(ndr_push_schannel_bind_3(ndr, NDR_SCALARS, &r->info3));
127                         break; }
128
129                         case 23: {
130                                 NDR_CHECK(ndr_push_schannel_bind_23(ndr, NDR_SCALARS, &r->info23));
131                         break; }
132
133                         default:
134                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
135                 }
136         }
137         if (ndr_flags & NDR_BUFFERS) {
138                 int level = ndr_push_get_switch_value(ndr, r);
139                 switch (level) {
140                         case 3:
141                         break;
142
143                         case 23:
144                         break;
145
146                         default:
147                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
148                 }
149         }
150         return NDR_ERR_SUCCESS;
151 }
152
153 static enum ndr_err_code ndr_pull_schannel_bind_info(struct ndr_pull *ndr, int ndr_flags, union schannel_bind_info *r)
154 {
155         int level;
156         level = ndr_pull_get_switch_value(ndr, r);
157         if (ndr_flags & NDR_SCALARS) {
158                 switch (level) {
159                         case 3: {
160                                 NDR_CHECK(ndr_pull_schannel_bind_3(ndr, NDR_SCALARS, &r->info3));
161                         break; }
162
163                         case 23: {
164                                 NDR_CHECK(ndr_pull_schannel_bind_23(ndr, NDR_SCALARS, &r->info23));
165                         break; }
166
167                         default:
168                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
169                 }
170         }
171         if (ndr_flags & NDR_BUFFERS) {
172                 switch (level) {
173                         case 3:
174                         break;
175
176                         case 23:
177                         break;
178
179                         default:
180                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
181                 }
182         }
183         return NDR_ERR_SUCCESS;
184 }
185
186 _PUBLIC_ void ndr_print_schannel_bind_info(struct ndr_print *ndr, const char *name, const union schannel_bind_info *r)
187 {
188         int level;
189         level = ndr_print_get_switch_value(ndr, r);
190         ndr_print_union(ndr, name, level, "schannel_bind_info");
191         switch (level) {
192                 case 3:
193                         ndr_print_schannel_bind_3(ndr, "info3", &r->info3);
194                 break;
195
196                 case 23:
197                         ndr_print_schannel_bind_23(ndr, "info23", &r->info23);
198                 break;
199
200                 default:
201                         ndr_print_bad_level(ndr, name, level);
202         }
203 }
204
205 _PUBLIC_ enum ndr_err_code ndr_push_schannel_bind(struct ndr_push *ndr, int ndr_flags, const struct schannel_bind *r)
206 {
207         if (ndr_flags & NDR_SCALARS) {
208                 NDR_CHECK(ndr_push_align(ndr, 4));
209                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
210                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bind_type));
211                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->bind_type));
212                 NDR_CHECK(ndr_push_schannel_bind_info(ndr, NDR_SCALARS, &r->u));
213         }
214         if (ndr_flags & NDR_BUFFERS) {
215         }
216         return NDR_ERR_SUCCESS;
217 }
218
219 _PUBLIC_ enum ndr_err_code ndr_pull_schannel_bind(struct ndr_pull *ndr, int ndr_flags, struct schannel_bind *r)
220 {
221         if (ndr_flags & NDR_SCALARS) {
222                 NDR_CHECK(ndr_pull_align(ndr, 4));
223                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
224                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bind_type));
225                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->bind_type));
226                 NDR_CHECK(ndr_pull_schannel_bind_info(ndr, NDR_SCALARS, &r->u));
227         }
228         if (ndr_flags & NDR_BUFFERS) {
229         }
230         return NDR_ERR_SUCCESS;
231 }
232
233 _PUBLIC_ void ndr_print_schannel_bind(struct ndr_print *ndr, const char *name, const struct schannel_bind *r)
234 {
235         ndr_print_struct(ndr, name, "schannel_bind");
236         ndr->depth++;
237         ndr_print_uint32(ndr, "unknown1", r->unknown1);
238         ndr_print_uint32(ndr, "bind_type", r->bind_type);
239         ndr_print_set_switch_value(ndr, &r->u, r->bind_type);
240         ndr_print_schannel_bind_info(ndr, "u", &r->u);
241         ndr->depth--;
242 }
243
244 _PUBLIC_ enum ndr_err_code ndr_push_schannel_bind_ack(struct ndr_push *ndr, int ndr_flags, const struct schannel_bind_ack *r)
245 {
246         if (ndr_flags & NDR_SCALARS) {
247                 NDR_CHECK(ndr_push_align(ndr, 4));
248                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
249                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
250                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
251         }
252         if (ndr_flags & NDR_BUFFERS) {
253         }
254         return NDR_ERR_SUCCESS;
255 }
256
257 _PUBLIC_ enum ndr_err_code ndr_pull_schannel_bind_ack(struct ndr_pull *ndr, int ndr_flags, struct schannel_bind_ack *r)
258 {
259         if (ndr_flags & NDR_SCALARS) {
260                 NDR_CHECK(ndr_pull_align(ndr, 4));
261                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
262                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
263                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
264         }
265         if (ndr_flags & NDR_BUFFERS) {
266         }
267         return NDR_ERR_SUCCESS;
268 }
269
270 _PUBLIC_ void ndr_print_schannel_bind_ack(struct ndr_print *ndr, const char *name, const struct schannel_bind_ack *r)
271 {
272         ndr_print_struct(ndr, name, "schannel_bind_ack");
273         ndr->depth++;
274         ndr_print_uint32(ndr, "unknown1", r->unknown1);
275         ndr_print_uint32(ndr, "unknown2", r->unknown2);
276         ndr_print_uint32(ndr, "unknown3", r->unknown3);
277         ndr->depth--;
278 }
279
280 _PUBLIC_ enum ndr_err_code ndr_push_netlogon_creds_CredentialState(struct ndr_push *ndr, int ndr_flags, const struct netlogon_creds_CredentialState *r)
281 {
282         {
283                 uint32_t _flags_save_STRUCT = ndr->flags;
284                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
285                 if (ndr_flags & NDR_SCALARS) {
286                         NDR_CHECK(ndr_push_align(ndr, 4));
287                         NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->negotiate_flags));
288                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->session_key, 16));
289                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sequence));
290                         NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->seed));
291                         NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client));
292                         NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server));
293                         NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->secure_channel_type));
294                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF8)));
295                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
296                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF8)));
297                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_name, ndr_charset_length(r->computer_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
298                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
299                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
300                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
301                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
302                         NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
303                 }
304                 if (ndr_flags & NDR_BUFFERS) {
305                         if (r->sid) {
306                                 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->sid));
307                         }
308                 }
309                 ndr->flags = _flags_save_STRUCT;
310         }
311         return NDR_ERR_SUCCESS;
312 }
313
314 _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_creds_CredentialState(struct ndr_pull *ndr, int ndr_flags, struct netlogon_creds_CredentialState *r)
315 {
316         uint32_t _ptr_sid;
317         TALLOC_CTX *_mem_save_sid_0;
318         {
319                 uint32_t _flags_save_STRUCT = ndr->flags;
320                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
321                 if (ndr_flags & NDR_SCALARS) {
322                         NDR_CHECK(ndr_pull_align(ndr, 4));
323                         NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->negotiate_flags));
324                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->session_key, 16));
325                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sequence));
326                         NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->seed));
327                         NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client));
328                         NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server));
329                         NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->secure_channel_type));
330                         NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_name));
331                         NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_name));
332                         if (ndr_get_array_length(ndr, &r->computer_name) > ndr_get_array_size(ndr, &r->computer_name)) {
333                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->computer_name), ndr_get_array_length(ndr, &r->computer_name));
334                         }
335                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->computer_name), sizeof(uint8_t)));
336                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_name, ndr_get_array_length(ndr, &r->computer_name), sizeof(uint8_t), CH_UTF8));
337                         NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
338                         NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
339                         if (ndr_get_array_length(ndr, &r->account_name) > ndr_get_array_size(ndr, &r->account_name)) {
340                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->account_name), ndr_get_array_length(ndr, &r->account_name));
341                         }
342                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->account_name), sizeof(uint8_t)));
343                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, ndr_get_array_length(ndr, &r->account_name), sizeof(uint8_t), CH_UTF8));
344                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
345                         if (_ptr_sid) {
346                                 NDR_PULL_ALLOC(ndr, r->sid);
347                         } else {
348                                 r->sid = NULL;
349                         }
350                 }
351                 if (ndr_flags & NDR_BUFFERS) {
352                         if (r->sid) {
353                                 _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
354                                 NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
355                                 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->sid));
356                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
357                         }
358                 }
359                 ndr->flags = _flags_save_STRUCT;
360         }
361         return NDR_ERR_SUCCESS;
362 }
363
364 _PUBLIC_ void ndr_print_netlogon_creds_CredentialState(struct ndr_print *ndr, const char *name, const struct netlogon_creds_CredentialState *r)
365 {
366         ndr_print_struct(ndr, name, "netlogon_creds_CredentialState");
367         {
368                 uint32_t _flags_save_STRUCT = ndr->flags;
369                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
370                 ndr->depth++;
371                 ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", r->negotiate_flags);
372                 ndr_print_array_uint8(ndr, "session_key", r->session_key, 16);
373                 ndr_print_uint32(ndr, "sequence", r->sequence);
374                 ndr_print_netr_Credential(ndr, "seed", &r->seed);
375                 ndr_print_netr_Credential(ndr, "client", &r->client);
376                 ndr_print_netr_Credential(ndr, "server", &r->server);
377                 ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->secure_channel_type);
378                 ndr_print_string(ndr, "computer_name", r->computer_name);
379                 ndr_print_string(ndr, "account_name", r->account_name);
380                 ndr_print_ptr(ndr, "sid", r->sid);
381                 ndr->depth++;
382                 if (r->sid) {
383                         ndr_print_dom_sid(ndr, "sid", r->sid);
384                 }
385                 ndr->depth--;
386                 ndr->depth--;
387                 ndr->flags = _flags_save_STRUCT;
388         }
389 }
390
391 static enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_TYPE(struct ndr_push *ndr, int ndr_flags, enum NL_AUTH_MESSAGE_TYPE r)
392 {
393         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
394         return NDR_ERR_SUCCESS;
395 }
396
397 static enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_TYPE(struct ndr_pull *ndr, int ndr_flags, enum NL_AUTH_MESSAGE_TYPE *r)
398 {
399         uint32_t v;
400         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
401         *r = v;
402         return NDR_ERR_SUCCESS;
403 }
404
405 _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE_TYPE(struct ndr_print *ndr, const char *name, enum NL_AUTH_MESSAGE_TYPE r)
406 {
407         const char *val = NULL;
408
409         switch (r) {
410                 case NL_NEGOTIATE_REQUEST: val = "NL_NEGOTIATE_REQUEST"; break;
411                 case NL_NEGOTIATE_RESPONSE: val = "NL_NEGOTIATE_RESPONSE"; break;
412         }
413         ndr_print_enum(ndr, name, "ENUM", val, r);
414 }
415
416 static enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_FLAGS(struct ndr_push *ndr, int ndr_flags, uint32_t r)
417 {
418         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
419         return NDR_ERR_SUCCESS;
420 }
421
422 static enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_FLAGS(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
423 {
424         uint32_t v;
425         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
426         *r = v;
427         return NDR_ERR_SUCCESS;
428 }
429
430 _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r)
431 {
432         ndr_print_uint32(ndr, name, r);
433         ndr->depth++;
434         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_OEM_NETBIOS_DOMAIN_NAME", NL_FLAG_OEM_NETBIOS_DOMAIN_NAME, r);
435         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_OEM_NETBIOS_COMPUTER_NAME", NL_FLAG_OEM_NETBIOS_COMPUTER_NAME, r);
436         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_UTF8_DNS_DOMAIN_NAME", NL_FLAG_UTF8_DNS_DOMAIN_NAME, r);
437         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_UTF8_DNS_HOST_NAME", NL_FLAG_UTF8_DNS_HOST_NAME, r);
438         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME", NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME, r);
439         ndr->depth--;
440 }
441
442 _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER(struct ndr_push *ndr, int ndr_flags, const union NL_AUTH_MESSAGE_BUFFER *r)
443 {
444         if (ndr_flags & NDR_SCALARS) {
445                 int level = ndr_push_get_switch_value(ndr, r);
446                 switch (level) {
447                         case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME: {
448                                 {
449                                         uint32_t _flags_save_string = ndr->flags;
450                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
451                                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->a));
452                                         ndr->flags = _flags_save_string;
453                                 }
454                         break; }
455
456                         case NL_FLAG_OEM_NETBIOS_COMPUTER_NAME: {
457                                 {
458                                         uint32_t _flags_save_string = ndr->flags;
459                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
460                                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->a));
461                                         ndr->flags = _flags_save_string;
462                                 }
463                         break; }
464
465                         case NL_FLAG_UTF8_DNS_DOMAIN_NAME: {
466                                 NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->u));
467                         break; }
468
469                         case NL_FLAG_UTF8_DNS_HOST_NAME: {
470                                 NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->u));
471                         break; }
472
473                         case NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME: {
474                                 NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->u));
475                         break; }
476
477                         default: {
478                         break; }
479
480                 }
481         }
482         if (ndr_flags & NDR_BUFFERS) {
483                 int level = ndr_push_get_switch_value(ndr, r);
484                 switch (level) {
485                         case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME:
486                         break;
487
488                         case NL_FLAG_OEM_NETBIOS_COMPUTER_NAME:
489                         break;
490
491                         case NL_FLAG_UTF8_DNS_DOMAIN_NAME:
492                         break;
493
494                         case NL_FLAG_UTF8_DNS_HOST_NAME:
495                         break;
496
497                         case NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME:
498                         break;
499
500                         default:
501                         break;
502
503                 }
504         }
505         return NDR_ERR_SUCCESS;
506 }
507
508 _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER(struct ndr_pull *ndr, int ndr_flags, union NL_AUTH_MESSAGE_BUFFER *r)
509 {
510         int level;
511         level = ndr_pull_get_switch_value(ndr, r);
512         if (ndr_flags & NDR_SCALARS) {
513                 switch (level) {
514                         case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME: {
515                                 {
516                                         uint32_t _flags_save_string = ndr->flags;
517                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
518                                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->a));
519                                         ndr->flags = _flags_save_string;
520                                 }
521                         break; }
522
523                         case NL_FLAG_OEM_NETBIOS_COMPUTER_NAME: {
524                                 {
525                                         uint32_t _flags_save_string = ndr->flags;
526                                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
527                                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->a));
528                                         ndr->flags = _flags_save_string;
529                                 }
530                         break; }
531
532                         case NL_FLAG_UTF8_DNS_DOMAIN_NAME: {
533                                 NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->u));
534                         break; }
535
536                         case NL_FLAG_UTF8_DNS_HOST_NAME: {
537                                 NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->u));
538                         break; }
539
540                         case NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME: {
541                                 NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->u));
542                         break; }
543
544                         default: {
545                         break; }
546
547                 }
548         }
549         if (ndr_flags & NDR_BUFFERS) {
550                 switch (level) {
551                         case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME:
552                         break;
553
554                         case NL_FLAG_OEM_NETBIOS_COMPUTER_NAME:
555                         break;
556
557                         case NL_FLAG_UTF8_DNS_DOMAIN_NAME:
558                         break;
559
560                         case NL_FLAG_UTF8_DNS_HOST_NAME:
561                         break;
562
563                         case NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME:
564                         break;
565
566                         default:
567                         break;
568
569                 }
570         }
571         return NDR_ERR_SUCCESS;
572 }
573
574 _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_push *ndr, int ndr_flags, const union NL_AUTH_MESSAGE_BUFFER_REPLY *r)
575 {
576         if (ndr_flags & NDR_SCALARS) {
577                 int level = ndr_push_get_switch_value(ndr, r);
578                 switch (level) {
579                         case NL_NEGOTIATE_RESPONSE: {
580                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy));
581                         break; }
582
583                         default: {
584                         break; }
585
586                 }
587         }
588         if (ndr_flags & NDR_BUFFERS) {
589                 int level = ndr_push_get_switch_value(ndr, r);
590                 switch (level) {
591                         case NL_NEGOTIATE_RESPONSE:
592                         break;
593
594                         default:
595                         break;
596
597                 }
598         }
599         return NDR_ERR_SUCCESS;
600 }
601
602 _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_pull *ndr, int ndr_flags, union NL_AUTH_MESSAGE_BUFFER_REPLY *r)
603 {
604         int level;
605         level = ndr_pull_get_switch_value(ndr, r);
606         if (ndr_flags & NDR_SCALARS) {
607                 switch (level) {
608                         case NL_NEGOTIATE_RESPONSE: {
609                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy));
610                         break; }
611
612                         default: {
613                         break; }
614
615                 }
616         }
617         if (ndr_flags & NDR_BUFFERS) {
618                 switch (level) {
619                         case NL_NEGOTIATE_RESPONSE:
620                         break;
621
622                         default:
623                         break;
624
625                 }
626         }
627         return NDR_ERR_SUCCESS;
628 }
629
630 _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE(struct ndr_push *ndr, int ndr_flags, const struct NL_AUTH_MESSAGE *r)
631 {
632         {
633                 uint32_t _flags_save_STRUCT = ndr->flags;
634                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
635                 if (ndr_flags & NDR_SCALARS) {
636                         NDR_CHECK(ndr_push_align(ndr, 4));
637                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_TYPE(ndr, NDR_SCALARS, r->MessageType));
638                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_FLAGS(ndr, NDR_SCALARS, r->Flags));
639                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
640                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_domain));
641                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
642                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_computer));
643                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
644                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_domain));
645                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
646                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_host));
647                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
648                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer));
649                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
650                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer));
651                 }
652                 if (ndr_flags & NDR_BUFFERS) {
653                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain));
654                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_computer));
655                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_domain));
656                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_host));
657                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_netbios_computer));
658                         NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_BUFFERS, &r->Buffer));
659                 }
660                 ndr->flags = _flags_save_STRUCT;
661         }
662         return NDR_ERR_SUCCESS;
663 }
664
665 _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE(struct ndr_pull *ndr, int ndr_flags, struct NL_AUTH_MESSAGE *r)
666 {
667         {
668                 uint32_t _flags_save_STRUCT = ndr->flags;
669                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
670                 if (ndr_flags & NDR_SCALARS) {
671                         NDR_CHECK(ndr_pull_align(ndr, 4));
672                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_TYPE(ndr, NDR_SCALARS, &r->MessageType));
673                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_FLAGS(ndr, NDR_SCALARS, &r->Flags));
674                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
675                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_domain));
676                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
677                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_computer));
678                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
679                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_domain));
680                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
681                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_host));
682                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
683                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer));
684                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
685                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer));
686                 }
687                 if (ndr_flags & NDR_BUFFERS) {
688                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain));
689                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_computer));
690                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_domain));
691                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_host));
692                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_netbios_computer));
693                         NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_BUFFERS, &r->Buffer));
694                 }
695                 ndr->flags = _flags_save_STRUCT;
696         }
697         return NDR_ERR_SUCCESS;
698 }
699
700 _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE(struct ndr_print *ndr, const char *name, const struct NL_AUTH_MESSAGE *r)
701 {
702         ndr_print_struct(ndr, name, "NL_AUTH_MESSAGE");
703         {
704                 uint32_t _flags_save_STRUCT = ndr->flags;
705                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
706                 ndr->depth++;
707                 ndr_print_NL_AUTH_MESSAGE_TYPE(ndr, "MessageType", r->MessageType);
708                 ndr_print_NL_AUTH_MESSAGE_FLAGS(ndr, "Flags", r->Flags);
709                 ndr_print_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME);
710                 ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "oem_netbios_domain", &r->oem_netbios_domain);
711                 ndr_print_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME);
712                 ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "oem_netbios_computer", &r->oem_netbios_computer);
713                 ndr_print_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME);
714                 ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "utf8_dns_domain", &r->utf8_dns_domain);
715                 ndr_print_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME);
716                 ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "utf8_dns_host", &r->utf8_dns_host);
717                 ndr_print_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME);
718                 ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "utf8_netbios_computer", &r->utf8_netbios_computer);
719                 ndr_print_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE);
720                 ndr_print_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, "Buffer", &r->Buffer);
721                 ndr->depth--;
722                 ndr->flags = _flags_save_STRUCT;
723         }
724 }
725
726 static enum ndr_err_code ndr_push_NL_SIGNATURE_ALGORITHM(struct ndr_push *ndr, int ndr_flags, enum NL_SIGNATURE_ALGORITHM r)
727 {
728         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
729         return NDR_ERR_SUCCESS;
730 }
731
732 static enum ndr_err_code ndr_pull_NL_SIGNATURE_ALGORITHM(struct ndr_pull *ndr, int ndr_flags, enum NL_SIGNATURE_ALGORITHM *r)
733 {
734         uint16_t v;
735         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
736         *r = v;
737         return NDR_ERR_SUCCESS;
738 }
739
740 _PUBLIC_ void ndr_print_NL_SIGNATURE_ALGORITHM(struct ndr_print *ndr, const char *name, enum NL_SIGNATURE_ALGORITHM r)
741 {
742         const char *val = NULL;
743
744         switch (r) {
745                 case NL_SIGN_HMAC_SHA256: val = "NL_SIGN_HMAC_SHA256"; break;
746                 case NL_SIGN_HMAC_MD5: val = "NL_SIGN_HMAC_MD5"; break;
747         }
748         ndr_print_enum(ndr, name, "ENUM", val, r);
749 }
750
751 static enum ndr_err_code ndr_push_NL_SEAL_ALGORITHM(struct ndr_push *ndr, int ndr_flags, enum NL_SEAL_ALGORITHM r)
752 {
753         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
754         return NDR_ERR_SUCCESS;
755 }
756
757 static enum ndr_err_code ndr_pull_NL_SEAL_ALGORITHM(struct ndr_pull *ndr, int ndr_flags, enum NL_SEAL_ALGORITHM *r)
758 {
759         uint16_t v;
760         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
761         *r = v;
762         return NDR_ERR_SUCCESS;
763 }
764
765 _PUBLIC_ void ndr_print_NL_SEAL_ALGORITHM(struct ndr_print *ndr, const char *name, enum NL_SEAL_ALGORITHM r)
766 {
767         const char *val = NULL;
768
769         switch (r) {
770                 case NL_SEAL_AES128: val = "NL_SEAL_AES128"; break;
771                 case NL_SEAL_RC4: val = "NL_SEAL_RC4"; break;
772                 case NL_SEAL_NONE: val = "NL_SEAL_NONE"; break;
773         }
774         ndr_print_enum(ndr, name, "ENUM", val, r);
775 }
776
777 _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_SIGNATURE(struct ndr_push *ndr, int ndr_flags, const struct NL_AUTH_SIGNATURE *r)
778 {
779         {
780                 uint32_t _flags_save_STRUCT = ndr->flags;
781                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
782                 if (ndr_flags & NDR_SCALARS) {
783                         NDR_CHECK(ndr_push_align(ndr, 2));
784                         NDR_CHECK(ndr_push_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, NL_SIGN_HMAC_MD5));
785                         NDR_CHECK(ndr_push_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, r->SealAlgorithm));
786                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Pad));
787                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Flags));
788                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8));
789                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8));
790                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8));
791                 }
792                 if (ndr_flags & NDR_BUFFERS) {
793                 }
794                 ndr->flags = _flags_save_STRUCT;
795         }
796         return NDR_ERR_SUCCESS;
797 }
798
799 _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_SIGNATURE(struct ndr_pull *ndr, int ndr_flags, struct NL_AUTH_SIGNATURE *r)
800 {
801         {
802                 uint32_t _flags_save_STRUCT = ndr->flags;
803                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
804                 if (ndr_flags & NDR_SCALARS) {
805                         NDR_CHECK(ndr_pull_align(ndr, 2));
806                         NDR_CHECK(ndr_pull_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, &r->SignatureAlgorithm));
807                         NDR_CHECK(ndr_pull_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, &r->SealAlgorithm));
808                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad));
809                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Flags));
810                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8));
811                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8));
812                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8));
813                 }
814                 if (ndr_flags & NDR_BUFFERS) {
815                 }
816                 ndr->flags = _flags_save_STRUCT;
817         }
818         return NDR_ERR_SUCCESS;
819 }
820
821 _PUBLIC_ void ndr_print_NL_AUTH_SIGNATURE(struct ndr_print *ndr, const char *name, const struct NL_AUTH_SIGNATURE *r)
822 {
823         ndr_print_struct(ndr, name, "NL_AUTH_SIGNATURE");
824         {
825                 uint32_t _flags_save_STRUCT = ndr->flags;
826                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
827                 ndr->depth++;
828                 ndr_print_NL_SIGNATURE_ALGORITHM(ndr, "SignatureAlgorithm", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NL_SIGN_HMAC_MD5:r->SignatureAlgorithm);
829                 ndr_print_NL_SEAL_ALGORITHM(ndr, "SealAlgorithm", r->SealAlgorithm);
830                 ndr_print_uint16(ndr, "Pad", r->Pad);
831                 ndr_print_uint16(ndr, "Flags", r->Flags);
832                 ndr_print_array_uint8(ndr, "SequenceNumber", r->SequenceNumber, 8);
833                 ndr_print_array_uint8(ndr, "Checksum", r->Checksum, 8);
834                 ndr_print_array_uint8(ndr, "Confounder", r->Confounder, 8);
835                 ndr->depth--;
836                 ndr->flags = _flags_save_STRUCT;
837         }
838 }
839
840 _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_SHA2_SIGNATURE(struct ndr_push *ndr, int ndr_flags, const struct NL_AUTH_SHA2_SIGNATURE *r)
841 {
842         {
843                 uint32_t _flags_save_STRUCT = ndr->flags;
844                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
845                 if (ndr_flags & NDR_SCALARS) {
846                         NDR_CHECK(ndr_push_align(ndr, 2));
847                         NDR_CHECK(ndr_push_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, NL_SIGN_HMAC_SHA256));
848                         NDR_CHECK(ndr_push_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, r->SealAlgorithm));
849                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Pad));
850                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Flags));
851                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8));
852                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 32));
853                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8));
854                 }
855                 if (ndr_flags & NDR_BUFFERS) {
856                 }
857                 ndr->flags = _flags_save_STRUCT;
858         }
859         return NDR_ERR_SUCCESS;
860 }
861
862 _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_SHA2_SIGNATURE(struct ndr_pull *ndr, int ndr_flags, struct NL_AUTH_SHA2_SIGNATURE *r)
863 {
864         {
865                 uint32_t _flags_save_STRUCT = ndr->flags;
866                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
867                 if (ndr_flags & NDR_SCALARS) {
868                         NDR_CHECK(ndr_pull_align(ndr, 2));
869                         NDR_CHECK(ndr_pull_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, &r->SignatureAlgorithm));
870                         NDR_CHECK(ndr_pull_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, &r->SealAlgorithm));
871                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad));
872                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Flags));
873                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8));
874                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, 32));
875                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8));
876                 }
877                 if (ndr_flags & NDR_BUFFERS) {
878                 }
879                 ndr->flags = _flags_save_STRUCT;
880         }
881         return NDR_ERR_SUCCESS;
882 }
883
884 _PUBLIC_ void ndr_print_NL_AUTH_SHA2_SIGNATURE(struct ndr_print *ndr, const char *name, const struct NL_AUTH_SHA2_SIGNATURE *r)
885 {
886         ndr_print_struct(ndr, name, "NL_AUTH_SHA2_SIGNATURE");
887         {
888                 uint32_t _flags_save_STRUCT = ndr->flags;
889                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
890                 ndr->depth++;
891                 ndr_print_NL_SIGNATURE_ALGORITHM(ndr, "SignatureAlgorithm", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NL_SIGN_HMAC_SHA256:r->SignatureAlgorithm);
892                 ndr_print_NL_SEAL_ALGORITHM(ndr, "SealAlgorithm", r->SealAlgorithm);
893                 ndr_print_uint16(ndr, "Pad", r->Pad);
894                 ndr_print_uint16(ndr, "Flags", r->Flags);
895                 ndr_print_array_uint8(ndr, "SequenceNumber", r->SequenceNumber, 8);
896                 ndr_print_array_uint8(ndr, "Checksum", r->Checksum, 32);
897                 ndr_print_array_uint8(ndr, "Confounder", r->Confounder, 8);
898                 ndr->depth--;
899                 ndr->flags = _flags_save_STRUCT;
900         }
901 }
902