Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_krb5ccache.h"
5 :
6 81 : static enum ndr_err_code ndr_push_PRINCIPAL(struct ndr_push *ndr, int ndr_flags, const struct PRINCIPAL *r)
7 : {
8 : uint32_t cntr_components_0;
9 81 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10 81 : if (ndr_flags & NDR_SCALARS) {
11 81 : NDR_CHECK(ndr_push_align(ndr, 4));
12 81 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->name_type));
13 81 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->component_count));
14 : {
15 81 : uint32_t _flags_save_string = ndr->flags;
16 81 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_UTF8);
17 81 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->realm));
18 81 : ndr->flags = _flags_save_string;
19 : }
20 : {
21 81 : uint32_t _flags_save_string = ndr->flags;
22 81 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_UTF8);
23 189 : for (cntr_components_0 = 0; cntr_components_0 < (r->component_count); cntr_components_0++) {
24 108 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->components[cntr_components_0]));
25 : }
26 81 : ndr->flags = _flags_save_string;
27 : }
28 81 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
29 : }
30 81 : if (ndr_flags & NDR_BUFFERS) {
31 : }
32 81 : return NDR_ERR_SUCCESS;
33 : }
34 :
35 0 : static enum ndr_err_code ndr_pull_PRINCIPAL(struct ndr_pull *ndr, int ndr_flags, struct PRINCIPAL *r)
36 : {
37 0 : uint32_t size_components_0 = 0;
38 : uint32_t cntr_components_0;
39 0 : TALLOC_CTX *_mem_save_components_0 = NULL;
40 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
41 0 : if (ndr_flags & NDR_SCALARS) {
42 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
43 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->name_type));
44 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->component_count));
45 : {
46 0 : uint32_t _flags_save_string = ndr->flags;
47 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_UTF8);
48 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->realm));
49 0 : ndr->flags = _flags_save_string;
50 : }
51 : {
52 0 : uint32_t _flags_save_string = ndr->flags;
53 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_UTF8);
54 0 : size_components_0 = r->component_count;
55 0 : NDR_PULL_ALLOC_N(ndr, r->components, size_components_0);
56 0 : _mem_save_components_0 = NDR_PULL_GET_MEM_CTX(ndr);
57 0 : NDR_PULL_SET_MEM_CTX(ndr, r->components, 0);
58 0 : for (cntr_components_0 = 0; cntr_components_0 < (size_components_0); cntr_components_0++) {
59 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->components[cntr_components_0]));
60 : }
61 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_components_0, 0);
62 0 : ndr->flags = _flags_save_string;
63 : }
64 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
65 : }
66 0 : if (ndr_flags & NDR_BUFFERS) {
67 : }
68 0 : return NDR_ERR_SUCCESS;
69 : }
70 :
71 0 : _PUBLIC_ void ndr_print_PRINCIPAL(struct ndr_print *ndr, const char *name, const struct PRINCIPAL *r)
72 : {
73 : uint32_t cntr_components_0;
74 0 : ndr_print_struct(ndr, name, "PRINCIPAL");
75 0 : if (r == NULL) { ndr_print_null(ndr); return; }
76 0 : ndr->depth++;
77 0 : ndr_print_uint32(ndr, "name_type", r->name_type);
78 0 : ndr_print_uint32(ndr, "component_count", r->component_count);
79 : {
80 0 : uint32_t _flags_save_string = ndr->flags;
81 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_UTF8);
82 0 : ndr_print_string(ndr, "realm", r->realm);
83 0 : ndr->flags = _flags_save_string;
84 : }
85 : {
86 0 : uint32_t _flags_save_string = ndr->flags;
87 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_UTF8);
88 0 : ndr->print(ndr, "%s: ARRAY(%d)", "components", (int)r->component_count);
89 0 : ndr->depth++;
90 0 : for (cntr_components_0 = 0; cntr_components_0 < (r->component_count); cntr_components_0++) {
91 0 : ndr_print_string(ndr, "components", r->components[cntr_components_0]);
92 : }
93 0 : ndr->depth--;
94 0 : ndr->flags = _flags_save_string;
95 : }
96 0 : ndr->depth--;
97 : }
98 :
99 27 : static enum ndr_err_code ndr_push_KEYBLOCK(struct ndr_push *ndr, int ndr_flags, const struct KEYBLOCK *r)
100 : {
101 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
102 27 : if (ndr_flags & NDR_SCALARS) {
103 27 : NDR_CHECK(ndr_push_align(ndr, 4));
104 27 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->enctype));
105 27 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
106 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
107 : }
108 27 : if (ndr_flags & NDR_BUFFERS) {
109 : }
110 27 : return NDR_ERR_SUCCESS;
111 : }
112 :
113 0 : static enum ndr_err_code ndr_pull_KEYBLOCK(struct ndr_pull *ndr, int ndr_flags, struct KEYBLOCK *r)
114 : {
115 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
116 0 : if (ndr_flags & NDR_SCALARS) {
117 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
118 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->enctype));
119 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
120 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
121 : }
122 0 : if (ndr_flags & NDR_BUFFERS) {
123 : }
124 0 : return NDR_ERR_SUCCESS;
125 : }
126 :
127 0 : _PUBLIC_ void ndr_print_KEYBLOCK(struct ndr_print *ndr, const char *name, const struct KEYBLOCK *r)
128 : {
129 0 : ndr_print_struct(ndr, name, "KEYBLOCK");
130 0 : if (r == NULL) { ndr_print_null(ndr); return; }
131 0 : ndr->depth++;
132 0 : ndr_print_uint16(ndr, "enctype", r->enctype);
133 0 : ndr_print_DATA_BLOB(ndr, "data", r->data);
134 0 : ndr->depth--;
135 : }
136 :
137 0 : static enum ndr_err_code ndr_push_ADDRESS(struct ndr_push *ndr, int ndr_flags, const struct ADDRESS *r)
138 : {
139 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
140 0 : if (ndr_flags & NDR_SCALARS) {
141 0 : NDR_CHECK(ndr_push_align(ndr, 4));
142 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->addrtype));
143 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
144 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
145 : }
146 0 : if (ndr_flags & NDR_BUFFERS) {
147 : }
148 0 : return NDR_ERR_SUCCESS;
149 : }
150 :
151 0 : static enum ndr_err_code ndr_pull_ADDRESS(struct ndr_pull *ndr, int ndr_flags, struct ADDRESS *r)
152 : {
153 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
154 0 : if (ndr_flags & NDR_SCALARS) {
155 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
156 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->addrtype));
157 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
158 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
159 : }
160 0 : if (ndr_flags & NDR_BUFFERS) {
161 : }
162 0 : return NDR_ERR_SUCCESS;
163 : }
164 :
165 0 : _PUBLIC_ void ndr_print_ADDRESS(struct ndr_print *ndr, const char *name, const struct ADDRESS *r)
166 : {
167 0 : ndr_print_struct(ndr, name, "ADDRESS");
168 0 : if (r == NULL) { ndr_print_null(ndr); return; }
169 0 : ndr->depth++;
170 0 : ndr_print_uint16(ndr, "addrtype", r->addrtype);
171 0 : ndr_print_DATA_BLOB(ndr, "data", r->data);
172 0 : ndr->depth--;
173 : }
174 :
175 27 : static enum ndr_err_code ndr_push_ADDRESSES(struct ndr_push *ndr, int ndr_flags, const struct ADDRESSES *r)
176 : {
177 : uint32_t cntr_data_0;
178 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
179 27 : if (ndr_flags & NDR_SCALARS) {
180 27 : NDR_CHECK(ndr_push_align(ndr, 4));
181 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
182 27 : for (cntr_data_0 = 0; cntr_data_0 < (r->count); cntr_data_0++) {
183 0 : NDR_CHECK(ndr_push_ADDRESS(ndr, NDR_SCALARS, &r->data[cntr_data_0]));
184 : }
185 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
186 : }
187 27 : if (ndr_flags & NDR_BUFFERS) {
188 : }
189 27 : return NDR_ERR_SUCCESS;
190 : }
191 :
192 0 : static enum ndr_err_code ndr_pull_ADDRESSES(struct ndr_pull *ndr, int ndr_flags, struct ADDRESSES *r)
193 : {
194 0 : uint32_t size_data_0 = 0;
195 : uint32_t cntr_data_0;
196 0 : TALLOC_CTX *_mem_save_data_0 = NULL;
197 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
198 0 : if (ndr_flags & NDR_SCALARS) {
199 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
200 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
201 0 : size_data_0 = r->count;
202 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_0);
203 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
204 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
205 0 : for (cntr_data_0 = 0; cntr_data_0 < (size_data_0); cntr_data_0++) {
206 0 : NDR_CHECK(ndr_pull_ADDRESS(ndr, NDR_SCALARS, &r->data[cntr_data_0]));
207 : }
208 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
209 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
210 : }
211 0 : if (ndr_flags & NDR_BUFFERS) {
212 : }
213 0 : return NDR_ERR_SUCCESS;
214 : }
215 :
216 0 : _PUBLIC_ void ndr_print_ADDRESSES(struct ndr_print *ndr, const char *name, const struct ADDRESSES *r)
217 : {
218 : uint32_t cntr_data_0;
219 0 : ndr_print_struct(ndr, name, "ADDRESSES");
220 0 : if (r == NULL) { ndr_print_null(ndr); return; }
221 0 : ndr->depth++;
222 0 : ndr_print_uint32(ndr, "count", r->count);
223 0 : ndr->print(ndr, "%s: ARRAY(%d)", "data", (int)r->count);
224 0 : ndr->depth++;
225 0 : for (cntr_data_0 = 0; cntr_data_0 < (r->count); cntr_data_0++) {
226 0 : ndr_print_ADDRESS(ndr, "data", &r->data[cntr_data_0]);
227 : }
228 0 : ndr->depth--;
229 0 : ndr->depth--;
230 : }
231 :
232 0 : static enum ndr_err_code ndr_push_AUTHDATUM(struct ndr_push *ndr, int ndr_flags, const struct AUTHDATUM *r)
233 : {
234 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
235 0 : if (ndr_flags & NDR_SCALARS) {
236 0 : NDR_CHECK(ndr_push_align(ndr, 4));
237 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ad_type));
238 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
239 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
240 : }
241 0 : if (ndr_flags & NDR_BUFFERS) {
242 : }
243 0 : return NDR_ERR_SUCCESS;
244 : }
245 :
246 0 : static enum ndr_err_code ndr_pull_AUTHDATUM(struct ndr_pull *ndr, int ndr_flags, struct AUTHDATUM *r)
247 : {
248 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
249 0 : if (ndr_flags & NDR_SCALARS) {
250 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
251 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ad_type));
252 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
253 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
254 : }
255 0 : if (ndr_flags & NDR_BUFFERS) {
256 : }
257 0 : return NDR_ERR_SUCCESS;
258 : }
259 :
260 0 : _PUBLIC_ void ndr_print_AUTHDATUM(struct ndr_print *ndr, const char *name, const struct AUTHDATUM *r)
261 : {
262 0 : ndr_print_struct(ndr, name, "AUTHDATUM");
263 0 : if (r == NULL) { ndr_print_null(ndr); return; }
264 0 : ndr->depth++;
265 0 : ndr_print_uint16(ndr, "ad_type", r->ad_type);
266 0 : ndr_print_DATA_BLOB(ndr, "data", r->data);
267 0 : ndr->depth--;
268 : }
269 :
270 27 : static enum ndr_err_code ndr_push_AUTHDATA(struct ndr_push *ndr, int ndr_flags, const struct AUTHDATA *r)
271 : {
272 : uint32_t cntr_data_0;
273 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
274 27 : if (ndr_flags & NDR_SCALARS) {
275 27 : NDR_CHECK(ndr_push_align(ndr, 4));
276 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
277 27 : for (cntr_data_0 = 0; cntr_data_0 < (r->count); cntr_data_0++) {
278 0 : NDR_CHECK(ndr_push_AUTHDATUM(ndr, NDR_SCALARS, &r->data[cntr_data_0]));
279 : }
280 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
281 : }
282 27 : if (ndr_flags & NDR_BUFFERS) {
283 : }
284 27 : return NDR_ERR_SUCCESS;
285 : }
286 :
287 0 : static enum ndr_err_code ndr_pull_AUTHDATA(struct ndr_pull *ndr, int ndr_flags, struct AUTHDATA *r)
288 : {
289 0 : uint32_t size_data_0 = 0;
290 : uint32_t cntr_data_0;
291 0 : TALLOC_CTX *_mem_save_data_0 = NULL;
292 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
293 0 : if (ndr_flags & NDR_SCALARS) {
294 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
295 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
296 0 : size_data_0 = r->count;
297 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_0);
298 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
299 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
300 0 : for (cntr_data_0 = 0; cntr_data_0 < (size_data_0); cntr_data_0++) {
301 0 : NDR_CHECK(ndr_pull_AUTHDATUM(ndr, NDR_SCALARS, &r->data[cntr_data_0]));
302 : }
303 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
304 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
305 : }
306 0 : if (ndr_flags & NDR_BUFFERS) {
307 : }
308 0 : return NDR_ERR_SUCCESS;
309 : }
310 :
311 0 : _PUBLIC_ void ndr_print_AUTHDATA(struct ndr_print *ndr, const char *name, const struct AUTHDATA *r)
312 : {
313 : uint32_t cntr_data_0;
314 0 : ndr_print_struct(ndr, name, "AUTHDATA");
315 0 : if (r == NULL) { ndr_print_null(ndr); return; }
316 0 : ndr->depth++;
317 0 : ndr_print_uint32(ndr, "count", r->count);
318 0 : ndr->print(ndr, "%s: ARRAY(%d)", "data", (int)r->count);
319 0 : ndr->depth++;
320 0 : for (cntr_data_0 = 0; cntr_data_0 < (r->count); cntr_data_0++) {
321 0 : ndr_print_AUTHDATUM(ndr, "data", &r->data[cntr_data_0]);
322 : }
323 0 : ndr->depth--;
324 0 : ndr->depth--;
325 : }
326 :
327 27 : static enum ndr_err_code ndr_push_CREDENTIAL(struct ndr_push *ndr, int ndr_flags, const struct CREDENTIAL *r)
328 : {
329 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
330 27 : if (ndr_flags & NDR_SCALARS) {
331 27 : NDR_CHECK(ndr_push_align(ndr, 4));
332 27 : NDR_CHECK(ndr_push_PRINCIPAL(ndr, NDR_SCALARS, &r->client));
333 27 : NDR_CHECK(ndr_push_PRINCIPAL(ndr, NDR_SCALARS, &r->server));
334 27 : NDR_CHECK(ndr_push_KEYBLOCK(ndr, NDR_SCALARS, &r->keyblock));
335 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->authtime));
336 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->starttime));
337 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->endtime));
338 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->renew_till));
339 27 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->is_skey));
340 27 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ticket_flags));
341 27 : NDR_CHECK(ndr_push_ADDRESSES(ndr, NDR_SCALARS, &r->addresses));
342 27 : NDR_CHECK(ndr_push_AUTHDATA(ndr, NDR_SCALARS, &r->authdata));
343 27 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->ticket));
344 27 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->second_ticket));
345 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
346 : }
347 27 : if (ndr_flags & NDR_BUFFERS) {
348 : }
349 27 : return NDR_ERR_SUCCESS;
350 : }
351 :
352 0 : static enum ndr_err_code ndr_pull_CREDENTIAL(struct ndr_pull *ndr, int ndr_flags, struct CREDENTIAL *r)
353 : {
354 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
355 0 : if (ndr_flags & NDR_SCALARS) {
356 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
357 0 : NDR_CHECK(ndr_pull_PRINCIPAL(ndr, NDR_SCALARS, &r->client));
358 0 : NDR_CHECK(ndr_pull_PRINCIPAL(ndr, NDR_SCALARS, &r->server));
359 0 : NDR_CHECK(ndr_pull_KEYBLOCK(ndr, NDR_SCALARS, &r->keyblock));
360 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->authtime));
361 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->starttime));
362 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->endtime));
363 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->renew_till));
364 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->is_skey));
365 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ticket_flags));
366 0 : NDR_CHECK(ndr_pull_ADDRESSES(ndr, NDR_SCALARS, &r->addresses));
367 0 : NDR_CHECK(ndr_pull_AUTHDATA(ndr, NDR_SCALARS, &r->authdata));
368 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->ticket));
369 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->second_ticket));
370 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
371 : }
372 0 : if (ndr_flags & NDR_BUFFERS) {
373 : }
374 0 : return NDR_ERR_SUCCESS;
375 : }
376 :
377 0 : _PUBLIC_ void ndr_print_CREDENTIAL(struct ndr_print *ndr, const char *name, const struct CREDENTIAL *r)
378 : {
379 0 : ndr_print_struct(ndr, name, "CREDENTIAL");
380 0 : if (r == NULL) { ndr_print_null(ndr); return; }
381 0 : ndr->depth++;
382 0 : ndr_print_PRINCIPAL(ndr, "client", &r->client);
383 0 : ndr_print_PRINCIPAL(ndr, "server", &r->server);
384 0 : ndr_print_KEYBLOCK(ndr, "keyblock", &r->keyblock);
385 0 : ndr_print_uint32(ndr, "authtime", r->authtime);
386 0 : ndr_print_uint32(ndr, "starttime", r->starttime);
387 0 : ndr_print_uint32(ndr, "endtime", r->endtime);
388 0 : ndr_print_uint32(ndr, "renew_till", r->renew_till);
389 0 : ndr_print_uint8(ndr, "is_skey", r->is_skey);
390 0 : ndr_print_uint32(ndr, "ticket_flags", r->ticket_flags);
391 0 : ndr_print_ADDRESSES(ndr, "addresses", &r->addresses);
392 0 : ndr_print_AUTHDATA(ndr, "authdata", &r->authdata);
393 0 : ndr_print_DATA_BLOB(ndr, "ticket", r->ticket);
394 0 : ndr_print_DATA_BLOB(ndr, "second_ticket", r->second_ticket);
395 0 : ndr->depth--;
396 : }
397 :
398 27 : static enum ndr_err_code ndr_push_DELTATIME_TAG(struct ndr_push *ndr, int ndr_flags, const struct DELTATIME_TAG *r)
399 : {
400 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
401 27 : if (ndr_flags & NDR_SCALARS) {
402 27 : NDR_CHECK(ndr_push_align(ndr, 4));
403 27 : NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, 0));
404 27 : NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, 0));
405 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
406 : }
407 27 : if (ndr_flags & NDR_BUFFERS) {
408 : }
409 27 : return NDR_ERR_SUCCESS;
410 : }
411 :
412 0 : static enum ndr_err_code ndr_pull_DELTATIME_TAG(struct ndr_pull *ndr, int ndr_flags, struct DELTATIME_TAG *r)
413 : {
414 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
415 0 : if (ndr_flags & NDR_SCALARS) {
416 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
417 0 : NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->kdc_sec_offset));
418 0 : NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->kdc_usec_offset));
419 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
420 : }
421 0 : if (ndr_flags & NDR_BUFFERS) {
422 : }
423 0 : return NDR_ERR_SUCCESS;
424 : }
425 :
426 0 : _PUBLIC_ void ndr_print_DELTATIME_TAG(struct ndr_print *ndr, const char *name, const struct DELTATIME_TAG *r)
427 : {
428 0 : ndr_print_struct(ndr, name, "DELTATIME_TAG");
429 0 : if (r == NULL) { ndr_print_null(ndr); return; }
430 0 : ndr->depth++;
431 0 : ndr_print_int32(ndr, "kdc_sec_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->kdc_sec_offset);
432 0 : ndr_print_int32(ndr, "kdc_usec_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->kdc_usec_offset);
433 0 : ndr->depth--;
434 : }
435 :
436 27 : static enum ndr_err_code ndr_push_FIELD(struct ndr_push *ndr, int ndr_flags, const union FIELD *r)
437 : {
438 : uint32_t level;
439 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
440 27 : if (ndr_flags & NDR_SCALARS) {
441 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
442 27 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
443 27 : NDR_CHECK(ndr_push_union_align(ndr, 4));
444 27 : switch (level) {
445 27 : case 1: {
446 27 : NDR_CHECK(ndr_push_DELTATIME_TAG(ndr, NDR_SCALARS, &r->deltatime_tag));
447 27 : break; }
448 :
449 0 : default:
450 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
451 : }
452 0 : }
453 27 : if (ndr_flags & NDR_BUFFERS) {
454 0 : if (!(ndr_flags & NDR_SCALARS)) {
455 : /* We didn't get it above, and the token is not needed after this. */
456 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
457 : }
458 0 : switch (level) {
459 0 : case 1:
460 0 : break;
461 :
462 0 : default:
463 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
464 : }
465 18 : }
466 27 : return NDR_ERR_SUCCESS;
467 : }
468 :
469 0 : static enum ndr_err_code ndr_pull_FIELD(struct ndr_pull *ndr, int ndr_flags, union FIELD *r)
470 : {
471 : uint32_t level;
472 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
473 0 : if (ndr_flags & NDR_SCALARS) {
474 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
475 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
476 0 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
477 0 : switch (level) {
478 0 : case 1: {
479 0 : NDR_CHECK(ndr_pull_DELTATIME_TAG(ndr, NDR_SCALARS, &r->deltatime_tag));
480 0 : break; }
481 :
482 0 : default:
483 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
484 : }
485 0 : }
486 0 : if (ndr_flags & NDR_BUFFERS) {
487 0 : if (!(ndr_flags & NDR_SCALARS)) {
488 : /* We didn't get it above, and the token is not needed after this. */
489 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
490 : }
491 0 : switch (level) {
492 0 : case 1:
493 0 : break;
494 :
495 0 : default:
496 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
497 : }
498 0 : }
499 0 : return NDR_ERR_SUCCESS;
500 : }
501 :
502 0 : _PUBLIC_ void ndr_print_FIELD(struct ndr_print *ndr, const char *name, const union FIELD *r)
503 : {
504 : uint32_t level;
505 0 : level = ndr_print_steal_switch_value(ndr, r);
506 0 : ndr_print_union(ndr, name, level, "FIELD");
507 0 : switch (level) {
508 0 : case 1:
509 0 : ndr_print_DELTATIME_TAG(ndr, "deltatime_tag", &r->deltatime_tag);
510 0 : break;
511 :
512 0 : default:
513 0 : ndr_print_bad_level(ndr, name, level);
514 : }
515 0 : }
516 :
517 27 : static enum ndr_err_code ndr_push_V4TAG(struct ndr_push *ndr, int ndr_flags, const struct V4TAG *r)
518 : {
519 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
520 27 : if (ndr_flags & NDR_SCALARS) {
521 27 : NDR_CHECK(ndr_push_align(ndr, 2));
522 27 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 1));
523 : {
524 : struct ndr_push *_ndr_field;
525 27 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_field, 2, -1));
526 27 : NDR_CHECK(ndr_push_set_switch_value(_ndr_field, &r->field, 1));
527 27 : NDR_CHECK(ndr_push_FIELD(_ndr_field, NDR_SCALARS, &r->field));
528 27 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_field, 2, -1));
529 : }
530 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
531 : }
532 27 : if (ndr_flags & NDR_BUFFERS) {
533 : }
534 27 : return NDR_ERR_SUCCESS;
535 : }
536 :
537 0 : static enum ndr_err_code ndr_pull_V4TAG(struct ndr_pull *ndr, int ndr_flags, struct V4TAG *r)
538 : {
539 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
540 0 : if (ndr_flags & NDR_SCALARS) {
541 0 : NDR_CHECK(ndr_pull_align(ndr, 2));
542 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->tag));
543 : {
544 : struct ndr_pull *_ndr_field;
545 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_field, 2, -1));
546 0 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_field, &r->field, r->tag));
547 0 : NDR_CHECK(ndr_pull_FIELD(_ndr_field, NDR_SCALARS, &r->field));
548 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_field, 2, -1));
549 : }
550 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
551 : }
552 0 : if (ndr_flags & NDR_BUFFERS) {
553 : }
554 0 : return NDR_ERR_SUCCESS;
555 : }
556 :
557 0 : _PUBLIC_ void ndr_print_V4TAG(struct ndr_print *ndr, const char *name, const struct V4TAG *r)
558 : {
559 0 : ndr_print_struct(ndr, name, "V4TAG");
560 0 : if (r == NULL) { ndr_print_null(ndr); return; }
561 0 : ndr->depth++;
562 0 : ndr_print_uint16(ndr, "tag", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->tag);
563 0 : ndr_print_set_switch_value(ndr, &r->field, r->tag);
564 0 : ndr_print_FIELD(ndr, "field", &r->field);
565 0 : ndr->depth--;
566 : }
567 :
568 27 : static enum ndr_err_code ndr_push_V4TAGS(struct ndr_push *ndr, int ndr_flags, const struct V4TAGS *r)
569 : {
570 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
571 27 : if (ndr_flags & NDR_SCALARS) {
572 27 : NDR_CHECK(ndr_push_align(ndr, 4));
573 27 : NDR_CHECK(ndr_push_V4TAG(ndr, NDR_SCALARS, &r->tag));
574 : {
575 27 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
576 27 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
577 27 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->further_tags));
578 27 : ndr->flags = _flags_save_DATA_BLOB;
579 : }
580 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
581 : }
582 27 : if (ndr_flags & NDR_BUFFERS) {
583 : }
584 27 : return NDR_ERR_SUCCESS;
585 : }
586 :
587 0 : static enum ndr_err_code ndr_pull_V4TAGS(struct ndr_pull *ndr, int ndr_flags, struct V4TAGS *r)
588 : {
589 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
590 0 : if (ndr_flags & NDR_SCALARS) {
591 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
592 0 : NDR_CHECK(ndr_pull_V4TAG(ndr, NDR_SCALARS, &r->tag));
593 : {
594 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
595 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
596 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->further_tags));
597 0 : ndr->flags = _flags_save_DATA_BLOB;
598 : }
599 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
600 : }
601 0 : if (ndr_flags & NDR_BUFFERS) {
602 : }
603 0 : return NDR_ERR_SUCCESS;
604 : }
605 :
606 0 : _PUBLIC_ void ndr_print_V4TAGS(struct ndr_print *ndr, const char *name, const struct V4TAGS *r)
607 : {
608 0 : ndr_print_struct(ndr, name, "V4TAGS");
609 0 : if (r == NULL) { ndr_print_null(ndr); return; }
610 0 : ndr->depth++;
611 0 : ndr_print_V4TAG(ndr, "tag", &r->tag);
612 : {
613 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
614 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
615 0 : ndr_print_DATA_BLOB(ndr, "further_tags", r->further_tags);
616 0 : ndr->flags = _flags_save_DATA_BLOB;
617 : }
618 0 : ndr->depth--;
619 : }
620 :
621 27 : static enum ndr_err_code ndr_push_V4HEADER(struct ndr_push *ndr, int ndr_flags, const struct V4HEADER *r)
622 : {
623 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
624 27 : if (ndr_flags & NDR_SCALARS) {
625 27 : NDR_CHECK(ndr_push_align(ndr, 1));
626 : {
627 : struct ndr_push *_ndr_v4tags;
628 27 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_v4tags, 2, -1));
629 27 : NDR_CHECK(ndr_push_V4TAGS(_ndr_v4tags, NDR_SCALARS, &r->v4tags));
630 27 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_v4tags, 2, -1));
631 : }
632 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
633 : }
634 27 : if (ndr_flags & NDR_BUFFERS) {
635 : }
636 27 : return NDR_ERR_SUCCESS;
637 : }
638 :
639 0 : static enum ndr_err_code ndr_pull_V4HEADER(struct ndr_pull *ndr, int ndr_flags, struct V4HEADER *r)
640 : {
641 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
642 0 : if (ndr_flags & NDR_SCALARS) {
643 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
644 : {
645 : struct ndr_pull *_ndr_v4tags;
646 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_v4tags, 2, -1));
647 0 : NDR_CHECK(ndr_pull_V4TAGS(_ndr_v4tags, NDR_SCALARS, &r->v4tags));
648 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_v4tags, 2, -1));
649 : }
650 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
651 : }
652 0 : if (ndr_flags & NDR_BUFFERS) {
653 : }
654 0 : return NDR_ERR_SUCCESS;
655 : }
656 :
657 0 : _PUBLIC_ void ndr_print_V4HEADER(struct ndr_print *ndr, const char *name, const struct V4HEADER *r)
658 : {
659 0 : ndr_print_struct(ndr, name, "V4HEADER");
660 0 : if (r == NULL) { ndr_print_null(ndr); return; }
661 0 : ndr->depth++;
662 0 : ndr_print_V4TAGS(ndr, "v4tags", &r->v4tags);
663 0 : ndr->depth--;
664 : }
665 :
666 54 : static enum ndr_err_code ndr_push_OPTIONAL_HEADER(struct ndr_push *ndr, int ndr_flags, const union OPTIONAL_HEADER *r)
667 : {
668 : uint32_t level;
669 54 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
670 54 : if (ndr_flags & NDR_SCALARS) {
671 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
672 27 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
673 27 : NDR_CHECK(ndr_push_union_align(ndr, 1));
674 27 : switch (level) {
675 0 : case 3: {
676 0 : break; }
677 :
678 27 : case 4: {
679 27 : NDR_CHECK(ndr_push_V4HEADER(ndr, NDR_SCALARS, &r->v4header));
680 27 : break; }
681 :
682 0 : default:
683 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
684 : }
685 18 : }
686 54 : if (ndr_flags & NDR_BUFFERS) {
687 27 : if (!(ndr_flags & NDR_SCALARS)) {
688 : /* We didn't get it above, and the token is not needed after this. */
689 27 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
690 : }
691 27 : switch (level) {
692 0 : case 3:
693 0 : break;
694 :
695 27 : case 4:
696 27 : break;
697 :
698 0 : default:
699 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
700 : }
701 18 : }
702 54 : return NDR_ERR_SUCCESS;
703 : }
704 :
705 0 : static enum ndr_err_code ndr_pull_OPTIONAL_HEADER(struct ndr_pull *ndr, int ndr_flags, union OPTIONAL_HEADER *r)
706 : {
707 : uint32_t level;
708 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
709 0 : if (ndr_flags & NDR_SCALARS) {
710 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
711 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
712 0 : NDR_CHECK(ndr_pull_union_align(ndr, 1));
713 0 : switch (level) {
714 0 : case 3: {
715 0 : break; }
716 :
717 0 : case 4: {
718 0 : NDR_CHECK(ndr_pull_V4HEADER(ndr, NDR_SCALARS, &r->v4header));
719 0 : break; }
720 :
721 0 : default:
722 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
723 : }
724 0 : }
725 0 : if (ndr_flags & NDR_BUFFERS) {
726 0 : if (!(ndr_flags & NDR_SCALARS)) {
727 : /* We didn't get it above, and the token is not needed after this. */
728 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
729 : }
730 0 : switch (level) {
731 0 : case 3:
732 0 : break;
733 :
734 0 : case 4:
735 0 : break;
736 :
737 0 : default:
738 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
739 : }
740 0 : }
741 0 : return NDR_ERR_SUCCESS;
742 : }
743 :
744 0 : _PUBLIC_ void ndr_print_OPTIONAL_HEADER(struct ndr_print *ndr, const char *name, const union OPTIONAL_HEADER *r)
745 : {
746 : uint32_t level;
747 0 : level = ndr_print_steal_switch_value(ndr, r);
748 0 : ndr_print_union(ndr, name, level, "OPTIONAL_HEADER");
749 0 : switch (level) {
750 0 : case 3:
751 0 : break;
752 :
753 0 : case 4:
754 0 : ndr_print_V4HEADER(ndr, "v4header", &r->v4header);
755 0 : break;
756 :
757 0 : default:
758 0 : ndr_print_bad_level(ndr, name, level);
759 : }
760 0 : }
761 :
762 27 : _PUBLIC_ enum ndr_err_code ndr_push_CCACHE(struct ndr_push *ndr, int ndr_flags, const struct CCACHE *r)
763 : {
764 : {
765 27 : uint32_t _flags_save_STRUCT = ndr->flags;
766 27 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
767 27 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
768 27 : if (ndr_flags & NDR_SCALARS) {
769 27 : NDR_CHECK(ndr_push_align(ndr, 4));
770 27 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 5));
771 27 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 4));
772 27 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->optional_header, 4));
773 27 : NDR_CHECK(ndr_push_OPTIONAL_HEADER(ndr, NDR_SCALARS, &r->optional_header));
774 27 : NDR_CHECK(ndr_push_PRINCIPAL(ndr, NDR_SCALARS, &r->principal));
775 27 : NDR_CHECK(ndr_push_CREDENTIAL(ndr, NDR_SCALARS, &r->cred));
776 : {
777 27 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
778 27 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
779 27 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->further_creds));
780 27 : ndr->flags = _flags_save_DATA_BLOB;
781 : }
782 27 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
783 : }
784 27 : if (ndr_flags & NDR_BUFFERS) {
785 27 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->optional_header, 4));
786 27 : NDR_CHECK(ndr_push_OPTIONAL_HEADER(ndr, NDR_BUFFERS, &r->optional_header));
787 : }
788 27 : ndr->flags = _flags_save_STRUCT;
789 : }
790 27 : return NDR_ERR_SUCCESS;
791 : }
792 :
793 0 : _PUBLIC_ enum ndr_err_code ndr_pull_CCACHE(struct ndr_pull *ndr, int ndr_flags, struct CCACHE *r)
794 : {
795 : {
796 0 : uint32_t _flags_save_STRUCT = ndr->flags;
797 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
798 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
799 0 : if (ndr_flags & NDR_SCALARS) {
800 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
801 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pvno));
802 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->version));
803 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->optional_header, r->version));
804 0 : NDR_CHECK(ndr_pull_OPTIONAL_HEADER(ndr, NDR_SCALARS, &r->optional_header));
805 0 : NDR_CHECK(ndr_pull_PRINCIPAL(ndr, NDR_SCALARS, &r->principal));
806 0 : NDR_CHECK(ndr_pull_CREDENTIAL(ndr, NDR_SCALARS, &r->cred));
807 : {
808 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
809 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
810 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->further_creds));
811 0 : ndr->flags = _flags_save_DATA_BLOB;
812 : }
813 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
814 : }
815 0 : if (ndr_flags & NDR_BUFFERS) {
816 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->optional_header, r->version));
817 0 : NDR_CHECK(ndr_pull_OPTIONAL_HEADER(ndr, NDR_BUFFERS, &r->optional_header));
818 : }
819 0 : ndr->flags = _flags_save_STRUCT;
820 : }
821 0 : return NDR_ERR_SUCCESS;
822 : }
823 :
824 0 : static void ndr_print_flags_CCACHE(struct ndr_print *ndr, const char *name, int unused, const struct CCACHE *r)
825 : {
826 0 : ndr_print_CCACHE(ndr, name, r);
827 0 : }
828 :
829 0 : _PUBLIC_ void ndr_print_CCACHE(struct ndr_print *ndr, const char *name, const struct CCACHE *r)
830 : {
831 0 : ndr_print_struct(ndr, name, "CCACHE");
832 0 : if (r == NULL) { ndr_print_null(ndr); return; }
833 : {
834 0 : uint32_t _flags_save_STRUCT = ndr->flags;
835 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
836 0 : ndr->depth++;
837 0 : ndr_print_uint8(ndr, "pvno", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?5:r->pvno);
838 0 : ndr_print_uint8(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->version);
839 0 : ndr_print_set_switch_value(ndr, &r->optional_header, r->version);
840 0 : ndr_print_OPTIONAL_HEADER(ndr, "optional_header", &r->optional_header);
841 0 : ndr_print_PRINCIPAL(ndr, "principal", &r->principal);
842 0 : ndr_print_CREDENTIAL(ndr, "cred", &r->cred);
843 : {
844 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
845 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
846 0 : ndr_print_DATA_BLOB(ndr, "further_creds", r->further_creds);
847 0 : ndr->flags = _flags_save_DATA_BLOB;
848 : }
849 0 : ndr->depth--;
850 0 : ndr->flags = _flags_save_STRUCT;
851 : }
852 : }
853 :
854 0 : _PUBLIC_ enum ndr_err_code ndr_push_MULTIPLE_CREDENTIALS(struct ndr_push *ndr, int ndr_flags, const struct MULTIPLE_CREDENTIALS *r)
855 : {
856 : {
857 0 : uint32_t _flags_save_STRUCT = ndr->flags;
858 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
859 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
860 0 : if (ndr_flags & NDR_SCALARS) {
861 0 : NDR_CHECK(ndr_push_align(ndr, 4));
862 0 : NDR_CHECK(ndr_push_CREDENTIAL(ndr, NDR_SCALARS, &r->cred));
863 : {
864 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
865 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
866 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->further_creds));
867 0 : ndr->flags = _flags_save_DATA_BLOB;
868 : }
869 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
870 : }
871 0 : if (ndr_flags & NDR_BUFFERS) {
872 : }
873 0 : ndr->flags = _flags_save_STRUCT;
874 : }
875 0 : return NDR_ERR_SUCCESS;
876 : }
877 :
878 0 : _PUBLIC_ enum ndr_err_code ndr_pull_MULTIPLE_CREDENTIALS(struct ndr_pull *ndr, int ndr_flags, struct MULTIPLE_CREDENTIALS *r)
879 : {
880 : {
881 0 : uint32_t _flags_save_STRUCT = ndr->flags;
882 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
883 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
884 0 : if (ndr_flags & NDR_SCALARS) {
885 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
886 0 : NDR_CHECK(ndr_pull_CREDENTIAL(ndr, NDR_SCALARS, &r->cred));
887 : {
888 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
889 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
890 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->further_creds));
891 0 : ndr->flags = _flags_save_DATA_BLOB;
892 : }
893 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
894 : }
895 0 : if (ndr_flags & NDR_BUFFERS) {
896 : }
897 0 : ndr->flags = _flags_save_STRUCT;
898 : }
899 0 : return NDR_ERR_SUCCESS;
900 : }
901 :
902 0 : static void ndr_print_flags_MULTIPLE_CREDENTIALS(struct ndr_print *ndr, const char *name, int unused, const struct MULTIPLE_CREDENTIALS *r)
903 : {
904 0 : ndr_print_MULTIPLE_CREDENTIALS(ndr, name, r);
905 0 : }
906 :
907 0 : _PUBLIC_ void ndr_print_MULTIPLE_CREDENTIALS(struct ndr_print *ndr, const char *name, const struct MULTIPLE_CREDENTIALS *r)
908 : {
909 0 : ndr_print_struct(ndr, name, "MULTIPLE_CREDENTIALS");
910 0 : if (r == NULL) { ndr_print_null(ndr); return; }
911 : {
912 0 : uint32_t _flags_save_STRUCT = ndr->flags;
913 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
914 0 : ndr->depth++;
915 0 : ndr_print_CREDENTIAL(ndr, "cred", &r->cred);
916 : {
917 0 : uint32_t _flags_save_DATA_BLOB = ndr->flags;
918 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
919 0 : ndr_print_DATA_BLOB(ndr, "further_creds", r->further_creds);
920 0 : ndr->flags = _flags_save_DATA_BLOB;
921 : }
922 0 : ndr->depth--;
923 0 : ndr->flags = _flags_save_STRUCT;
924 : }
925 : }
926 :
927 : #ifndef SKIP_NDR_TABLE_krb5ccache
928 : static const struct ndr_interface_public_struct krb5ccache_public_structs[] = {
929 : {
930 : .name = "CCACHE",
931 : .struct_size = sizeof(struct CCACHE ),
932 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CCACHE,
933 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CCACHE,
934 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CCACHE,
935 : },
936 : {
937 : .name = "MULTIPLE_CREDENTIALS",
938 : .struct_size = sizeof(struct MULTIPLE_CREDENTIALS ),
939 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_MULTIPLE_CREDENTIALS,
940 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_MULTIPLE_CREDENTIALS,
941 : .ndr_print = (ndr_print_function_t) ndr_print_flags_MULTIPLE_CREDENTIALS,
942 : },
943 : { .name = NULL }
944 : };
945 :
946 : static const struct ndr_interface_call krb5ccache_calls[] = {
947 : { .name = NULL }
948 : };
949 :
950 : static const char * const krb5ccache_endpoint_strings[] = {
951 : "ncacn_np:[\\pipe\\krb5ccache]",
952 : };
953 :
954 : static const struct ndr_interface_string_array krb5ccache_endpoints = {
955 : .count = 1,
956 : .names = krb5ccache_endpoint_strings
957 : };
958 :
959 : static const char * const krb5ccache_authservice_strings[] = {
960 : "host",
961 : };
962 :
963 : static const struct ndr_interface_string_array krb5ccache_authservices = {
964 : .count = 1,
965 : .names = krb5ccache_authservice_strings
966 : };
967 :
968 :
969 : const struct ndr_interface_table ndr_table_krb5ccache = {
970 : .name = "krb5ccache",
971 : .syntax_id = {
972 : {0x1702b695,0x99ca,0x4f32,{0x93,0xe4},{0x1e,0x1c,0x4d,0x5d,0xdb,0x53}},
973 : NDR_KRB5CCACHE_VERSION
974 : },
975 : .helpstring = NDR_KRB5CCACHE_HELPSTRING,
976 : .num_calls = 0,
977 : .calls = krb5ccache_calls,
978 : .num_public_structs = 2,
979 : .public_structs = krb5ccache_public_structs,
980 : .endpoints = &krb5ccache_endpoints,
981 : .authservices = &krb5ccache_authservices
982 : };
983 :
984 : #endif /* SKIP_NDR_TABLE_krb5ccache */
|