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 8237 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_creds_CredentialState(struct ndr_push *ndr, int ndr_flags, const struct netlogon_creds_CredentialState *r)
11 : {
12 : {
13 8237 : uint32_t _flags_save_STRUCT = ndr->flags;
14 8237 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
15 8237 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
16 8237 : if (ndr_flags & NDR_SCALARS) {
17 8237 : NDR_CHECK(ndr_push_align(ndr, 5));
18 8237 : NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->negotiate_flags));
19 8237 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->session_key, 16));
20 8237 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sequence));
21 8237 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->seed));
22 8237 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client));
23 8237 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server));
24 8237 : NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->secure_channel_type));
25 8237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF8)));
26 8237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
27 8237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF8)));
28 8237 : 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 8237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
30 8237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
31 8237 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
32 8237 : 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 8237 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
34 8237 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
35 : }
36 8237 : if (ndr_flags & NDR_BUFFERS) {
37 8237 : if (r->sid) {
38 8148 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->sid));
39 : }
40 : }
41 8237 : ndr->flags = _flags_save_STRUCT;
42 : }
43 8237 : return NDR_ERR_SUCCESS;
44 : }
45 :
46 13194 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_creds_CredentialState(struct ndr_pull *ndr, int ndr_flags, struct netlogon_creds_CredentialState *r)
47 : {
48 13194 : uint32_t size_session_key_0 = 0;
49 13194 : uint32_t size_computer_name_0 = 0;
50 13194 : uint32_t length_computer_name_0 = 0;
51 13194 : uint32_t size_account_name_0 = 0;
52 13194 : uint32_t length_account_name_0 = 0;
53 : uint32_t _ptr_sid;
54 13194 : TALLOC_CTX *_mem_save_sid_0 = NULL;
55 : {
56 13194 : uint32_t _flags_save_STRUCT = ndr->flags;
57 13194 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
58 13194 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
59 13194 : if (ndr_flags & NDR_SCALARS) {
60 13194 : NDR_CHECK(ndr_pull_align(ndr, 5));
61 13194 : NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->negotiate_flags));
62 13194 : size_session_key_0 = 16;
63 13194 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->session_key, size_session_key_0));
64 13194 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sequence));
65 13194 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->seed));
66 13194 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client));
67 13194 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server));
68 13194 : NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->secure_channel_type));
69 13194 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_name));
70 13194 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_name));
71 13194 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_name, &size_computer_name_0));
72 13194 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_name, &length_computer_name_0));
73 13194 : if (length_computer_name_0 > size_computer_name_0) {
74 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_0, length_computer_name_0);
75 : }
76 13194 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_0, sizeof(uint8_t)));
77 13194 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_name, length_computer_name_0, sizeof(uint8_t), CH_UTF8));
78 13194 : NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
79 13194 : NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
80 13194 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->account_name, &size_account_name_0));
81 13194 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->account_name, &length_account_name_0));
82 13194 : if (length_account_name_0 > size_account_name_0) {
83 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_account_name_0, length_account_name_0);
84 : }
85 13194 : NDR_CHECK(ndr_check_string_terminator(ndr, length_account_name_0, sizeof(uint8_t)));
86 13194 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, length_account_name_0, sizeof(uint8_t), CH_UTF8));
87 13194 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
88 13194 : if (_ptr_sid) {
89 12972 : NDR_PULL_ALLOC(ndr, r->sid);
90 : } else {
91 222 : r->sid = NULL;
92 : }
93 13194 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
94 : }
95 13194 : if (ndr_flags & NDR_BUFFERS) {
96 13194 : if (r->sid) {
97 12972 : _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
98 12972 : NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
99 12972 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->sid));
100 12972 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
101 : }
102 : }
103 13194 : ndr->flags = _flags_save_STRUCT;
104 : }
105 13194 : return NDR_ERR_SUCCESS;
106 : }
107 :
108 0 : static void ndr_print_flags_netlogon_creds_CredentialState(struct ndr_print *ndr, const char *name, int 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 : uint32_t _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 5085 : _PUBLIC_ enum ndr_err_code ndr_push_netlogon_cache_entry(struct ndr_push *ndr, int ndr_flags, const struct netlogon_cache_entry *r)
142 : {
143 5085 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
144 5085 : if (ndr_flags & NDR_SCALARS) {
145 5085 : NDR_CHECK(ndr_push_align(ndr, 5));
146 5085 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_name));
147 5085 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
148 5085 : NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
149 5085 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
150 : }
151 5085 : if (ndr_flags & NDR_BUFFERS) {
152 5085 : if (r->computer_name) {
153 5085 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF16)));
154 5085 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
155 5085 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF16)));
156 5085 : 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 5085 : return NDR_ERR_SUCCESS;
160 : }
161 :
162 36 : _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_cache_entry(struct ndr_pull *ndr, int ndr_flags, struct netlogon_cache_entry *r)
163 : {
164 : uint32_t _ptr_computer_name;
165 36 : uint32_t size_computer_name_1 = 0;
166 36 : uint32_t length_computer_name_1 = 0;
167 36 : TALLOC_CTX *_mem_save_computer_name_0 = NULL;
168 36 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
169 36 : if (ndr_flags & NDR_SCALARS) {
170 36 : NDR_CHECK(ndr_pull_align(ndr, 5));
171 36 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
172 36 : if (_ptr_computer_name) {
173 36 : NDR_PULL_ALLOC(ndr, r->computer_name);
174 : } else {
175 0 : r->computer_name = NULL;
176 : }
177 36 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server_challenge));
178 36 : NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client_challenge));
179 36 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
180 : }
181 36 : if (ndr_flags & NDR_BUFFERS) {
182 36 : if (r->computer_name) {
183 36 : _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
184 36 : NDR_PULL_SET_MEM_CTX(ndr, r->computer_name, 0);
185 36 : NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_name));
186 36 : NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_name));
187 36 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_name, &size_computer_name_1));
188 36 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_name, &length_computer_name_1));
189 36 : if (length_computer_name_1 > size_computer_name_1) {
190 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_1, length_computer_name_1);
191 : }
192 36 : NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_1, sizeof(uint16_t)));
193 36 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_name, length_computer_name_1, sizeof(uint16_t), CH_UTF16));
194 36 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
195 : }
196 : }
197 36 : return NDR_ERR_SUCCESS;
198 : }
199 :
200 0 : static void ndr_print_flags_netlogon_cache_entry(struct ndr_print *ndr, const char *name, int 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 2115 : static enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_TYPE(struct ndr_push *ndr, int ndr_flags, enum NL_AUTH_MESSAGE_TYPE r)
222 : {
223 2115 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
224 2115 : return NDR_ERR_SUCCESS;
225 : }
226 :
227 1127 : static enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_TYPE(struct ndr_pull *ndr, int ndr_flags, enum NL_AUTH_MESSAGE_TYPE *r)
228 : {
229 : uint32_t v;
230 1127 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
231 1127 : *r = v;
232 1127 : 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 2115 : static enum ndr_err_code ndr_push_NL_AUTH_MESSAGE_FLAGS(struct ndr_push *ndr, int ndr_flags, uint32_t r)
247 : {
248 2115 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
249 2115 : return NDR_ERR_SUCCESS;
250 : }
251 :
252 1127 : static enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_FLAGS(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
253 : {
254 : uint32_t v;
255 1127 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
256 1127 : *r = v;
257 1127 : 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 21150 : _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)
273 : {
274 : uint32_t level;
275 21150 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
276 21150 : if (ndr_flags & NDR_SCALARS) {
277 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
278 10575 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
279 10575 : NDR_CHECK(ndr_push_union_align(ndr, 4));
280 10575 : switch (level) {
281 988 : case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME: {
282 : {
283 988 : uint32_t _flags_save_string = ndr->flags;
284 988 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
285 988 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->a));
286 988 : ndr->flags = _flags_save_string;
287 : }
288 988 : break; }
289 :
290 988 : case NL_FLAG_OEM_NETBIOS_COMPUTER_NAME: {
291 : {
292 988 : uint32_t _flags_save_string = ndr->flags;
293 988 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
294 988 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->a));
295 988 : ndr->flags = _flags_save_string;
296 : }
297 988 : break; }
298 :
299 36 : case NL_FLAG_UTF8_DNS_DOMAIN_NAME: {
300 36 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->u));
301 36 : 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 36 : case NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME: {
308 36 : NDR_CHECK(ndr_push_nbt_string(ndr, NDR_SCALARS, r->u));
309 36 : break; }
310 :
311 8527 : default: {
312 8527 : break; }
313 :
314 : }
315 10045 : }
316 21150 : return NDR_ERR_SUCCESS;
317 : }
318 :
319 11270 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE_BUFFER(struct ndr_pull *ndr, int ndr_flags, union NL_AUTH_MESSAGE_BUFFER *r)
320 : {
321 : uint32_t level;
322 11270 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
323 11270 : if (ndr_flags & NDR_SCALARS) {
324 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
325 5635 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
326 5635 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
327 5635 : switch (level) {
328 1127 : case NL_FLAG_OEM_NETBIOS_DOMAIN_NAME: {
329 : {
330 1127 : uint32_t _flags_save_string = ndr->flags;
331 1127 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
332 1127 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->a));
333 1127 : ndr->flags = _flags_save_string;
334 : }
335 1127 : break; }
336 :
337 1127 : case NL_FLAG_OEM_NETBIOS_COMPUTER_NAME: {
338 : {
339 1127 : uint32_t _flags_save_string = ndr->flags;
340 1127 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
341 1127 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->a));
342 1127 : ndr->flags = _flags_save_string;
343 : }
344 1127 : break; }
345 :
346 115 : case NL_FLAG_UTF8_DNS_DOMAIN_NAME: {
347 115 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->u));
348 115 : 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 115 : case NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME: {
355 115 : NDR_CHECK(ndr_pull_nbt_string(ndr, NDR_SCALARS, &r->u));
356 115 : break; }
357 :
358 3151 : default: {
359 3151 : break; }
360 :
361 : }
362 5195 : }
363 11270 : return NDR_ERR_SUCCESS;
364 : }
365 :
366 4230 : _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)
367 : {
368 : uint32_t level;
369 4230 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
370 4230 : if (ndr_flags & NDR_SCALARS) {
371 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
372 2115 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
373 2115 : NDR_CHECK(ndr_push_union_align(ndr, 4));
374 2115 : switch (level) {
375 1127 : case NL_NEGOTIATE_RESPONSE: {
376 1127 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dummy));
377 1127 : break; }
378 :
379 988 : default: {
380 988 : break; }
381 :
382 : }
383 2009 : }
384 4230 : return NDR_ERR_SUCCESS;
385 : }
386 :
387 2254 : _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)
388 : {
389 : uint32_t level;
390 2254 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
391 2254 : if (ndr_flags & NDR_SCALARS) {
392 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
393 1127 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
394 1127 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
395 1127 : 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 1127 : default: {
401 1127 : break; }
402 :
403 : }
404 1039 : }
405 2254 : return NDR_ERR_SUCCESS;
406 : }
407 :
408 2115 : _PUBLIC_ enum ndr_err_code ndr_push_NL_AUTH_MESSAGE(struct ndr_push *ndr, int ndr_flags, const struct NL_AUTH_MESSAGE *r)
409 : {
410 : {
411 2115 : uint32_t _flags_save_STRUCT = ndr->flags;
412 2115 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
413 2115 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
414 2115 : if (ndr_flags & NDR_SCALARS) {
415 2115 : NDR_CHECK(ndr_push_align(ndr, 4));
416 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_TYPE(ndr, NDR_SCALARS, r->MessageType));
417 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_FLAGS(ndr, NDR_SCALARS, r->Flags));
418 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
419 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_domain));
420 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
421 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_computer));
422 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
423 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_domain));
424 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
425 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_host));
426 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
427 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer));
428 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
429 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer));
430 2115 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
431 : }
432 2115 : if (ndr_flags & NDR_BUFFERS) {
433 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
434 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain));
435 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
436 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_computer));
437 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
438 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_domain));
439 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
440 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_host));
441 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
442 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_netbios_computer));
443 2115 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
444 2115 : NDR_CHECK(ndr_push_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_BUFFERS, &r->Buffer));
445 : }
446 2115 : ndr->flags = _flags_save_STRUCT;
447 : }
448 2115 : return NDR_ERR_SUCCESS;
449 : }
450 :
451 1127 : _PUBLIC_ enum ndr_err_code ndr_pull_NL_AUTH_MESSAGE(struct ndr_pull *ndr, int ndr_flags, struct NL_AUTH_MESSAGE *r)
452 : {
453 : {
454 1127 : uint32_t _flags_save_STRUCT = ndr->flags;
455 1127 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
456 1127 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
457 1127 : if (ndr_flags & NDR_SCALARS) {
458 1127 : NDR_CHECK(ndr_pull_align(ndr, 4));
459 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_TYPE(ndr, NDR_SCALARS, &r->MessageType));
460 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_FLAGS(ndr, NDR_SCALARS, &r->Flags));
461 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
462 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_domain));
463 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
464 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->oem_netbios_computer));
465 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
466 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_domain));
467 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
468 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_dns_host));
469 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
470 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_SCALARS, &r->utf8_netbios_computer));
471 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
472 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_SCALARS, &r->Buffer));
473 1127 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
474 : }
475 1127 : if (ndr_flags & NDR_BUFFERS) {
476 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_domain, r->Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME));
477 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_domain));
478 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->oem_netbios_computer, r->Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME));
479 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->oem_netbios_computer));
480 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_domain, r->Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME));
481 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_domain));
482 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_dns_host, r->Flags & NL_FLAG_UTF8_DNS_HOST_NAME));
483 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_dns_host));
484 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->utf8_netbios_computer, r->Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME));
485 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER(ndr, NDR_BUFFERS, &r->utf8_netbios_computer));
486 1127 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->Buffer, r->MessageType & NL_NEGOTIATE_RESPONSE));
487 1127 : NDR_CHECK(ndr_pull_NL_AUTH_MESSAGE_BUFFER_REPLY(ndr, NDR_BUFFERS, &r->Buffer));
488 : }
489 1127 : ndr->flags = _flags_save_STRUCT;
490 : }
491 1127 : return NDR_ERR_SUCCESS;
492 : }
493 :
494 0 : static void ndr_print_flags_NL_AUTH_MESSAGE(struct ndr_print *ndr, const char *name, int 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 : uint32_t _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, int 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, int ndr_flags, enum NL_SIGNATURE_ALGORITHM *r)
533 : {
534 : 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, int 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, int ndr_flags, enum NL_SEAL_ALGORITHM *r)
558 : {
559 : 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, int ndr_flags, const struct NL_AUTH_SIGNATURE *r)
578 : {
579 : {
580 0 : uint32_t _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 : }
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, int 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 : uint32_t _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 : }
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, int 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 : uint32_t _flags_save_STRUCT = ndr->flags;
642 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
643 0 : ndr->depth++;
644 0 : ndr_print_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, int ndr_flags, const struct NL_AUTH_SHA2_SIGNATURE *r)
657 : {
658 : {
659 0 : uint32_t _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 : }
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, int 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 : uint32_t _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 : }
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, int 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 : uint32_t _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 */
|