Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_schannel.h"
5 :
6 : #include "librpc/gen_ndr/ndr_netlogon.h"
7 : #include "librpc/gen_ndr/ndr_nbt.h"
8 : #include "librpc/gen_ndr/ndr_misc.h"
9 : #include "librpc/gen_ndr/ndr_security.h"
10 13074 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_creds_CredentialState(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netlogon_creds_CredentialState *r)
11 : {
12 : {
13 13074 : libndr_flags _flags_save_STRUCT = ndr->flags;
14 13074 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
15 13074 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
16 13074 : if (ndr_flags & NDR_SCALARS) {
17 13074 : NDR_CHECK(ndr_push_align(ndr, 5));
18 13074 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->negotiate_flags));
19 13074 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->session_key, 16));
20 13074 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sequence));
21 13074 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->seed));
22 13074 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client));
23 13074 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server));
24 13074 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->secure_channel_type));
25 13074 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF8)));
26 13074 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
27 13074 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF8)));
28 13074 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_name, ndr_charset_length(r->computer_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
29 13074 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
30 13074 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31 13074 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
32 13074 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
33 13074 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
34 13074 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
35 : }
36 13074 : if (ndr_flags & NDR_BUFFERS) {
37 13074 : if (r->sid) {
38 12841 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->sid));
39 : }
40 : }
41 13074 : ndr->flags = _flags_save_STRUCT;
42 : }
43 13074 : return NDR_ERR_SUCCESS;
44 : }
45 :
46 20251 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_creds_CredentialState(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netlogon_creds_CredentialState *r)
47 : {
48 20251 : uint32_t size_session_key_0 = 0;
49 20251 : uint32_t size_computer_name_0 = 0;
50 20251 : uint32_t length_computer_name_0 = 0;
51 20251 : uint32_t size_account_name_0 = 0;
52 20251 : uint32_t length_account_name_0 = 0;
53 1821 : uint32_t _ptr_sid;
54 20251 : TALLOC_CTX *_mem_save_sid_0 = NULL;
55 : {
56 20251 : libndr_flags _flags_save_STRUCT = ndr->flags;
57 20251 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
58 20251 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
59 20251 : if (ndr_flags & NDR_SCALARS) {
60 20251 : NDR_CHECK(ndr_pull_align(ndr, 5));
61 20251 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->negotiate_flags));
62 20251 : size_session_key_0 = 16;
63 20251 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->session_key, size_session_key_0));
64 20251 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sequence));
65 20251 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->seed));
66 20251 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client));
67 20251 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server));
68 20251 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->secure_channel_type));
69 20251 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_name));
70 20251 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_name));
71 20251 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_name, &size_computer_name_0));
72 20251 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_name, &length_computer_name_0));
73 20251 : if (length_computer_name_0 > size_computer_name_0) {
74 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_0, length_computer_name_0);
75 : }
76 20251 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_0, sizeof(uint8_t)));
77 20251 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_name, length_computer_name_0, sizeof(uint8_t), CH_UTF8));
78 20251 : NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
79 20251 : NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
80 20251 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_0));
81 20251 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_0));
82 20251 : if (length_account_name_0 > size_account_name_0) {
83 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_account_name_0, length_account_name_0);
84 : }
85 20251 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_0, sizeof(uint8_t)));
86 20251 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_0, sizeof(uint8_t), CH_UTF8));
87 20251 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
88 20251 : if (_ptr_sid) {
89 19767 : NDR_PULL_ALLOC(ndr, r->sid);
90 : } else {
91 484 : r->sid = NULL;
92 : }
93 20251 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
94 : }
95 20251 : if (ndr_flags & NDR_BUFFERS) {
96 20251 : if (r->sid) {
97 19767 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
98 19767 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
99 19767 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->sid));
100 19767 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
101 : }
102 : }
103 20251 : ndr->flags = _flags_save_STRUCT;
104 : }
105 20251 : return NDR_ERR_SUCCESS;
106 : }
107 :
108 0 : static void ndr_print_flags_netlogon_creds_CredentialState(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netlogon_creds_CredentialState *r)
109 : {
110 0 : ndr_print_netlogon_creds_CredentialState(ndr, name, r);
111 0 : }
112 :
113 0 : _PUBLIC_ void ndr_print_netlogon_creds_CredentialState(struct ndr_print *ndr, const char *name, const struct netlogon_creds_CredentialState *r)
114 : {
115 0 : ndr_print_struct(ndr, name, "netlogon_creds_CredentialState");
116 0 : if (r == NULL) { ndr_print_null(ndr); return; }
117 : {
118 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
119 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
120 0 : ndr->depth++;
121 0 : ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", r->negotiate_flags);
122 0 : ndr_print_array_uint8(ndr, "session_key", r->session_key, 16);
123 0 : ndr_print_uint32(ndr, "sequence", r->sequence);
124 0 : ndr_print_netr_Credential(ndr, "seed", &r->seed);
125 0 : ndr_print_netr_Credential(ndr, "client", &r->client);
126 0 : ndr_print_netr_Credential(ndr, "server", &r->server);
127 0 : ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->secure_channel_type);
128 0 : ndr_print_string(ndr, "computer_name", r->computer_name);
129 0 : ndr_print_string(ndr, "account_name", r->account_name);
130 0 : ndr_print_ptr(ndr, "sid", r->sid);
131 0 : ndr->depth++;
132 0 : if (r->sid) {
133 0 : ndr_print_dom_sid(ndr, "sid", r->sid);
134 : }
135 0 : ndr->depth--;
136 0 : ndr->depth--;
137 0 : ndr->flags = _flags_save_STRUCT;
138 : }
139 : }
140 :
141 9514 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_cache_entry(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netlogon_cache_entry *r)
142 : {
143 9514 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
144 9514 : if (ndr_flags & NDR_SCALARS) {
145 9514 : NDR_CHECK(ndr_push_align(ndr, 5));
146 9514 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_name));
147 9514 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
148 9514 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
149 9514 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
150 : }
151 9514 : if (ndr_flags & NDR_BUFFERS) {
152 9514 : if (r->computer_name) {
153 9514 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF16)));
154 9514 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
155 9514 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF16)));
156 9514 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_name, ndr_charset_length(r->computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
157 : }
158 : }
159 8767 : return NDR_ERR_SUCCESS;
160 : }
161 :
162 72 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_cache_entry(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netlogon_cache_entry *r)
163 : {
164 12 : uint32_t _ptr_computer_name;
165 72 : uint32_t size_computer_name_1 = 0;
166 72 : uint32_t length_computer_name_1 = 0;
167 72 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
168 72 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
169 72 : if (ndr_flags & NDR_SCALARS) {
170 72 : NDR_CHECK(ndr_pull_align(ndr, 5));
171 72 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
172 72 : if (_ptr_computer_name) {
173 72 : NDR_PULL_ALLOC(ndr, r->computer_name);
174 : } else {
175 0 : r->computer_name = NULL;
176 : }
177 72 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
178 72 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
179 72 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
180 : }
181 72 : if (ndr_flags & NDR_BUFFERS) {
182 72 : if (r->computer_name) {
183 72 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
184 72 : NDR_PULL_SET_MEM_CTX(ndr, r->computer_name, 0);
185 72 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_name));
186 72 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_name));
187 72 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_name, &size_computer_name_1));
188 72 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_name, &length_computer_name_1));
189 72 : if (length_computer_name_1 > size_computer_name_1) {
190 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_name_1, length_computer_name_1);
191 : }
192 72 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
193 72 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
194 72 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
195 : }
196 : }
197 60 : return NDR_ERR_SUCCESS;
198 : }
199 :
200 0 : static void ndr_print_flags_netlogon_cache_entry(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct netlogon_cache_entry *r)
201 : {
202 0 : ndr_print_netlogon_cache_entry(ndr, name, r);
203 0 : }
204 :
205 0 : _PUBLIC_ void ndr_print_netlogon_cache_entry(struct ndr_print *ndr, const char *name, const struct netlogon_cache_entry *r)
206 : {
207 0 : ndr_print_struct(ndr, name, "netlogon_cache_entry");
208 0 : if (r == NULL) { ndr_print_null(ndr); return; }
209 0 : ndr->depth++;
210 0 : ndr_print_ptr(ndr, "computer_name", r->computer_name);
211 0 : ndr->depth++;
212 0 : if (r->computer_name) {
213 0 : ndr_print_string(ndr, "computer_name", r->computer_name);
214 : }
215 0 : ndr->depth--;
216 0 : ndr_print_netr_Credential(ndr, "server_challenge", &r->server_challenge);
217 0 : ndr_print_netr_Credential(ndr, "client_challenge", &r->client_challenge);
218 0 : ndr->depth--;
219 : }
220 :
221 4947 : static enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_TYPE(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum NL_AUTH_MESSAGE_TYPE r)
222 : {
223 4947 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
224 4307 : return NDR_ERR_SUCCESS;
225 : }
226 :
227 2491 : static enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_TYPE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum NL_AUTH_MESSAGE_TYPE *r)
228 : {
229 320 : uint32_t v;
230 2491 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
231 2491 : *r = v;
232 2491 : return NDR_ERR_SUCCESS;
233 : }
234 :
235 0 : _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE_TYPE(struct ndr_print *ndr, const char *name, enum NL_AUTH_MESSAGE_TYPE r)
236 : {
237 0 : const char *val = NULL;
238 :
239 0 : switch (r) {
240 0 : case NL_NEGOTIATE_REQUEST: val = "NL_NEGOTIATE_REQUEST"; break;
241 0 : case NL_NEGOTIATE_RESPONSE: val = "NL_NEGOTIATE_RESPONSE"; break;
242 : }
243 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
244 0 : }
245 :
246 4947 : static enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_FLAGS(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
247 : {
248 4947 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
249 4307 : return NDR_ERR_SUCCESS;
250 : }
251 :
252 2491 : static enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_FLAGS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
253 : {
254 320 : uint32_t v;
255 2491 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
256 2491 : *r = v;
257 2491 : return NDR_ERR_SUCCESS;
258 : }
259 :
260 0 : _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r)
261 : {
262 0 : ndr_print_uint32(ndr, name, r);
263 0 : ndr->depth++;
264 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_OEM_NETBIOS_DOMAIN_NAME", NL_FLAG_OEM_NETBIOS_DOMAIN_NAME, r);
265 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_OEM_NETBIOS_COMPUTER_NAME", NL_FLAG_OEM_NETBIOS_COMPUTER_NAME, r);
266 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_UTF8_DNS_DOMAIN_NAME", NL_FLAG_UTF8_DNS_DOMAIN_NAME, r);
267 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_UTF8_DNS_HOST_NAME", NL_FLAG_UTF8_DNS_HOST_NAME, r);
268 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME", NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME, r);
269 0 : ndr->depth--;
270 0 : }
271 :
272 49470 : _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union NL_AUTH_MESSAGE_BUFFER *r)
273 : {
274 6400 : uint32_t level;
275 49470 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
276 49470 : if (ndr_flags & NDR_SCALARS) {
277 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
278 24735 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
279 24735 : NDR_CHECK(ndr_push_union_align(ndr, 4));
280 24735 : switch (level) {
281 2456 : case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME: {
282 : {
283 2456 : libndr_flags _flags_save_string = ndr->flags;
284 2456 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
285 2456 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->a));
286 2456 : ndr->flags = _flags_save_string;
287 : }
288 2456 : break; }
289 :
290 2456 : case NL_FLAG_OEM_NETBIOS_COMPUTER_NAME: {
291 : {
292 2456 : libndr_flags _flags_save_string = ndr->flags;
293 2456 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
294 2456 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->a));
295 2456 : ndr->flags = _flags_save_string;
296 : }
297 2456 : break; }
298 :
299 72 : case NL_FLAG_UTF8_DNS_DOMAIN_NAME: {
300 72 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->u));
301 72 : break; }
302 :
303 0 : case NL_FLAG_UTF8_DNS_HOST_NAME: {
304 0 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->u));
305 0 : break; }
306 :
307 72 : case NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME: {
308 72 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->u));
309 72 : break; }
310 :
311 17119 : default: {
312 17119 : break; }
313 :
314 : }
315 : }
316 43070 : return NDR_ERR_SUCCESS;
317 : }
318 :
319 24910 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union NL_AUTH_MESSAGE_BUFFER *r)
320 : {
321 3200 : uint32_t level;
322 24910 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
323 24910 : if (ndr_flags & NDR_SCALARS) {
324 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
325 12455 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
326 12455 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
327 12455 : switch (level) {
328 2491 : case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME: {
329 : {
330 2491 : libndr_flags _flags_save_string = ndr->flags;
331 2491 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
332 2491 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->a));
333 2491 : ndr->flags = _flags_save_string;
334 : }
335 2491 : break; }
336 :
337 2491 : case NL_FLAG_OEM_NETBIOS_COMPUTER_NAME: {
338 : {
339 2491 : libndr_flags _flags_save_string = ndr->flags;
340 2491 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
341 2491 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->a));
342 2491 : ndr->flags = _flags_save_string;
343 : }
344 2491 : break; }
345 :
346 151 : case NL_FLAG_UTF8_DNS_DOMAIN_NAME: {
347 151 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->u));
348 151 : break; }
349 :
350 0 : case NL_FLAG_UTF8_DNS_HOST_NAME: {
351 0 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->u));
352 0 : break; }
353 :
354 151 : case NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME: {
355 151 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->u));
356 151 : break; }
357 :
358 6211 : default: {
359 6211 : break; }
360 :
361 : }
362 : }
363 21710 : return NDR_ERR_SUCCESS;
364 : }
365 :
366 9894 : _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union NL_AUTH_MESSAGE_BUFFER_REPLY *r)
367 : {
368 1280 : uint32_t level;
369 9894 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
370 9894 : if (ndr_flags & NDR_SCALARS) {
371 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
372 4947 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
373 4947 : NDR_CHECK(ndr_push_union_align(ndr, 4));
374 4947 : switch (level) {
375 2491 : case NL_NEGOTIATE_RESPONSE: {
376 2491 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy));
377 2171 : break; }
378 :
379 2136 : default: {
380 2136 : break; }
381 :
382 : }
383 : }
384 8614 : return NDR_ERR_SUCCESS;
385 : }
386 :
387 4982 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union NL_AUTH_MESSAGE_BUFFER_REPLY *r)
388 : {
389 640 : uint32_t level;
390 4982 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
391 4982 : if (ndr_flags & NDR_SCALARS) {
392 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
393 2491 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
394 2491 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
395 2491 : switch (level) {
396 0 : case NL_NEGOTIATE_RESPONSE: {
397 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dummy));
398 0 : break; }
399 :
400 2171 : default: {
401 2171 : break; }
402 :
403 : }
404 : }
405 4342 : return NDR_ERR_SUCCESS;
406 : }
407 :
408 4947 : _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NL_AUTH_MESSAGE *r)
409 : {
410 : {
411 4947 : libndr_flags _flags_save_STRUCT = ndr->flags;
412 4947 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
413 4947 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
414 4947 : if (ndr_flags & NDR_SCALARS) {
415 4947 : NDR_CHECK(ndr_push_align(ndr, 4));
416 5587 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_TYPE(ndr, NDR_SCALARS, r->MessageType));
417 5587 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_FLAGS(ndr, NDR_SCALARS, r->Flags));
418 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
419 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_domain));
420 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
421 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_computer));
422 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
423 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_domain));
424 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
425 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_host));
426 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
427 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer));
428 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
429 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer));
430 4947 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
431 : }
432 4947 : if (ndr_flags & NDR_BUFFERS) {
433 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
434 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain));
435 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
436 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_computer));
437 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
438 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_domain));
439 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
440 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_host));
441 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
442 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_netbios_computer));
443 4947 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
444 4947 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_BUFFERS, &r->Buffer));
445 : }
446 4947 : ndr->flags = _flags_save_STRUCT;
447 : }
448 4947 : return NDR_ERR_SUCCESS;
449 : }
450 :
451 2491 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NL_AUTH_MESSAGE *r)
452 : {
453 : {
454 2491 : libndr_flags _flags_save_STRUCT = ndr->flags;
455 2491 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
456 2491 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
457 2491 : if (ndr_flags & NDR_SCALARS) {
458 2491 : NDR_CHECK(ndr_pull_align(ndr, 4));
459 2811 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_TYPE(ndr, NDR_SCALARS, &r->MessageType));
460 2811 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_FLAGS(ndr, NDR_SCALARS, &r->Flags));
461 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
462 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_domain));
463 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
464 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_computer));
465 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
466 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_domain));
467 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
468 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_host));
469 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
470 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer));
471 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
472 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer));
473 2491 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
474 : }
475 2491 : if (ndr_flags & NDR_BUFFERS) {
476 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
477 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain));
478 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
479 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_computer));
480 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
481 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_domain));
482 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
483 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_host));
484 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
485 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_netbios_computer));
486 2491 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
487 2491 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_BUFFERS, &r->Buffer));
488 : }
489 2491 : ndr->flags = _flags_save_STRUCT;
490 : }
491 2491 : return NDR_ERR_SUCCESS;
492 : }
493 :
494 0 : static void ndr_print_flags_NL_AUTH_MESSAGE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NL_AUTH_MESSAGE *r)
495 : {
496 0 : ndr_print_NL_AUTH_MESSAGE(ndr, name, r);
497 0 : }
498 :
499 0 : _PUBLIC_ void ndr_print_NL_AUTH_MESSAGE(struct ndr_print *ndr, const char *name, const struct NL_AUTH_MESSAGE *r)
500 : {
501 0 : ndr_print_struct(ndr, name, "NL_AUTH_MESSAGE");
502 0 : if (r == NULL) { ndr_print_null(ndr); return; }
503 : {
504 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
505 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
506 0 : ndr->depth++;
507 0 : ndr_print_NL_AUTH_MESSAGE_TYPE(ndr, "MessageType", r->MessageType);
508 0 : ndr_print_NL_AUTH_MESSAGE_FLAGS(ndr, "Flags", r->Flags);
509 0 : ndr_print_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME);
510 0 : ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "oem_netbios_domain", &r->oem_netbios_domain);
511 0 : ndr_print_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME);
512 0 : ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "oem_netbios_computer", &r->oem_netbios_computer);
513 0 : ndr_print_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME);
514 0 : ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "utf8_dns_domain", &r->utf8_dns_domain);
515 0 : ndr_print_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME);
516 0 : ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "utf8_dns_host", &r->utf8_dns_host);
517 0 : ndr_print_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME);
518 0 : ndr_print_NL_AUTH_MESSAGE_BUFFER(ndr, "utf8_netbios_computer", &r->utf8_netbios_computer);
519 0 : ndr_print_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE);
520 0 : ndr_print_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, "Buffer", &r->Buffer);
521 0 : ndr->depth--;
522 0 : ndr->flags = _flags_save_STRUCT;
523 : }
524 : }
525 :
526 0 : static enum ndr_err_code ndr_push_NL_SIGNATURE_ALGORITHM(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum NL_SIGNATURE_ALGORITHM r)
527 : {
528 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
529 0 : return NDR_ERR_SUCCESS;
530 : }
531 :
532 0 : static enum ndr_err_code ndr_pull_NL_SIGNATURE_ALGORITHM(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum NL_SIGNATURE_ALGORITHM *r)
533 : {
534 0 : uint16_t v;
535 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
536 0 : *r = v;
537 0 : return NDR_ERR_SUCCESS;
538 : }
539 :
540 0 : _PUBLIC_ void ndr_print_NL_SIGNATURE_ALGORITHM(struct ndr_print *ndr, const char *name, enum NL_SIGNATURE_ALGORITHM r)
541 : {
542 0 : const char *val = NULL;
543 :
544 0 : switch (r) {
545 0 : case NL_SIGN_HMAC_SHA256: val = "NL_SIGN_HMAC_SHA256"; break;
546 0 : case NL_SIGN_HMAC_MD5: val = "NL_SIGN_HMAC_MD5"; break;
547 : }
548 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
549 0 : }
550 :
551 0 : static enum ndr_err_code ndr_push_NL_SEAL_ALGORITHM(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum NL_SEAL_ALGORITHM r)
552 : {
553 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
554 0 : return NDR_ERR_SUCCESS;
555 : }
556 :
557 0 : static enum ndr_err_code ndr_pull_NL_SEAL_ALGORITHM(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum NL_SEAL_ALGORITHM *r)
558 : {
559 0 : uint16_t v;
560 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
561 0 : *r = v;
562 0 : return NDR_ERR_SUCCESS;
563 : }
564 :
565 0 : _PUBLIC_ void ndr_print_NL_SEAL_ALGORITHM(struct ndr_print *ndr, const char *name, enum NL_SEAL_ALGORITHM r)
566 : {
567 0 : const char *val = NULL;
568 :
569 0 : switch (r) {
570 0 : case NL_SEAL_AES128: val = "NL_SEAL_AES128"; break;
571 0 : case NL_SEAL_RC4: val = "NL_SEAL_RC4"; break;
572 0 : case NL_SEAL_NONE: val = "NL_SEAL_NONE"; break;
573 : }
574 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
575 0 : }
576 :
577 0 : _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_SIGNATURE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NL_AUTH_SIGNATURE *r)
578 : {
579 : {
580 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
581 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
582 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
583 0 : if (ndr_flags & NDR_SCALARS) {
584 0 : NDR_CHECK(ndr_push_align(ndr, 3));
585 0 : NDR_CHECK(ndr_push_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, NL_SIGN_HMAC_MD5));
586 0 : NDR_CHECK(ndr_push_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, r->SealAlgorithm));
587 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Pad));
588 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Flags));
589 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8));
590 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 8));
591 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8));
592 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 3));
593 : }
594 0 : if (ndr_flags & NDR_BUFFERS) {
595 0 : }
596 0 : ndr->flags = _flags_save_STRUCT;
597 : }
598 0 : return NDR_ERR_SUCCESS;
599 : }
600 :
601 0 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_SIGNATURE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NL_AUTH_SIGNATURE *r)
602 : {
603 0 : uint32_t size_SequenceNumber_0 = 0;
604 0 : uint32_t size_Checksum_0 = 0;
605 0 : uint32_t size_Confounder_0 = 0;
606 : {
607 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
608 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
609 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
610 0 : if (ndr_flags & NDR_SCALARS) {
611 0 : NDR_CHECK(ndr_pull_align(ndr, 3));
612 0 : NDR_CHECK(ndr_pull_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, &r->SignatureAlgorithm));
613 0 : NDR_CHECK(ndr_pull_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, &r->SealAlgorithm));
614 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad));
615 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Flags));
616 0 : size_SequenceNumber_0 = 8;
617 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, size_SequenceNumber_0));
618 0 : size_Checksum_0 = 8;
619 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, size_Checksum_0));
620 0 : size_Confounder_0 = 8;
621 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Confounder, size_Confounder_0));
622 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 3));
623 : }
624 0 : if (ndr_flags & NDR_BUFFERS) {
625 0 : }
626 0 : ndr->flags = _flags_save_STRUCT;
627 : }
628 0 : return NDR_ERR_SUCCESS;
629 : }
630 :
631 0 : static void ndr_print_flags_NL_AUTH_SIGNATURE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NL_AUTH_SIGNATURE *r)
632 : {
633 0 : ndr_print_NL_AUTH_SIGNATURE(ndr, name, r);
634 0 : }
635 :
636 0 : _PUBLIC_ void ndr_print_NL_AUTH_SIGNATURE(struct ndr_print *ndr, const char *name, const struct NL_AUTH_SIGNATURE *r)
637 : {
638 0 : ndr_print_struct(ndr, name, "NL_AUTH_SIGNATURE");
639 0 : if (r == NULL) { ndr_print_null(ndr); return; }
640 : {
641 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
642 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
643 0 : ndr->depth++;
644 0 : ndr_print_NL_SIGNATURE_ALGORITHM(ndr, "SignatureAlgorithm", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NL_SIGN_HMAC_MD5:r->SignatureAlgorithm);
645 0 : ndr_print_NL_SEAL_ALGORITHM(ndr, "SealAlgorithm", r->SealAlgorithm);
646 0 : ndr_print_uint16(ndr, "Pad", r->Pad);
647 0 : ndr_print_uint16(ndr, "Flags", r->Flags);
648 0 : ndr_print_array_uint8(ndr, "SequenceNumber", r->SequenceNumber, 8);
649 0 : ndr_print_array_uint8(ndr, "Checksum", r->Checksum, 8);
650 0 : ndr_print_array_uint8(ndr, "Confounder", r->Confounder, 8);
651 0 : ndr->depth--;
652 0 : ndr->flags = _flags_save_STRUCT;
653 : }
654 : }
655 :
656 0 : _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_SHA2_SIGNATURE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct NL_AUTH_SHA2_SIGNATURE *r)
657 : {
658 : {
659 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
660 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
661 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
662 0 : if (ndr_flags & NDR_SCALARS) {
663 0 : NDR_CHECK(ndr_push_align(ndr, 3));
664 0 : NDR_CHECK(ndr_push_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, NL_SIGN_HMAC_SHA256));
665 0 : NDR_CHECK(ndr_push_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, r->SealAlgorithm));
666 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Pad));
667 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->Flags));
668 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, 8));
669 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Checksum, 32));
670 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Confounder, 8));
671 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 3));
672 : }
673 0 : if (ndr_flags & NDR_BUFFERS) {
674 0 : }
675 0 : ndr->flags = _flags_save_STRUCT;
676 : }
677 0 : return NDR_ERR_SUCCESS;
678 : }
679 :
680 0 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_SHA2_SIGNATURE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct NL_AUTH_SHA2_SIGNATURE *r)
681 : {
682 0 : uint32_t size_SequenceNumber_0 = 0;
683 0 : uint32_t size_Checksum_0 = 0;
684 0 : uint32_t size_Confounder_0 = 0;
685 : {
686 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
687 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
688 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
689 0 : if (ndr_flags & NDR_SCALARS) {
690 0 : NDR_CHECK(ndr_pull_align(ndr, 3));
691 0 : NDR_CHECK(ndr_pull_NL_SIGNATURE_ALGORITHM(ndr, NDR_SCALARS, &r->SignatureAlgorithm));
692 0 : NDR_CHECK(ndr_pull_NL_SEAL_ALGORITHM(ndr, NDR_SCALARS, &r->SealAlgorithm));
693 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Pad));
694 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->Flags));
695 0 : size_SequenceNumber_0 = 8;
696 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->SequenceNumber, size_SequenceNumber_0));
697 0 : size_Checksum_0 = 32;
698 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Checksum, size_Checksum_0));
699 0 : size_Confounder_0 = 8;
700 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Confounder, size_Confounder_0));
701 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 3));
702 : }
703 0 : if (ndr_flags & NDR_BUFFERS) {
704 0 : }
705 0 : ndr->flags = _flags_save_STRUCT;
706 : }
707 0 : return NDR_ERR_SUCCESS;
708 : }
709 :
710 0 : static void ndr_print_flags_NL_AUTH_SHA2_SIGNATURE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct NL_AUTH_SHA2_SIGNATURE *r)
711 : {
712 0 : ndr_print_NL_AUTH_SHA2_SIGNATURE(ndr, name, r);
713 0 : }
714 :
715 0 : _PUBLIC_ void ndr_print_NL_AUTH_SHA2_SIGNATURE(struct ndr_print *ndr, const char *name, const struct NL_AUTH_SHA2_SIGNATURE *r)
716 : {
717 0 : ndr_print_struct(ndr, name, "NL_AUTH_SHA2_SIGNATURE");
718 0 : if (r == NULL) { ndr_print_null(ndr); return; }
719 : {
720 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
721 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
722 0 : ndr->depth++;
723 0 : ndr_print_NL_SIGNATURE_ALGORITHM(ndr, "SignatureAlgorithm", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NL_SIGN_HMAC_SHA256:r->SignatureAlgorithm);
724 0 : ndr_print_NL_SEAL_ALGORITHM(ndr, "SealAlgorithm", r->SealAlgorithm);
725 0 : ndr_print_uint16(ndr, "Pad", r->Pad);
726 0 : ndr_print_uint16(ndr, "Flags", r->Flags);
727 0 : ndr_print_array_uint8(ndr, "SequenceNumber", r->SequenceNumber, 8);
728 0 : ndr_print_array_uint8(ndr, "Checksum", r->Checksum, 32);
729 0 : ndr_print_array_uint8(ndr, "Confounder", r->Confounder, 8);
730 0 : ndr->depth--;
731 0 : ndr->flags = _flags_save_STRUCT;
732 : }
733 : }
734 :
735 : #ifndef SKIP_NDR_TABLE_schannel
736 : static const struct ndr_interface_public_struct schannel_public_structs[] = {
737 : {
738 : .name = "netlogon_creds_CredentialState",
739 : .struct_size = sizeof(struct netlogon_creds_CredentialState ),
740 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netlogon_creds_CredentialState,
741 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netlogon_creds_CredentialState,
742 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netlogon_creds_CredentialState,
743 : },
744 : {
745 : .name = "netlogon_cache_entry",
746 : .struct_size = sizeof(struct netlogon_cache_entry ),
747 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_netlogon_cache_entry,
748 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_netlogon_cache_entry,
749 : .ndr_print = (ndr_print_function_t) ndr_print_flags_netlogon_cache_entry,
750 : },
751 : {
752 : .name = "NL_AUTH_MESSAGE",
753 : .struct_size = sizeof(struct NL_AUTH_MESSAGE ),
754 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_NL_AUTH_MESSAGE,
755 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NL_AUTH_MESSAGE,
756 : .ndr_print = (ndr_print_function_t) ndr_print_flags_NL_AUTH_MESSAGE,
757 : },
758 : {
759 : .name = "NL_AUTH_SIGNATURE",
760 : .struct_size = sizeof(struct NL_AUTH_SIGNATURE ),
761 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_NL_AUTH_SIGNATURE,
762 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NL_AUTH_SIGNATURE,
763 : .ndr_print = (ndr_print_function_t) ndr_print_flags_NL_AUTH_SIGNATURE,
764 : },
765 : {
766 : .name = "NL_AUTH_SHA2_SIGNATURE",
767 : .struct_size = sizeof(struct NL_AUTH_SHA2_SIGNATURE ),
768 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_NL_AUTH_SHA2_SIGNATURE,
769 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_NL_AUTH_SHA2_SIGNATURE,
770 : .ndr_print = (ndr_print_function_t) ndr_print_flags_NL_AUTH_SHA2_SIGNATURE,
771 : },
772 : { .name = NULL }
773 : };
774 :
775 : static const struct ndr_interface_call schannel_calls[] = {
776 : { .name = NULL }
777 : };
778 :
779 : static const char * const schannel_endpoint_strings[] = {
780 : "ncacn_np:[\\pipe\\schannel]",
781 : };
782 :
783 : static const struct ndr_interface_string_array schannel_endpoints = {
784 : .count = 1,
785 : .names = schannel_endpoint_strings
786 : };
787 :
788 : static const char * const schannel_authservice_strings[] = {
789 : "host",
790 : };
791 :
792 : static const struct ndr_interface_string_array schannel_authservices = {
793 : .count = 1,
794 : .names = schannel_authservice_strings
795 : };
796 :
797 :
798 : const struct ndr_interface_table ndr_table_schannel = {
799 : .name = "schannel",
800 : .num_calls = 0,
801 : .calls = schannel_calls,
802 : .num_public_structs = 5,
803 : .public_structs = schannel_public_structs,
804 : .endpoints = &schannel_endpoints,
805 : .authservices = &schannel_authservices
806 : };
807 :
808 : #endif /* SKIP_NDR_TABLE_schannel */
|