Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_negoex.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 8 : _PUBLIC_ enum ndr_err_code ndr_push_negoex_AUTH_SCHEME(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_AUTH_SCHEME *r)
8 : {
9 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10 8 : if (ndr_flags & NDR_SCALARS) {
11 8 : NDR_CHECK(ndr_push_align(ndr, 4));
12 8 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
13 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
14 : }
15 8 : if (ndr_flags & NDR_BUFFERS) {
16 8 : }
17 8 : return NDR_ERR_SUCCESS;
18 : }
19 :
20 4 : _PUBLIC_ enum ndr_err_code ndr_pull_negoex_AUTH_SCHEME(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_AUTH_SCHEME *r)
21 : {
22 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
23 4 : if (ndr_flags & NDR_SCALARS) {
24 4 : NDR_CHECK(ndr_pull_align(ndr, 4));
25 4 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
26 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
27 : }
28 4 : if (ndr_flags & NDR_BUFFERS) {
29 4 : }
30 4 : return NDR_ERR_SUCCESS;
31 : }
32 :
33 0 : static void ndr_print_flags_negoex_AUTH_SCHEME(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct negoex_AUTH_SCHEME *r)
34 : {
35 0 : ndr_print_negoex_AUTH_SCHEME(ndr, name, r);
36 0 : }
37 :
38 4 : _PUBLIC_ void ndr_print_negoex_AUTH_SCHEME(struct ndr_print *ndr, const char *name, const struct negoex_AUTH_SCHEME *r)
39 : {
40 4 : ndr_print_struct(ndr, name, "negoex_AUTH_SCHEME");
41 4 : if (r == NULL) { ndr_print_null(ndr); return; }
42 4 : ndr->depth++;
43 4 : ndr_print_GUID(ndr, "guid", &r->guid);
44 4 : ndr->depth--;
45 : }
46 :
47 2 : _PUBLIC_ void ndr_print_negoex_AUTH_SCHEME_VECTOR(struct ndr_print *ndr, const char *name, const struct negoex_AUTH_SCHEME_VECTOR *r)
48 : {
49 2 : uint32_t cntr_array_1;
50 2 : ndr_print_struct(ndr, name, "negoex_AUTH_SCHEME_VECTOR");
51 2 : if (r == NULL) { ndr_print_null(ndr); return; }
52 2 : ndr->depth++;
53 2 : ndr_print_ptr(ndr, "array", r->array);
54 2 : ndr->depth++;
55 2 : if (r->array) {
56 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
57 2 : ndr->depth++;
58 4 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
59 2 : ndr_print_negoex_AUTH_SCHEME(ndr, "array", &r->array[cntr_array_1]);
60 : }
61 2 : ndr->depth--;
62 : }
63 2 : ndr->depth--;
64 2 : ndr_print_uint32(ndr, "count", r->count);
65 2 : ndr->depth--;
66 : }
67 :
68 0 : static enum ndr_err_code ndr_push_negoex_ExtensionTypes(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum negoex_ExtensionTypes r)
69 : {
70 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
71 0 : return NDR_ERR_SUCCESS;
72 : }
73 :
74 0 : static enum ndr_err_code ndr_pull_negoex_ExtensionTypes(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum negoex_ExtensionTypes *r)
75 : {
76 0 : uint32_t v;
77 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
78 0 : *r = v;
79 0 : return NDR_ERR_SUCCESS;
80 : }
81 :
82 0 : _PUBLIC_ void ndr_print_negoex_ExtensionTypes(struct ndr_print *ndr, const char *name, enum negoex_ExtensionTypes r)
83 : {
84 0 : const char *val = NULL;
85 :
86 0 : switch (r) {
87 0 : case NEGOEX_EXTENSION_TYPE_TODO: val = "NEGOEX_EXTENSION_TYPE_TODO"; break;
88 : }
89 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
90 0 : }
91 :
92 0 : _PUBLIC_ enum ndr_err_code ndr_push_negoex_EXTENSION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_EXTENSION *r)
93 : {
94 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
95 0 : if (ndr_flags & NDR_SCALARS) {
96 0 : NDR_CHECK(ndr_push_align(ndr, 5));
97 0 : NDR_CHECK(ndr_push_negoex_ExtensionTypes(ndr, NDR_SCALARS, r->type));
98 0 : NDR_CHECK(ndr_push_negoex_BYTE_VECTOR(ndr, NDR_SCALARS, &r->value));
99 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
100 : }
101 0 : if (ndr_flags & NDR_BUFFERS) {
102 0 : NDR_CHECK(ndr_push_negoex_BYTE_VECTOR(ndr, NDR_BUFFERS, &r->value));
103 : }
104 0 : return NDR_ERR_SUCCESS;
105 : }
106 :
107 0 : _PUBLIC_ enum ndr_err_code ndr_pull_negoex_EXTENSION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_EXTENSION *r)
108 : {
109 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
110 0 : if (ndr_flags & NDR_SCALARS) {
111 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
112 0 : NDR_CHECK(ndr_pull_negoex_ExtensionTypes(ndr, NDR_SCALARS, &r->type));
113 0 : NDR_CHECK(ndr_pull_negoex_BYTE_VECTOR(ndr, NDR_SCALARS, &r->value));
114 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
115 : }
116 0 : if (ndr_flags & NDR_BUFFERS) {
117 0 : NDR_CHECK(ndr_pull_negoex_BYTE_VECTOR(ndr, NDR_BUFFERS, &r->value));
118 : }
119 0 : return NDR_ERR_SUCCESS;
120 : }
121 :
122 0 : static void ndr_print_flags_negoex_EXTENSION(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct negoex_EXTENSION *r)
123 : {
124 0 : ndr_print_negoex_EXTENSION(ndr, name, r);
125 0 : }
126 :
127 0 : _PUBLIC_ void ndr_print_negoex_EXTENSION(struct ndr_print *ndr, const char *name, const struct negoex_EXTENSION *r)
128 : {
129 0 : ndr_print_struct(ndr, name, "negoex_EXTENSION");
130 0 : if (r == NULL) { ndr_print_null(ndr); return; }
131 0 : ndr->depth++;
132 0 : ndr_print_negoex_ExtensionTypes(ndr, "type", r->type);
133 0 : ndr_print_negoex_BYTE_VECTOR(ndr, "value", &r->value);
134 0 : ndr->depth--;
135 : }
136 :
137 2 : _PUBLIC_ void ndr_print_negoex_EXTENSION_VECTOR(struct ndr_print *ndr, const char *name, const struct negoex_EXTENSION_VECTOR *r)
138 : {
139 2 : uint32_t cntr_array_1;
140 2 : ndr_print_struct(ndr, name, "negoex_EXTENSION_VECTOR");
141 2 : if (r == NULL) { ndr_print_null(ndr); return; }
142 2 : ndr->depth++;
143 2 : ndr_print_ptr(ndr, "array", r->array);
144 2 : ndr->depth++;
145 2 : if (r->array) {
146 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
147 0 : ndr->depth++;
148 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
149 0 : ndr_print_negoex_EXTENSION(ndr, "array", &r->array[cntr_array_1]);
150 : }
151 0 : ndr->depth--;
152 : }
153 2 : ndr->depth--;
154 2 : ndr_print_uint32(ndr, "count", r->count);
155 2 : ndr->depth--;
156 : }
157 :
158 0 : static enum ndr_err_code ndr_push_negoex_ChecksumSchemes(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum negoex_ChecksumSchemes r)
159 : {
160 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
161 0 : return NDR_ERR_SUCCESS;
162 : }
163 :
164 0 : static enum ndr_err_code ndr_pull_negoex_ChecksumSchemes(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum negoex_ChecksumSchemes *r)
165 : {
166 0 : uint32_t v;
167 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
168 0 : *r = v;
169 0 : return NDR_ERR_SUCCESS;
170 : }
171 :
172 0 : _PUBLIC_ void ndr_print_negoex_ChecksumSchemes(struct ndr_print *ndr, const char *name, enum negoex_ChecksumSchemes r)
173 : {
174 0 : const char *val = NULL;
175 :
176 0 : switch (r) {
177 0 : case NEGOEX_CHECKSUM_SCHEME_RFC3961: val = "NEGOEX_CHECKSUM_SCHEME_RFC3961"; break;
178 : }
179 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
180 0 : }
181 :
182 0 : static enum ndr_err_code ndr_push_negoex_CHECKSUM(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_CHECKSUM *r)
183 : {
184 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
185 0 : if (ndr_flags & NDR_SCALARS) {
186 0 : NDR_CHECK(ndr_push_align(ndr, 5));
187 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 20));
188 0 : NDR_CHECK(ndr_push_negoex_ChecksumSchemes(ndr, NDR_SCALARS, r->scheme));
189 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
190 0 : NDR_CHECK(ndr_push_negoex_BYTE_VECTOR(ndr, NDR_SCALARS, &r->value));
191 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
192 : }
193 0 : if (ndr_flags & NDR_BUFFERS) {
194 0 : NDR_CHECK(ndr_push_negoex_BYTE_VECTOR(ndr, NDR_BUFFERS, &r->value));
195 : }
196 0 : return NDR_ERR_SUCCESS;
197 : }
198 :
199 0 : static enum ndr_err_code ndr_pull_negoex_CHECKSUM(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_CHECKSUM *r)
200 : {
201 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
202 0 : if (ndr_flags & NDR_SCALARS) {
203 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
204 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->header_length));
205 0 : NDR_CHECK(ndr_pull_negoex_ChecksumSchemes(ndr, NDR_SCALARS, &r->scheme));
206 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
207 0 : NDR_CHECK(ndr_pull_negoex_BYTE_VECTOR(ndr, NDR_SCALARS, &r->value));
208 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
209 : }
210 0 : if (ndr_flags & NDR_BUFFERS) {
211 0 : NDR_CHECK(ndr_pull_negoex_BYTE_VECTOR(ndr, NDR_BUFFERS, &r->value));
212 : }
213 0 : return NDR_ERR_SUCCESS;
214 : }
215 :
216 0 : _PUBLIC_ void ndr_print_negoex_CHECKSUM(struct ndr_print *ndr, const char *name, const struct negoex_CHECKSUM *r)
217 : {
218 0 : ndr_print_struct(ndr, name, "negoex_CHECKSUM");
219 0 : if (r == NULL) { ndr_print_null(ndr); return; }
220 0 : ndr->depth++;
221 0 : ndr_print_uint32(ndr, "header_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?20:r->header_length);
222 0 : ndr_print_negoex_ChecksumSchemes(ndr, "scheme", r->scheme);
223 0 : ndr_print_uint32(ndr, "type", r->type);
224 0 : ndr_print_negoex_BYTE_VECTOR(ndr, "value", &r->value);
225 0 : ndr->depth--;
226 : }
227 :
228 0 : static enum ndr_err_code ndr_push_negoex_AlertReason(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum negoex_AlertReason r)
229 : {
230 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
231 0 : return NDR_ERR_SUCCESS;
232 : }
233 :
234 0 : static enum ndr_err_code ndr_pull_negoex_AlertReason(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum negoex_AlertReason *r)
235 : {
236 0 : uint32_t v;
237 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
238 0 : *r = v;
239 0 : return NDR_ERR_SUCCESS;
240 : }
241 :
242 0 : _PUBLIC_ void ndr_print_negoex_AlertReason(struct ndr_print *ndr, const char *name, enum negoex_AlertReason r)
243 : {
244 0 : const char *val = NULL;
245 :
246 0 : switch (r) {
247 0 : case NEGOEX_ALERT_VERIFY_NO_KEY: val = "NEGOEX_ALERT_VERIFY_NO_KEY"; break;
248 : }
249 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
250 0 : }
251 :
252 0 : _PUBLIC_ enum ndr_err_code ndr_push_negoex_ALERT_PULSE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_ALERT_PULSE *r)
253 : {
254 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
255 0 : if (ndr_flags & NDR_SCALARS) {
256 0 : NDR_CHECK(ndr_push_align(ndr, 4));
257 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
258 0 : NDR_CHECK(ndr_push_negoex_AlertReason(ndr, NDR_SCALARS, r->reason));
259 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
260 : }
261 0 : if (ndr_flags & NDR_BUFFERS) {
262 0 : }
263 0 : return NDR_ERR_SUCCESS;
264 : }
265 :
266 0 : _PUBLIC_ enum ndr_err_code ndr_pull_negoex_ALERT_PULSE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_ALERT_PULSE *r)
267 : {
268 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
269 0 : if (ndr_flags & NDR_SCALARS) {
270 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
271 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->header_length));
272 0 : NDR_CHECK(ndr_pull_negoex_AlertReason(ndr, NDR_SCALARS, &r->reason));
273 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
274 : }
275 0 : if (ndr_flags & NDR_BUFFERS) {
276 0 : }
277 0 : return NDR_ERR_SUCCESS;
278 : }
279 :
280 0 : static void ndr_print_flags_negoex_ALERT_PULSE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct negoex_ALERT_PULSE *r)
281 : {
282 0 : ndr_print_negoex_ALERT_PULSE(ndr, name, r);
283 0 : }
284 :
285 0 : _PUBLIC_ void ndr_print_negoex_ALERT_PULSE(struct ndr_print *ndr, const char *name, const struct negoex_ALERT_PULSE *r)
286 : {
287 0 : ndr_print_struct(ndr, name, "negoex_ALERT_PULSE");
288 0 : if (r == NULL) { ndr_print_null(ndr); return; }
289 0 : ndr->depth++;
290 0 : ndr_print_uint32(ndr, "header_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->header_length);
291 0 : ndr_print_negoex_AlertReason(ndr, "reason", r->reason);
292 0 : ndr->depth--;
293 : }
294 :
295 0 : static enum ndr_err_code ndr_push_negoex_AlertTypes(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum negoex_AlertTypes r)
296 : {
297 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
298 0 : return NDR_ERR_SUCCESS;
299 : }
300 :
301 0 : static enum ndr_err_code ndr_pull_negoex_AlertTypes(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum negoex_AlertTypes *r)
302 : {
303 0 : uint32_t v;
304 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
305 0 : *r = v;
306 0 : return NDR_ERR_SUCCESS;
307 : }
308 :
309 0 : _PUBLIC_ void ndr_print_negoex_AlertTypes(struct ndr_print *ndr, const char *name, enum negoex_AlertTypes r)
310 : {
311 0 : const char *val = NULL;
312 :
313 0 : switch (r) {
314 0 : case NEGOEX_ALERT_TYPE_PULSE: val = "NEGOEX_ALERT_TYPE_PULSE"; break;
315 : }
316 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
317 0 : }
318 :
319 0 : _PUBLIC_ enum ndr_err_code ndr_push_negoex_ALERT(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_ALERT *r)
320 : {
321 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
322 0 : if (ndr_flags & NDR_SCALARS) {
323 0 : NDR_CHECK(ndr_push_align(ndr, 5));
324 0 : NDR_CHECK(ndr_push_negoex_AlertTypes(ndr, NDR_SCALARS, r->type));
325 0 : NDR_CHECK(ndr_push_negoex_BYTE_VECTOR(ndr, NDR_SCALARS, &r->value));
326 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
327 : }
328 0 : if (ndr_flags & NDR_BUFFERS) {
329 0 : NDR_CHECK(ndr_push_negoex_BYTE_VECTOR(ndr, NDR_BUFFERS, &r->value));
330 : }
331 0 : return NDR_ERR_SUCCESS;
332 : }
333 :
334 0 : _PUBLIC_ enum ndr_err_code ndr_pull_negoex_ALERT(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_ALERT *r)
335 : {
336 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
337 0 : if (ndr_flags & NDR_SCALARS) {
338 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
339 0 : NDR_CHECK(ndr_pull_negoex_AlertTypes(ndr, NDR_SCALARS, &r->type));
340 0 : NDR_CHECK(ndr_pull_negoex_BYTE_VECTOR(ndr, NDR_SCALARS, &r->value));
341 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
342 : }
343 0 : if (ndr_flags & NDR_BUFFERS) {
344 0 : NDR_CHECK(ndr_pull_negoex_BYTE_VECTOR(ndr, NDR_BUFFERS, &r->value));
345 : }
346 0 : return NDR_ERR_SUCCESS;
347 : }
348 :
349 0 : static void ndr_print_flags_negoex_ALERT(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct negoex_ALERT *r)
350 : {
351 0 : ndr_print_negoex_ALERT(ndr, name, r);
352 0 : }
353 :
354 0 : _PUBLIC_ void ndr_print_negoex_ALERT(struct ndr_print *ndr, const char *name, const struct negoex_ALERT *r)
355 : {
356 0 : ndr_print_struct(ndr, name, "negoex_ALERT");
357 0 : if (r == NULL) { ndr_print_null(ndr); return; }
358 0 : ndr->depth++;
359 0 : ndr_print_negoex_AlertTypes(ndr, "type", r->type);
360 0 : ndr_print_negoex_BYTE_VECTOR(ndr, "value", &r->value);
361 0 : ndr->depth--;
362 : }
363 :
364 0 : _PUBLIC_ void ndr_print_negoex_ALERT_VECTOR(struct ndr_print *ndr, const char *name, const struct negoex_ALERT_VECTOR *r)
365 : {
366 0 : uint32_t cntr_array_1;
367 0 : ndr_print_struct(ndr, name, "negoex_ALERT_VECTOR");
368 0 : if (r == NULL) { ndr_print_null(ndr); return; }
369 0 : ndr->depth++;
370 0 : ndr_print_ptr(ndr, "array", r->array);
371 0 : ndr->depth++;
372 0 : if (r->array) {
373 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
374 0 : ndr->depth++;
375 0 : for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
376 0 : ndr_print_negoex_ALERT(ndr, "array", &r->array[cntr_array_1]);
377 : }
378 0 : ndr->depth--;
379 : }
380 0 : ndr->depth--;
381 0 : ndr_print_uint32(ndr, "count", r->count);
382 0 : ndr->depth--;
383 : }
384 :
385 8 : _PUBLIC_ enum ndr_err_code ndr_push_negoex_MESSAGE_TYPE(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum negoex_MESSAGE_TYPE r)
386 : {
387 8 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
388 0 : return NDR_ERR_SUCCESS;
389 : }
390 :
391 4 : _PUBLIC_ enum ndr_err_code ndr_pull_negoex_MESSAGE_TYPE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum negoex_MESSAGE_TYPE *r)
392 : {
393 4 : uint32_t v;
394 4 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
395 4 : *r = v;
396 4 : return NDR_ERR_SUCCESS;
397 : }
398 :
399 4 : _PUBLIC_ void ndr_print_negoex_MESSAGE_TYPE(struct ndr_print *ndr, const char *name, enum negoex_MESSAGE_TYPE r)
400 : {
401 4 : const char *val = NULL;
402 :
403 4 : switch (r) {
404 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO: val = "NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO"; break;
405 2 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO: val = "NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO"; break;
406 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA: val = "NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA"; break;
407 2 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA: val = "NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA"; break;
408 0 : case NEGOEX_MESSAGE_TYPE_CHALLENGE: val = "NEGOEX_MESSAGE_TYPE_CHALLENGE"; break;
409 0 : case NEGOEX_MESSAGE_TYPE_AP_REQUEST: val = "NEGOEX_MESSAGE_TYPE_AP_REQUEST"; break;
410 0 : case NEGOEX_MESSAGE_TYPE_VERIFY: val = "NEGOEX_MESSAGE_TYPE_VERIFY"; break;
411 0 : case NEGOEX_MESSAGE_TYPE_ALERT: val = "NEGOEX_MESSAGE_TYPE_ALERT"; break;
412 : }
413 4 : ndr_print_enum(ndr, name, "ENUM", val, r);
414 4 : }
415 :
416 8 : static enum ndr_err_code ndr_push_negoex_NEGO_PAYLOAD(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_NEGO_PAYLOAD *r)
417 : {
418 : {
419 8 : libndr_flags _flags_save_STRUCT = ndr->flags;
420 8 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
421 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
422 8 : if (ndr_flags & NDR_SCALARS) {
423 4 : NDR_CHECK(ndr_push_align(ndr, 5));
424 : {
425 4 : libndr_flags _flags_save_uint8 = ndr->flags;
426 4 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
427 4 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->random, 32));
428 4 : ndr->flags = _flags_save_uint8;
429 : }
430 4 : NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, NEGOEX_PROTOCOL_VERSION_0));
431 4 : NDR_CHECK(ndr_push_negoex_AUTH_SCHEME_VECTOR(ndr, NDR_SCALARS, &r->auth_schemes));
432 4 : NDR_CHECK(ndr_push_negoex_EXTENSION_VECTOR(ndr, NDR_SCALARS, &r->extensions));
433 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
434 : }
435 8 : if (ndr_flags & NDR_BUFFERS) {
436 4 : NDR_CHECK(ndr_push_negoex_AUTH_SCHEME_VECTOR(ndr, NDR_BUFFERS, &r->auth_schemes));
437 4 : NDR_CHECK(ndr_push_negoex_EXTENSION_VECTOR(ndr, NDR_BUFFERS, &r->extensions));
438 : }
439 8 : ndr->flags = _flags_save_STRUCT;
440 : }
441 8 : return NDR_ERR_SUCCESS;
442 : }
443 :
444 4 : static enum ndr_err_code ndr_pull_negoex_NEGO_PAYLOAD(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_NEGO_PAYLOAD *r)
445 : {
446 4 : uint32_t size_random_0 = 0;
447 : {
448 4 : libndr_flags _flags_save_STRUCT = ndr->flags;
449 4 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
450 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
451 4 : if (ndr_flags & NDR_SCALARS) {
452 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
453 : {
454 2 : libndr_flags _flags_save_uint8 = ndr->flags;
455 2 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
456 2 : size_random_0 = 32;
457 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->random, size_random_0));
458 2 : ndr->flags = _flags_save_uint8;
459 : }
460 2 : NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->protocol_version));
461 2 : NDR_CHECK(ndr_pull_negoex_AUTH_SCHEME_VECTOR(ndr, NDR_SCALARS, &r->auth_schemes));
462 2 : NDR_CHECK(ndr_pull_negoex_EXTENSION_VECTOR(ndr, NDR_SCALARS, &r->extensions));
463 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
464 : }
465 4 : if (ndr_flags & NDR_BUFFERS) {
466 2 : NDR_CHECK(ndr_pull_negoex_AUTH_SCHEME_VECTOR(ndr, NDR_BUFFERS, &r->auth_schemes));
467 2 : NDR_CHECK(ndr_pull_negoex_EXTENSION_VECTOR(ndr, NDR_BUFFERS, &r->extensions));
468 : }
469 4 : ndr->flags = _flags_save_STRUCT;
470 : }
471 4 : return NDR_ERR_SUCCESS;
472 : }
473 :
474 2 : _PUBLIC_ void ndr_print_negoex_NEGO_PAYLOAD(struct ndr_print *ndr, const char *name, const struct negoex_NEGO_PAYLOAD *r)
475 : {
476 2 : ndr_print_struct(ndr, name, "negoex_NEGO_PAYLOAD");
477 2 : if (r == NULL) { ndr_print_null(ndr); return; }
478 : {
479 2 : libndr_flags _flags_save_STRUCT = ndr->flags;
480 2 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
481 2 : ndr->depth++;
482 : {
483 2 : libndr_flags _flags_save_uint8 = ndr->flags;
484 2 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
485 2 : ndr_print_array_uint8(ndr, "random", r->random, 32);
486 2 : ndr->flags = _flags_save_uint8;
487 : }
488 2 : ndr_print_udlong(ndr, "protocol_version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NEGOEX_PROTOCOL_VERSION_0:r->protocol_version);
489 2 : ndr_print_negoex_AUTH_SCHEME_VECTOR(ndr, "auth_schemes", &r->auth_schemes);
490 2 : ndr_print_negoex_EXTENSION_VECTOR(ndr, "extensions", &r->extensions);
491 2 : ndr->depth--;
492 2 : ndr->flags = _flags_save_STRUCT;
493 : }
494 : }
495 :
496 8 : static enum ndr_err_code ndr_push_negoex_EXCHANGE_PAYLOAD(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_EXCHANGE_PAYLOAD *r)
497 : {
498 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
499 4 : if (ndr_flags & NDR_SCALARS) {
500 4 : NDR_CHECK(ndr_push_align(ndr, 5));
501 4 : NDR_CHECK(ndr_push_negoex_AUTH_SCHEME(ndr, NDR_SCALARS, &r->auth_scheme));
502 4 : NDR_CHECK(ndr_push_negoex_BYTE_VECTOR(ndr, NDR_SCALARS, &r->exchange));
503 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
504 : }
505 4 : if (ndr_flags & NDR_BUFFERS) {
506 4 : NDR_CHECK(ndr_push_negoex_BYTE_VECTOR(ndr, NDR_BUFFERS, &r->exchange));
507 : }
508 0 : return NDR_ERR_SUCCESS;
509 : }
510 :
511 4 : static enum ndr_err_code ndr_pull_negoex_EXCHANGE_PAYLOAD(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_EXCHANGE_PAYLOAD *r)
512 : {
513 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
514 4 : if (ndr_flags & NDR_SCALARS) {
515 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
516 2 : NDR_CHECK(ndr_pull_negoex_AUTH_SCHEME(ndr, NDR_SCALARS, &r->auth_scheme));
517 2 : NDR_CHECK(ndr_pull_negoex_BYTE_VECTOR(ndr, NDR_SCALARS, &r->exchange));
518 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
519 : }
520 4 : if (ndr_flags & NDR_BUFFERS) {
521 2 : NDR_CHECK(ndr_pull_negoex_BYTE_VECTOR(ndr, NDR_BUFFERS, &r->exchange));
522 : }
523 0 : return NDR_ERR_SUCCESS;
524 : }
525 :
526 2 : _PUBLIC_ void ndr_print_negoex_EXCHANGE_PAYLOAD(struct ndr_print *ndr, const char *name, const struct negoex_EXCHANGE_PAYLOAD *r)
527 : {
528 2 : ndr_print_struct(ndr, name, "negoex_EXCHANGE_PAYLOAD");
529 2 : if (r == NULL) { ndr_print_null(ndr); return; }
530 2 : ndr->depth++;
531 2 : ndr_print_negoex_AUTH_SCHEME(ndr, "auth_scheme", &r->auth_scheme);
532 2 : ndr_print_negoex_BYTE_VECTOR(ndr, "exchange", &r->exchange);
533 2 : ndr->depth--;
534 : }
535 :
536 0 : static enum ndr_err_code ndr_push_negoex_VERIFY_PAYLOAD(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_VERIFY_PAYLOAD *r)
537 : {
538 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
539 0 : if (ndr_flags & NDR_SCALARS) {
540 0 : NDR_CHECK(ndr_push_align(ndr, 5));
541 0 : NDR_CHECK(ndr_push_negoex_AUTH_SCHEME(ndr, NDR_SCALARS, &r->auth_scheme));
542 0 : NDR_CHECK(ndr_push_negoex_CHECKSUM(ndr, NDR_SCALARS, &r->checksum));
543 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
544 : }
545 0 : if (ndr_flags & NDR_BUFFERS) {
546 0 : NDR_CHECK(ndr_push_negoex_CHECKSUM(ndr, NDR_BUFFERS, &r->checksum));
547 : }
548 0 : return NDR_ERR_SUCCESS;
549 : }
550 :
551 0 : static enum ndr_err_code ndr_pull_negoex_VERIFY_PAYLOAD(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_VERIFY_PAYLOAD *r)
552 : {
553 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
554 0 : if (ndr_flags & NDR_SCALARS) {
555 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
556 0 : NDR_CHECK(ndr_pull_negoex_AUTH_SCHEME(ndr, NDR_SCALARS, &r->auth_scheme));
557 0 : NDR_CHECK(ndr_pull_negoex_CHECKSUM(ndr, NDR_SCALARS, &r->checksum));
558 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
559 : }
560 0 : if (ndr_flags & NDR_BUFFERS) {
561 0 : NDR_CHECK(ndr_pull_negoex_CHECKSUM(ndr, NDR_BUFFERS, &r->checksum));
562 : }
563 0 : return NDR_ERR_SUCCESS;
564 : }
565 :
566 0 : _PUBLIC_ void ndr_print_negoex_VERIFY_PAYLOAD(struct ndr_print *ndr, const char *name, const struct negoex_VERIFY_PAYLOAD *r)
567 : {
568 0 : ndr_print_struct(ndr, name, "negoex_VERIFY_PAYLOAD");
569 0 : if (r == NULL) { ndr_print_null(ndr); return; }
570 0 : ndr->depth++;
571 0 : ndr_print_negoex_AUTH_SCHEME(ndr, "auth_scheme", &r->auth_scheme);
572 0 : ndr_print_negoex_CHECKSUM(ndr, "checksum", &r->checksum);
573 0 : ndr->depth--;
574 : }
575 :
576 0 : static enum ndr_err_code ndr_push_negoex_ALERT_PAYLOAD(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_ALERT_PAYLOAD *r)
577 : {
578 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
579 0 : if (ndr_flags & NDR_SCALARS) {
580 0 : NDR_CHECK(ndr_push_align(ndr, 5));
581 0 : NDR_CHECK(ndr_push_negoex_AUTH_SCHEME(ndr, NDR_SCALARS, &r->auth_scheme));
582 0 : NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
583 0 : NDR_CHECK(ndr_push_negoex_ALERT_VECTOR(ndr, NDR_SCALARS, &r->alerts));
584 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
585 : }
586 0 : if (ndr_flags & NDR_BUFFERS) {
587 0 : NDR_CHECK(ndr_push_negoex_ALERT_VECTOR(ndr, NDR_BUFFERS, &r->alerts));
588 : }
589 0 : return NDR_ERR_SUCCESS;
590 : }
591 :
592 0 : static enum ndr_err_code ndr_pull_negoex_ALERT_PAYLOAD(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct negoex_ALERT_PAYLOAD *r)
593 : {
594 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
595 0 : if (ndr_flags & NDR_SCALARS) {
596 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
597 0 : NDR_CHECK(ndr_pull_negoex_AUTH_SCHEME(ndr, NDR_SCALARS, &r->auth_scheme));
598 0 : NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
599 0 : NDR_CHECK(ndr_pull_negoex_ALERT_VECTOR(ndr, NDR_SCALARS, &r->alerts));
600 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
601 : }
602 0 : if (ndr_flags & NDR_BUFFERS) {
603 0 : NDR_CHECK(ndr_pull_negoex_ALERT_VECTOR(ndr, NDR_BUFFERS, &r->alerts));
604 : }
605 0 : return NDR_ERR_SUCCESS;
606 : }
607 :
608 0 : _PUBLIC_ void ndr_print_negoex_ALERT_PAYLOAD(struct ndr_print *ndr, const char *name, const struct negoex_ALERT_PAYLOAD *r)
609 : {
610 0 : ndr_print_struct(ndr, name, "negoex_ALERT_PAYLOAD");
611 0 : if (r == NULL) { ndr_print_null(ndr); return; }
612 0 : ndr->depth++;
613 0 : ndr_print_negoex_AUTH_SCHEME(ndr, "auth_scheme", &r->auth_scheme);
614 0 : ndr_print_NTSTATUS(ndr, "status", r->status);
615 0 : ndr_print_negoex_ALERT_VECTOR(ndr, "alerts", &r->alerts);
616 0 : ndr->depth--;
617 : }
618 :
619 16 : _PUBLIC_ enum ndr_err_code ndr_push_negoex_PAYLOAD(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union negoex_PAYLOAD *r)
620 : {
621 16 : uint32_t level;
622 16 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
623 16 : if (ndr_flags & NDR_SCALARS) {
624 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
625 8 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
626 8 : NDR_CHECK(ndr_push_union_align(ndr, 5));
627 8 : switch (level) {
628 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO: {
629 0 : NDR_CHECK(ndr_push_negoex_NEGO_PAYLOAD(ndr, NDR_SCALARS, &r->nego));
630 0 : break; }
631 :
632 4 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO: {
633 4 : NDR_CHECK(ndr_push_negoex_NEGO_PAYLOAD(ndr, NDR_SCALARS, &r->nego));
634 0 : break; }
635 :
636 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA: {
637 0 : NDR_CHECK(ndr_push_negoex_EXCHANGE_PAYLOAD(ndr, NDR_SCALARS, &r->exchange));
638 0 : break; }
639 :
640 4 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA: {
641 4 : NDR_CHECK(ndr_push_negoex_EXCHANGE_PAYLOAD(ndr, NDR_SCALARS, &r->exchange));
642 0 : break; }
643 :
644 0 : case NEGOEX_MESSAGE_TYPE_CHALLENGE: {
645 0 : NDR_CHECK(ndr_push_negoex_EXCHANGE_PAYLOAD(ndr, NDR_SCALARS, &r->exchange));
646 0 : break; }
647 :
648 0 : case NEGOEX_MESSAGE_TYPE_AP_REQUEST: {
649 0 : NDR_CHECK(ndr_push_negoex_EXCHANGE_PAYLOAD(ndr, NDR_SCALARS, &r->exchange));
650 0 : break; }
651 :
652 0 : case NEGOEX_MESSAGE_TYPE_VERIFY: {
653 0 : NDR_CHECK(ndr_push_negoex_VERIFY_PAYLOAD(ndr, NDR_SCALARS, &r->verify));
654 0 : break; }
655 :
656 0 : case NEGOEX_MESSAGE_TYPE_ALERT: {
657 0 : NDR_CHECK(ndr_push_negoex_ALERT_PAYLOAD(ndr, NDR_SCALARS, &r->alert));
658 0 : break; }
659 :
660 0 : default:
661 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
662 : }
663 : }
664 16 : if (ndr_flags & NDR_BUFFERS) {
665 8 : if (!(ndr_flags & NDR_SCALARS)) {
666 : /* We didn't get it above, and the token is not needed after this. */
667 8 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
668 : }
669 8 : switch (level) {
670 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO:
671 0 : NDR_CHECK(ndr_push_negoex_NEGO_PAYLOAD(ndr, NDR_BUFFERS, &r->nego));
672 0 : break;
673 :
674 4 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO:
675 4 : NDR_CHECK(ndr_push_negoex_NEGO_PAYLOAD(ndr, NDR_BUFFERS, &r->nego));
676 0 : break;
677 :
678 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA:
679 0 : NDR_CHECK(ndr_push_negoex_EXCHANGE_PAYLOAD(ndr, NDR_BUFFERS, &r->exchange));
680 0 : break;
681 :
682 4 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA:
683 8 : NDR_CHECK(ndr_push_negoex_EXCHANGE_PAYLOAD(ndr, NDR_BUFFERS, &r->exchange));
684 0 : break;
685 :
686 0 : case NEGOEX_MESSAGE_TYPE_CHALLENGE:
687 0 : NDR_CHECK(ndr_push_negoex_EXCHANGE_PAYLOAD(ndr, NDR_BUFFERS, &r->exchange));
688 0 : break;
689 :
690 0 : case NEGOEX_MESSAGE_TYPE_AP_REQUEST:
691 0 : NDR_CHECK(ndr_push_negoex_EXCHANGE_PAYLOAD(ndr, NDR_BUFFERS, &r->exchange));
692 0 : break;
693 :
694 0 : case NEGOEX_MESSAGE_TYPE_VERIFY:
695 0 : NDR_CHECK(ndr_push_negoex_VERIFY_PAYLOAD(ndr, NDR_BUFFERS, &r->verify));
696 0 : break;
697 :
698 0 : case NEGOEX_MESSAGE_TYPE_ALERT:
699 0 : NDR_CHECK(ndr_push_negoex_ALERT_PAYLOAD(ndr, NDR_BUFFERS, &r->alert));
700 0 : break;
701 :
702 0 : default:
703 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
704 : }
705 : }
706 0 : return NDR_ERR_SUCCESS;
707 : }
708 :
709 8 : _PUBLIC_ enum ndr_err_code ndr_pull_negoex_PAYLOAD(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union negoex_PAYLOAD *r)
710 : {
711 8 : uint32_t level;
712 8 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
713 8 : if (ndr_flags & NDR_SCALARS) {
714 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
715 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
716 4 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
717 4 : switch (level) {
718 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO: {
719 0 : NDR_CHECK(ndr_pull_negoex_NEGO_PAYLOAD(ndr, NDR_SCALARS, &r->nego));
720 0 : break; }
721 :
722 2 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO: {
723 2 : NDR_CHECK(ndr_pull_negoex_NEGO_PAYLOAD(ndr, NDR_SCALARS, &r->nego));
724 0 : break; }
725 :
726 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA: {
727 0 : NDR_CHECK(ndr_pull_negoex_EXCHANGE_PAYLOAD(ndr, NDR_SCALARS, &r->exchange));
728 0 : break; }
729 :
730 2 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA: {
731 2 : NDR_CHECK(ndr_pull_negoex_EXCHANGE_PAYLOAD(ndr, NDR_SCALARS, &r->exchange));
732 0 : break; }
733 :
734 0 : case NEGOEX_MESSAGE_TYPE_CHALLENGE: {
735 0 : NDR_CHECK(ndr_pull_negoex_EXCHANGE_PAYLOAD(ndr, NDR_SCALARS, &r->exchange));
736 0 : break; }
737 :
738 0 : case NEGOEX_MESSAGE_TYPE_AP_REQUEST: {
739 0 : NDR_CHECK(ndr_pull_negoex_EXCHANGE_PAYLOAD(ndr, NDR_SCALARS, &r->exchange));
740 0 : break; }
741 :
742 0 : case NEGOEX_MESSAGE_TYPE_VERIFY: {
743 0 : NDR_CHECK(ndr_pull_negoex_VERIFY_PAYLOAD(ndr, NDR_SCALARS, &r->verify));
744 0 : break; }
745 :
746 0 : case NEGOEX_MESSAGE_TYPE_ALERT: {
747 0 : NDR_CHECK(ndr_pull_negoex_ALERT_PAYLOAD(ndr, NDR_SCALARS, &r->alert));
748 0 : break; }
749 :
750 0 : default:
751 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
752 : }
753 : }
754 8 : if (ndr_flags & NDR_BUFFERS) {
755 4 : if (!(ndr_flags & NDR_SCALARS)) {
756 : /* We didn't get it above, and the token is not needed after this. */
757 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
758 : }
759 4 : switch (level) {
760 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO:
761 0 : NDR_CHECK(ndr_pull_negoex_NEGO_PAYLOAD(ndr, NDR_BUFFERS, &r->nego));
762 0 : break;
763 :
764 2 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO:
765 2 : NDR_CHECK(ndr_pull_negoex_NEGO_PAYLOAD(ndr, NDR_BUFFERS, &r->nego));
766 0 : break;
767 :
768 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA:
769 0 : NDR_CHECK(ndr_pull_negoex_EXCHANGE_PAYLOAD(ndr, NDR_BUFFERS, &r->exchange));
770 0 : break;
771 :
772 2 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA:
773 2 : NDR_CHECK(ndr_pull_negoex_EXCHANGE_PAYLOAD(ndr, NDR_BUFFERS, &r->exchange));
774 0 : break;
775 :
776 0 : case NEGOEX_MESSAGE_TYPE_CHALLENGE:
777 0 : NDR_CHECK(ndr_pull_negoex_EXCHANGE_PAYLOAD(ndr, NDR_BUFFERS, &r->exchange));
778 0 : break;
779 :
780 0 : case NEGOEX_MESSAGE_TYPE_AP_REQUEST:
781 0 : NDR_CHECK(ndr_pull_negoex_EXCHANGE_PAYLOAD(ndr, NDR_BUFFERS, &r->exchange));
782 0 : break;
783 :
784 0 : case NEGOEX_MESSAGE_TYPE_VERIFY:
785 0 : NDR_CHECK(ndr_pull_negoex_VERIFY_PAYLOAD(ndr, NDR_BUFFERS, &r->verify));
786 0 : break;
787 :
788 0 : case NEGOEX_MESSAGE_TYPE_ALERT:
789 0 : NDR_CHECK(ndr_pull_negoex_ALERT_PAYLOAD(ndr, NDR_BUFFERS, &r->alert));
790 0 : break;
791 :
792 0 : default:
793 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
794 : }
795 : }
796 0 : return NDR_ERR_SUCCESS;
797 : }
798 :
799 4 : _PUBLIC_ void ndr_print_negoex_PAYLOAD(struct ndr_print *ndr, const char *name, const union negoex_PAYLOAD *r)
800 : {
801 4 : uint32_t level;
802 4 : level = ndr_print_steal_switch_value(ndr, r);
803 4 : ndr_print_union(ndr, name, level, "negoex_PAYLOAD");
804 4 : switch (level) {
805 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_NEGO:
806 0 : ndr_print_negoex_NEGO_PAYLOAD(ndr, "nego", &r->nego);
807 0 : break;
808 :
809 2 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_NEGO:
810 2 : ndr_print_negoex_NEGO_PAYLOAD(ndr, "nego", &r->nego);
811 2 : break;
812 :
813 0 : case NEGOEX_MESSAGE_TYPE_INITIATOR_META_DATA:
814 0 : ndr_print_negoex_EXCHANGE_PAYLOAD(ndr, "exchange", &r->exchange);
815 0 : break;
816 :
817 2 : case NEGOEX_MESSAGE_TYPE_ACCEPTOR_META_DATA:
818 2 : ndr_print_negoex_EXCHANGE_PAYLOAD(ndr, "exchange", &r->exchange);
819 2 : break;
820 :
821 0 : case NEGOEX_MESSAGE_TYPE_CHALLENGE:
822 0 : ndr_print_negoex_EXCHANGE_PAYLOAD(ndr, "exchange", &r->exchange);
823 0 : break;
824 :
825 0 : case NEGOEX_MESSAGE_TYPE_AP_REQUEST:
826 0 : ndr_print_negoex_EXCHANGE_PAYLOAD(ndr, "exchange", &r->exchange);
827 0 : break;
828 :
829 0 : case NEGOEX_MESSAGE_TYPE_VERIFY:
830 0 : ndr_print_negoex_VERIFY_PAYLOAD(ndr, "verify", &r->verify);
831 0 : break;
832 :
833 0 : case NEGOEX_MESSAGE_TYPE_ALERT:
834 0 : ndr_print_negoex_ALERT_PAYLOAD(ndr, "alert", &r->alert);
835 0 : break;
836 :
837 0 : default:
838 0 : ndr_print_bad_level(ndr, name, level);
839 : }
840 4 : }
841 :
842 8 : _PUBLIC_ enum ndr_err_code ndr_push_negoex_MESSAGE(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct negoex_MESSAGE *r)
843 : {
844 8 : uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
845 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
846 8 : if (ndr_flags & NDR_SCALARS) {
847 8 : NDR_CHECK(ndr_push_align(ndr, 5));
848 8 : NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
849 8 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "NEGOEXTS", 8, sizeof(uint8_t), CH_DOS));
850 8 : NDR_CHECK(ndr_push_negoex_MESSAGE_TYPE(ndr, NDR_SCALARS, r->type));
851 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sequence_number));
852 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_negoex_MESSAGE_header_length(r)));
853 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_negoex_MESSAGE(r, ndr->flags)));
854 8 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->conversation_id));
855 8 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
856 8 : NDR_CHECK(ndr_push_negoex_PAYLOAD(ndr, NDR_SCALARS, &r->p));
857 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
858 : }
859 8 : if (ndr_flags & NDR_BUFFERS) {
860 8 : NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
861 8 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
862 8 : NDR_CHECK(ndr_push_negoex_PAYLOAD(ndr, NDR_BUFFERS, &r->p));
863 : }
864 8 : ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
865 8 : return NDR_ERR_SUCCESS;
866 : }
867 :
868 0 : static void ndr_print_flags_negoex_MESSAGE(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct negoex_MESSAGE *r)
869 : {
870 0 : ndr_print_negoex_MESSAGE(ndr, name, r);
871 0 : }
872 :
873 4 : _PUBLIC_ void ndr_print_negoex_MESSAGE(struct ndr_print *ndr, const char *name, const struct negoex_MESSAGE *r)
874 : {
875 4 : ndr_print_struct(ndr, name, "negoex_MESSAGE");
876 4 : if (r == NULL) { ndr_print_null(ndr); return; }
877 4 : ndr->depth++;
878 4 : ndr_print_string(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"NEGOEXTS":r->signature);
879 4 : ndr_print_negoex_MESSAGE_TYPE(ndr, "type", r->type);
880 4 : ndr_print_uint32(ndr, "sequence_number", r->sequence_number);
881 4 : ndr_print_uint32(ndr, "header_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_negoex_MESSAGE_header_length(r):r->header_length);
882 4 : ndr_print_uint32(ndr, "message_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_negoex_MESSAGE(r, ndr->flags):r->message_length);
883 4 : ndr_print_GUID(ndr, "conversation_id", &r->conversation_id);
884 4 : ndr_print_set_switch_value(ndr, &r->p, r->type);
885 4 : ndr_print_negoex_PAYLOAD(ndr, "p", &r->p);
886 4 : ndr->depth--;
887 : }
888 :
889 8 : _PUBLIC_ size_t ndr_size_negoex_MESSAGE(const struct negoex_MESSAGE *r, libndr_flags flags)
890 : {
891 8 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_negoex_MESSAGE);
892 : }
893 :
894 0 : static void ndr_print_flags_negoex_MESSAGE_ARRAY(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct negoex_MESSAGE_ARRAY *r)
895 : {
896 0 : ndr_print_negoex_MESSAGE_ARRAY(ndr, name, r);
897 0 : }
898 :
899 2 : _PUBLIC_ void ndr_print_negoex_MESSAGE_ARRAY(struct ndr_print *ndr, const char *name, const struct negoex_MESSAGE_ARRAY *r)
900 : {
901 2 : uint32_t cntr_messages_0;
902 2 : ndr_print_struct(ndr, name, "negoex_MESSAGE_ARRAY");
903 2 : if (r == NULL) { ndr_print_null(ndr); return; }
904 : {
905 2 : libndr_flags _flags_save_STRUCT = ndr->flags;
906 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
907 2 : ndr->depth++;
908 2 : ndr_print_uint32(ndr, "count", r->count);
909 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "messages", (uint32_t)(r->count));
910 2 : ndr->depth++;
911 6 : for (cntr_messages_0 = 0; cntr_messages_0 < (r->count); cntr_messages_0++) {
912 4 : ndr_print_negoex_MESSAGE(ndr, "messages", &r->messages[cntr_messages_0]);
913 : }
914 2 : ndr->depth--;
915 2 : ndr->depth--;
916 2 : ndr->flags = _flags_save_STRUCT;
917 : }
918 : }
919 :
920 : #ifndef SKIP_NDR_TABLE_negoex
921 : static const struct ndr_interface_public_struct negoex_public_structs[] = {
922 : {
923 : .name = "negoex_AUTH_SCHEME",
924 : .struct_size = sizeof(struct negoex_AUTH_SCHEME ),
925 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_negoex_AUTH_SCHEME,
926 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_negoex_AUTH_SCHEME,
927 : .ndr_print = (ndr_print_function_t) ndr_print_flags_negoex_AUTH_SCHEME,
928 : },
929 : {
930 : .name = "negoex_EXTENSION",
931 : .struct_size = sizeof(struct negoex_EXTENSION ),
932 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_negoex_EXTENSION,
933 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_negoex_EXTENSION,
934 : .ndr_print = (ndr_print_function_t) ndr_print_flags_negoex_EXTENSION,
935 : },
936 : {
937 : .name = "negoex_ALERT_PULSE",
938 : .struct_size = sizeof(struct negoex_ALERT_PULSE ),
939 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_negoex_ALERT_PULSE,
940 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_negoex_ALERT_PULSE,
941 : .ndr_print = (ndr_print_function_t) ndr_print_flags_negoex_ALERT_PULSE,
942 : },
943 : {
944 : .name = "negoex_ALERT",
945 : .struct_size = sizeof(struct negoex_ALERT ),
946 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_negoex_ALERT,
947 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_negoex_ALERT,
948 : .ndr_print = (ndr_print_function_t) ndr_print_flags_negoex_ALERT,
949 : },
950 : {
951 : .name = "negoex_MESSAGE",
952 : .struct_size = sizeof(struct negoex_MESSAGE ),
953 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_negoex_MESSAGE,
954 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_negoex_MESSAGE,
955 : .ndr_print = (ndr_print_function_t) ndr_print_flags_negoex_MESSAGE,
956 : },
957 : {
958 : .name = "negoex_MESSAGE_ARRAY",
959 : .struct_size = sizeof(struct negoex_MESSAGE_ARRAY ),
960 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_negoex_MESSAGE_ARRAY,
961 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_negoex_MESSAGE_ARRAY,
962 : .ndr_print = (ndr_print_function_t) ndr_print_flags_negoex_MESSAGE_ARRAY,
963 : },
964 : { .name = NULL }
965 : };
966 :
967 : static const struct ndr_interface_call negoex_calls[] = {
968 : { .name = NULL }
969 : };
970 :
971 : static const char * const negoex_endpoint_strings[] = {
972 : "ncacn_np:[\\pipe\\negoex]",
973 : };
974 :
975 : static const struct ndr_interface_string_array negoex_endpoints = {
976 : .count = 1,
977 : .names = negoex_endpoint_strings
978 : };
979 :
980 : static const char * const negoex_authservice_strings[] = {
981 : "host",
982 : };
983 :
984 : static const struct ndr_interface_string_array negoex_authservices = {
985 : .count = 1,
986 : .names = negoex_authservice_strings
987 : };
988 :
989 :
990 : const struct ndr_interface_table ndr_table_negoex = {
991 : .name = "negoex",
992 : .syntax_id = {
993 : {0xfcc30ddc,0x98d0,0x11e5,{0x8a,0x56},{0x83,0xe9,0xa6,0x70,0x6f,0x2f}},
994 : NDR_NEGOEX_VERSION
995 : },
996 : .helpstring = NDR_NEGOEX_HELPSTRING,
997 : .num_calls = 0,
998 : .calls = negoex_calls,
999 : .num_public_structs = 6,
1000 : .public_structs = negoex_public_structs,
1001 : .endpoints = &negoex_endpoints,
1002 : .authservices = &negoex_authservices
1003 : };
1004 :
1005 : #endif /* SKIP_NDR_TABLE_negoex */
|