s3:net: add a command "net registry setsd_sdd"
[Samba/ekacnet.git] / librpc / gen_ndr / ndr_dcerpc.c
blobdca445a872a2a2cddc7d2bfe0cb6e3ba12cf6249
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_dcerpc.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 static enum ndr_err_code ndr_push_dcerpc_ctx_list(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_ctx_list *r)
9 uint32_t cntr_transfer_syntaxes_0;
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 4));
12 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->context_id));
13 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_transfer_syntaxes));
14 NDR_CHECK(ndr_push_ndr_syntax_id(ndr, NDR_SCALARS, &r->abstract_syntax));
15 for (cntr_transfer_syntaxes_0 = 0; cntr_transfer_syntaxes_0 < r->num_transfer_syntaxes; cntr_transfer_syntaxes_0++) {
16 NDR_CHECK(ndr_push_ndr_syntax_id(ndr, NDR_SCALARS, &r->transfer_syntaxes[cntr_transfer_syntaxes_0]));
18 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
20 if (ndr_flags & NDR_BUFFERS) {
22 return NDR_ERR_SUCCESS;
25 static enum ndr_err_code ndr_pull_dcerpc_ctx_list(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_ctx_list *r)
27 uint32_t cntr_transfer_syntaxes_0;
28 TALLOC_CTX *_mem_save_transfer_syntaxes_0;
29 if (ndr_flags & NDR_SCALARS) {
30 NDR_CHECK(ndr_pull_align(ndr, 4));
31 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->context_id));
32 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_transfer_syntaxes));
33 NDR_CHECK(ndr_pull_ndr_syntax_id(ndr, NDR_SCALARS, &r->abstract_syntax));
34 NDR_PULL_ALLOC_N(ndr, r->transfer_syntaxes, r->num_transfer_syntaxes);
35 _mem_save_transfer_syntaxes_0 = NDR_PULL_GET_MEM_CTX(ndr);
36 NDR_PULL_SET_MEM_CTX(ndr, r->transfer_syntaxes, 0);
37 for (cntr_transfer_syntaxes_0 = 0; cntr_transfer_syntaxes_0 < r->num_transfer_syntaxes; cntr_transfer_syntaxes_0++) {
38 NDR_CHECK(ndr_pull_ndr_syntax_id(ndr, NDR_SCALARS, &r->transfer_syntaxes[cntr_transfer_syntaxes_0]));
40 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transfer_syntaxes_0, 0);
41 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
43 if (ndr_flags & NDR_BUFFERS) {
45 return NDR_ERR_SUCCESS;
48 _PUBLIC_ void ndr_print_dcerpc_ctx_list(struct ndr_print *ndr, const char *name, const struct dcerpc_ctx_list *r)
50 uint32_t cntr_transfer_syntaxes_0;
51 ndr_print_struct(ndr, name, "dcerpc_ctx_list");
52 ndr->depth++;
53 ndr_print_uint16(ndr, "context_id", r->context_id);
54 ndr_print_uint8(ndr, "num_transfer_syntaxes", r->num_transfer_syntaxes);
55 ndr_print_ndr_syntax_id(ndr, "abstract_syntax", &r->abstract_syntax);
56 ndr->print(ndr, "%s: ARRAY(%d)", "transfer_syntaxes", (int)r->num_transfer_syntaxes);
57 ndr->depth++;
58 for (cntr_transfer_syntaxes_0=0;cntr_transfer_syntaxes_0<r->num_transfer_syntaxes;cntr_transfer_syntaxes_0++) {
59 char *idx_0=NULL;
60 if (asprintf(&idx_0, "[%d]", cntr_transfer_syntaxes_0) != -1) {
61 ndr_print_ndr_syntax_id(ndr, "transfer_syntaxes", &r->transfer_syntaxes[cntr_transfer_syntaxes_0]);
62 free(idx_0);
65 ndr->depth--;
66 ndr->depth--;
69 static enum ndr_err_code ndr_push_dcerpc_bind(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_bind *r)
71 uint32_t cntr_ctx_list_0;
72 if (ndr_flags & NDR_SCALARS) {
73 NDR_CHECK(ndr_push_align(ndr, 4));
74 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_xmit_frag));
75 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_recv_frag));
76 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->assoc_group_id));
77 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_contexts));
78 for (cntr_ctx_list_0 = 0; cntr_ctx_list_0 < r->num_contexts; cntr_ctx_list_0++) {
79 NDR_CHECK(ndr_push_dcerpc_ctx_list(ndr, NDR_SCALARS, &r->ctx_list[cntr_ctx_list_0]));
82 uint32_t _flags_save_DATA_BLOB = ndr->flags;
83 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
84 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info));
85 ndr->flags = _flags_save_DATA_BLOB;
87 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
89 if (ndr_flags & NDR_BUFFERS) {
91 return NDR_ERR_SUCCESS;
94 static enum ndr_err_code ndr_pull_dcerpc_bind(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_bind *r)
96 uint32_t cntr_ctx_list_0;
97 TALLOC_CTX *_mem_save_ctx_list_0;
98 if (ndr_flags & NDR_SCALARS) {
99 NDR_CHECK(ndr_pull_align(ndr, 4));
100 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_xmit_frag));
101 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_recv_frag));
102 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->assoc_group_id));
103 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_contexts));
104 NDR_PULL_ALLOC_N(ndr, r->ctx_list, r->num_contexts);
105 _mem_save_ctx_list_0 = NDR_PULL_GET_MEM_CTX(ndr);
106 NDR_PULL_SET_MEM_CTX(ndr, r->ctx_list, 0);
107 for (cntr_ctx_list_0 = 0; cntr_ctx_list_0 < r->num_contexts; cntr_ctx_list_0++) {
108 NDR_CHECK(ndr_pull_dcerpc_ctx_list(ndr, NDR_SCALARS, &r->ctx_list[cntr_ctx_list_0]));
110 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctx_list_0, 0);
112 uint32_t _flags_save_DATA_BLOB = ndr->flags;
113 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
114 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info));
115 ndr->flags = _flags_save_DATA_BLOB;
117 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
119 if (ndr_flags & NDR_BUFFERS) {
121 return NDR_ERR_SUCCESS;
124 _PUBLIC_ void ndr_print_dcerpc_bind(struct ndr_print *ndr, const char *name, const struct dcerpc_bind *r)
126 uint32_t cntr_ctx_list_0;
127 ndr_print_struct(ndr, name, "dcerpc_bind");
128 ndr->depth++;
129 ndr_print_uint16(ndr, "max_xmit_frag", r->max_xmit_frag);
130 ndr_print_uint16(ndr, "max_recv_frag", r->max_recv_frag);
131 ndr_print_uint32(ndr, "assoc_group_id", r->assoc_group_id);
132 ndr_print_uint8(ndr, "num_contexts", r->num_contexts);
133 ndr->print(ndr, "%s: ARRAY(%d)", "ctx_list", (int)r->num_contexts);
134 ndr->depth++;
135 for (cntr_ctx_list_0=0;cntr_ctx_list_0<r->num_contexts;cntr_ctx_list_0++) {
136 char *idx_0=NULL;
137 if (asprintf(&idx_0, "[%d]", cntr_ctx_list_0) != -1) {
138 ndr_print_dcerpc_ctx_list(ndr, "ctx_list", &r->ctx_list[cntr_ctx_list_0]);
139 free(idx_0);
142 ndr->depth--;
143 ndr_print_DATA_BLOB(ndr, "auth_info", r->auth_info);
144 ndr->depth--;
147 static enum ndr_err_code ndr_push_dcerpc_empty(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_empty *r)
149 if (ndr_flags & NDR_SCALARS) {
150 NDR_CHECK(ndr_push_align(ndr, 1));
151 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
153 if (ndr_flags & NDR_BUFFERS) {
155 return NDR_ERR_SUCCESS;
158 static enum ndr_err_code ndr_pull_dcerpc_empty(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_empty *r)
160 if (ndr_flags & NDR_SCALARS) {
161 NDR_CHECK(ndr_pull_align(ndr, 1));
162 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
164 if (ndr_flags & NDR_BUFFERS) {
166 return NDR_ERR_SUCCESS;
169 _PUBLIC_ void ndr_print_dcerpc_empty(struct ndr_print *ndr, const char *name, const struct dcerpc_empty *r)
171 ndr_print_struct(ndr, name, "dcerpc_empty");
172 ndr->depth++;
173 ndr->depth--;
176 static enum ndr_err_code ndr_push_dcerpc_object(struct ndr_push *ndr, int ndr_flags, const union dcerpc_object *r)
178 if (ndr_flags & NDR_SCALARS) {
179 int level = ndr_push_get_switch_value(ndr, r);
180 NDR_CHECK(ndr_push_union_align(ndr, 4));
181 switch (level) {
182 default: {
183 NDR_CHECK(ndr_push_dcerpc_empty(ndr, NDR_SCALARS, &r->empty));
184 break; }
186 case LIBNDR_FLAG_OBJECT_PRESENT: {
187 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
188 break; }
192 if (ndr_flags & NDR_BUFFERS) {
193 int level = ndr_push_get_switch_value(ndr, r);
194 switch (level) {
195 default:
196 break;
198 case LIBNDR_FLAG_OBJECT_PRESENT:
199 break;
203 return NDR_ERR_SUCCESS;
206 static enum ndr_err_code ndr_pull_dcerpc_object(struct ndr_pull *ndr, int ndr_flags, union dcerpc_object *r)
208 int level;
209 level = ndr_pull_get_switch_value(ndr, r);
210 if (ndr_flags & NDR_SCALARS) {
211 NDR_CHECK(ndr_pull_union_align(ndr, 4));
212 switch (level) {
213 default: {
214 NDR_CHECK(ndr_pull_dcerpc_empty(ndr, NDR_SCALARS, &r->empty));
215 break; }
217 case LIBNDR_FLAG_OBJECT_PRESENT: {
218 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->object));
219 break; }
223 if (ndr_flags & NDR_BUFFERS) {
224 switch (level) {
225 default:
226 break;
228 case LIBNDR_FLAG_OBJECT_PRESENT:
229 break;
233 return NDR_ERR_SUCCESS;
236 _PUBLIC_ void ndr_print_dcerpc_object(struct ndr_print *ndr, const char *name, const union dcerpc_object *r)
238 int level;
239 level = ndr_print_get_switch_value(ndr, r);
240 ndr_print_union(ndr, name, level, "dcerpc_object");
241 switch (level) {
242 default:
243 ndr_print_dcerpc_empty(ndr, "empty", &r->empty);
244 break;
246 case LIBNDR_FLAG_OBJECT_PRESENT:
247 ndr_print_GUID(ndr, "object", &r->object);
248 break;
253 static enum ndr_err_code ndr_push_dcerpc_request(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_request *r)
255 if (ndr_flags & NDR_SCALARS) {
256 NDR_CHECK(ndr_push_align(ndr, 4));
257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alloc_hint));
258 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->context_id));
259 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->opnum));
260 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, ndr->flags & LIBNDR_FLAG_OBJECT_PRESENT));
261 NDR_CHECK(ndr_push_dcerpc_object(ndr, NDR_SCALARS, &r->object));
263 uint32_t _flags_save_DATA_BLOB = ndr->flags;
264 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
265 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
266 ndr->flags = _flags_save_DATA_BLOB;
269 uint32_t _flags_save_DATA_BLOB = ndr->flags;
270 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
271 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->stub_and_verifier));
272 ndr->flags = _flags_save_DATA_BLOB;
274 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
276 if (ndr_flags & NDR_BUFFERS) {
278 return NDR_ERR_SUCCESS;
281 static enum ndr_err_code ndr_pull_dcerpc_request(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_request *r)
283 if (ndr_flags & NDR_SCALARS) {
284 NDR_CHECK(ndr_pull_align(ndr, 4));
285 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alloc_hint));
286 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->context_id));
287 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->opnum));
288 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, ndr->flags & LIBNDR_FLAG_OBJECT_PRESENT));
289 NDR_CHECK(ndr_pull_dcerpc_object(ndr, NDR_SCALARS, &r->object));
291 uint32_t _flags_save_DATA_BLOB = ndr->flags;
292 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
293 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
294 ndr->flags = _flags_save_DATA_BLOB;
297 uint32_t _flags_save_DATA_BLOB = ndr->flags;
298 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
299 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->stub_and_verifier));
300 ndr->flags = _flags_save_DATA_BLOB;
302 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
304 if (ndr_flags & NDR_BUFFERS) {
306 return NDR_ERR_SUCCESS;
309 _PUBLIC_ void ndr_print_dcerpc_request(struct ndr_print *ndr, const char *name, const struct dcerpc_request *r)
311 ndr_print_struct(ndr, name, "dcerpc_request");
312 ndr->depth++;
313 ndr_print_uint32(ndr, "alloc_hint", r->alloc_hint);
314 ndr_print_uint16(ndr, "context_id", r->context_id);
315 ndr_print_uint16(ndr, "opnum", r->opnum);
316 ndr_print_set_switch_value(ndr, &r->object, ndr->flags & LIBNDR_FLAG_OBJECT_PRESENT);
317 ndr_print_dcerpc_object(ndr, "object", &r->object);
318 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
319 ndr_print_DATA_BLOB(ndr, "stub_and_verifier", r->stub_and_verifier);
320 ndr->depth--;
323 static enum ndr_err_code ndr_push_dcerpc_ack_ctx(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_ack_ctx *r)
325 if (ndr_flags & NDR_SCALARS) {
326 NDR_CHECK(ndr_push_align(ndr, 4));
327 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->result));
328 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reason));
329 NDR_CHECK(ndr_push_ndr_syntax_id(ndr, NDR_SCALARS, &r->syntax));
330 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
332 if (ndr_flags & NDR_BUFFERS) {
334 return NDR_ERR_SUCCESS;
337 static enum ndr_err_code ndr_pull_dcerpc_ack_ctx(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_ack_ctx *r)
339 if (ndr_flags & NDR_SCALARS) {
340 NDR_CHECK(ndr_pull_align(ndr, 4));
341 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->result));
342 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reason));
343 NDR_CHECK(ndr_pull_ndr_syntax_id(ndr, NDR_SCALARS, &r->syntax));
344 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
346 if (ndr_flags & NDR_BUFFERS) {
348 return NDR_ERR_SUCCESS;
351 _PUBLIC_ void ndr_print_dcerpc_ack_ctx(struct ndr_print *ndr, const char *name, const struct dcerpc_ack_ctx *r)
353 ndr_print_struct(ndr, name, "dcerpc_ack_ctx");
354 ndr->depth++;
355 ndr_print_uint16(ndr, "result", r->result);
356 ndr_print_uint16(ndr, "reason", r->reason);
357 ndr_print_ndr_syntax_id(ndr, "syntax", &r->syntax);
358 ndr->depth--;
361 static enum ndr_err_code ndr_push_dcerpc_bind_ack(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_bind_ack *r)
363 uint32_t cntr_ctx_list_0;
364 if (ndr_flags & NDR_SCALARS) {
365 NDR_CHECK(ndr_push_align(ndr, 4));
366 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_xmit_frag));
367 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->max_recv_frag));
368 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->assoc_group_id));
369 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen(r->secondary_address) + 1));
370 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->secondary_address, strlen(r->secondary_address) + 1, sizeof(uint8_t), CH_DOS));
372 uint32_t _flags_save_DATA_BLOB = ndr->flags;
373 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
374 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad1));
375 ndr->flags = _flags_save_DATA_BLOB;
377 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->num_results));
378 for (cntr_ctx_list_0 = 0; cntr_ctx_list_0 < r->num_results; cntr_ctx_list_0++) {
379 NDR_CHECK(ndr_push_dcerpc_ack_ctx(ndr, NDR_SCALARS, &r->ctx_list[cntr_ctx_list_0]));
382 uint32_t _flags_save_DATA_BLOB = ndr->flags;
383 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
384 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info));
385 ndr->flags = _flags_save_DATA_BLOB;
387 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
389 if (ndr_flags & NDR_BUFFERS) {
391 return NDR_ERR_SUCCESS;
394 static enum ndr_err_code ndr_pull_dcerpc_bind_ack(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_bind_ack *r)
396 uint32_t cntr_ctx_list_0;
397 TALLOC_CTX *_mem_save_ctx_list_0;
398 if (ndr_flags & NDR_SCALARS) {
399 NDR_CHECK(ndr_pull_align(ndr, 4));
400 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_xmit_frag));
401 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->max_recv_frag));
402 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->assoc_group_id));
403 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->secondary_address_size));
404 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->secondary_address, r->secondary_address_size, sizeof(uint8_t), CH_DOS));
406 uint32_t _flags_save_DATA_BLOB = ndr->flags;
407 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
408 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad1));
409 ndr->flags = _flags_save_DATA_BLOB;
411 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_results));
412 NDR_PULL_ALLOC_N(ndr, r->ctx_list, r->num_results);
413 _mem_save_ctx_list_0 = NDR_PULL_GET_MEM_CTX(ndr);
414 NDR_PULL_SET_MEM_CTX(ndr, r->ctx_list, 0);
415 for (cntr_ctx_list_0 = 0; cntr_ctx_list_0 < r->num_results; cntr_ctx_list_0++) {
416 NDR_CHECK(ndr_pull_dcerpc_ack_ctx(ndr, NDR_SCALARS, &r->ctx_list[cntr_ctx_list_0]));
418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctx_list_0, 0);
420 uint32_t _flags_save_DATA_BLOB = ndr->flags;
421 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
422 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info));
423 ndr->flags = _flags_save_DATA_BLOB;
425 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
427 if (ndr_flags & NDR_BUFFERS) {
429 return NDR_ERR_SUCCESS;
432 _PUBLIC_ void ndr_print_dcerpc_bind_ack(struct ndr_print *ndr, const char *name, const struct dcerpc_bind_ack *r)
434 uint32_t cntr_ctx_list_0;
435 ndr_print_struct(ndr, name, "dcerpc_bind_ack");
436 ndr->depth++;
437 ndr_print_uint16(ndr, "max_xmit_frag", r->max_xmit_frag);
438 ndr_print_uint16(ndr, "max_recv_frag", r->max_recv_frag);
439 ndr_print_uint32(ndr, "assoc_group_id", r->assoc_group_id);
440 ndr_print_uint16(ndr, "secondary_address_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->secondary_address) + 1:r->secondary_address_size);
441 ndr_print_string(ndr, "secondary_address", r->secondary_address);
442 ndr_print_DATA_BLOB(ndr, "_pad1", r->_pad1);
443 ndr_print_uint8(ndr, "num_results", r->num_results);
444 ndr->print(ndr, "%s: ARRAY(%d)", "ctx_list", (int)r->num_results);
445 ndr->depth++;
446 for (cntr_ctx_list_0=0;cntr_ctx_list_0<r->num_results;cntr_ctx_list_0++) {
447 char *idx_0=NULL;
448 if (asprintf(&idx_0, "[%d]", cntr_ctx_list_0) != -1) {
449 ndr_print_dcerpc_ack_ctx(ndr, "ctx_list", &r->ctx_list[cntr_ctx_list_0]);
450 free(idx_0);
453 ndr->depth--;
454 ndr_print_DATA_BLOB(ndr, "auth_info", r->auth_info);
455 ndr->depth--;
458 static enum ndr_err_code ndr_push_dcerpc_bind_nak_versions(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_bind_nak_versions *r)
460 uint32_t cntr_versions_0;
461 if (ndr_flags & NDR_SCALARS) {
462 NDR_CHECK(ndr_push_align(ndr, 4));
463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_versions));
464 for (cntr_versions_0 = 0; cntr_versions_0 < r->num_versions; cntr_versions_0++) {
465 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->versions[cntr_versions_0]));
467 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
469 if (ndr_flags & NDR_BUFFERS) {
471 return NDR_ERR_SUCCESS;
474 static enum ndr_err_code ndr_pull_dcerpc_bind_nak_versions(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_bind_nak_versions *r)
476 uint32_t cntr_versions_0;
477 TALLOC_CTX *_mem_save_versions_0;
478 if (ndr_flags & NDR_SCALARS) {
479 NDR_CHECK(ndr_pull_align(ndr, 4));
480 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_versions));
481 NDR_PULL_ALLOC_N(ndr, r->versions, r->num_versions);
482 _mem_save_versions_0 = NDR_PULL_GET_MEM_CTX(ndr);
483 NDR_PULL_SET_MEM_CTX(ndr, r->versions, 0);
484 for (cntr_versions_0 = 0; cntr_versions_0 < r->num_versions; cntr_versions_0++) {
485 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->versions[cntr_versions_0]));
487 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_versions_0, 0);
488 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
490 if (ndr_flags & NDR_BUFFERS) {
492 return NDR_ERR_SUCCESS;
495 _PUBLIC_ void ndr_print_dcerpc_bind_nak_versions(struct ndr_print *ndr, const char *name, const struct dcerpc_bind_nak_versions *r)
497 uint32_t cntr_versions_0;
498 ndr_print_struct(ndr, name, "dcerpc_bind_nak_versions");
499 ndr->depth++;
500 ndr_print_uint32(ndr, "num_versions", r->num_versions);
501 ndr->print(ndr, "%s: ARRAY(%d)", "versions", (int)r->num_versions);
502 ndr->depth++;
503 for (cntr_versions_0=0;cntr_versions_0<r->num_versions;cntr_versions_0++) {
504 char *idx_0=NULL;
505 if (asprintf(&idx_0, "[%d]", cntr_versions_0) != -1) {
506 ndr_print_uint32(ndr, "versions", r->versions[cntr_versions_0]);
507 free(idx_0);
510 ndr->depth--;
511 ndr->depth--;
514 static enum ndr_err_code ndr_push_dcerpc_bind_nak_versions_ctr(struct ndr_push *ndr, int ndr_flags, const union dcerpc_bind_nak_versions_ctr *r)
516 if (ndr_flags & NDR_SCALARS) {
517 int level = ndr_push_get_switch_value(ndr, r);
518 NDR_CHECK(ndr_push_union_align(ndr, 4));
519 switch (level) {
520 case DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED: {
521 NDR_CHECK(ndr_push_dcerpc_bind_nak_versions(ndr, NDR_SCALARS, &r->v));
522 break; }
524 default: {
525 break; }
529 if (ndr_flags & NDR_BUFFERS) {
530 int level = ndr_push_get_switch_value(ndr, r);
531 switch (level) {
532 case DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED:
533 break;
535 default:
536 break;
540 return NDR_ERR_SUCCESS;
543 static enum ndr_err_code ndr_pull_dcerpc_bind_nak_versions_ctr(struct ndr_pull *ndr, int ndr_flags, union dcerpc_bind_nak_versions_ctr *r)
545 int level;
546 level = ndr_pull_get_switch_value(ndr, r);
547 if (ndr_flags & NDR_SCALARS) {
548 NDR_CHECK(ndr_pull_union_align(ndr, 4));
549 switch (level) {
550 case DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED: {
551 NDR_CHECK(ndr_pull_dcerpc_bind_nak_versions(ndr, NDR_SCALARS, &r->v));
552 break; }
554 default: {
555 break; }
559 if (ndr_flags & NDR_BUFFERS) {
560 switch (level) {
561 case DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED:
562 break;
564 default:
565 break;
569 return NDR_ERR_SUCCESS;
572 _PUBLIC_ void ndr_print_dcerpc_bind_nak_versions_ctr(struct ndr_print *ndr, const char *name, const union dcerpc_bind_nak_versions_ctr *r)
574 int level;
575 level = ndr_print_get_switch_value(ndr, r);
576 ndr_print_union(ndr, name, level, "dcerpc_bind_nak_versions_ctr");
577 switch (level) {
578 case DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED:
579 ndr_print_dcerpc_bind_nak_versions(ndr, "v", &r->v);
580 break;
582 default:
583 break;
588 static enum ndr_err_code ndr_push_dcerpc_bind_nak(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_bind_nak *r)
590 if (ndr_flags & NDR_SCALARS) {
591 NDR_CHECK(ndr_push_align(ndr, 4));
592 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reject_reason));
593 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->versions, r->reject_reason));
594 NDR_CHECK(ndr_push_dcerpc_bind_nak_versions_ctr(ndr, NDR_SCALARS, &r->versions));
595 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
597 if (ndr_flags & NDR_BUFFERS) {
598 NDR_CHECK(ndr_push_dcerpc_bind_nak_versions_ctr(ndr, NDR_BUFFERS, &r->versions));
600 return NDR_ERR_SUCCESS;
603 static enum ndr_err_code ndr_pull_dcerpc_bind_nak(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_bind_nak *r)
605 if (ndr_flags & NDR_SCALARS) {
606 NDR_CHECK(ndr_pull_align(ndr, 4));
607 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reject_reason));
608 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->versions, r->reject_reason));
609 NDR_CHECK(ndr_pull_dcerpc_bind_nak_versions_ctr(ndr, NDR_SCALARS, &r->versions));
610 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
612 if (ndr_flags & NDR_BUFFERS) {
613 NDR_CHECK(ndr_pull_dcerpc_bind_nak_versions_ctr(ndr, NDR_BUFFERS, &r->versions));
615 return NDR_ERR_SUCCESS;
618 _PUBLIC_ void ndr_print_dcerpc_bind_nak(struct ndr_print *ndr, const char *name, const struct dcerpc_bind_nak *r)
620 ndr_print_struct(ndr, name, "dcerpc_bind_nak");
621 ndr->depth++;
622 ndr_print_uint16(ndr, "reject_reason", r->reject_reason);
623 ndr_print_set_switch_value(ndr, &r->versions, r->reject_reason);
624 ndr_print_dcerpc_bind_nak_versions_ctr(ndr, "versions", &r->versions);
625 ndr->depth--;
628 static enum ndr_err_code ndr_push_dcerpc_response(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_response *r)
630 if (ndr_flags & NDR_SCALARS) {
631 NDR_CHECK(ndr_push_align(ndr, 4));
632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alloc_hint));
633 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->context_id));
634 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->cancel_count));
636 uint32_t _flags_save_DATA_BLOB = ndr->flags;
637 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
638 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
639 ndr->flags = _flags_save_DATA_BLOB;
642 uint32_t _flags_save_DATA_BLOB = ndr->flags;
643 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
644 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->stub_and_verifier));
645 ndr->flags = _flags_save_DATA_BLOB;
647 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
649 if (ndr_flags & NDR_BUFFERS) {
651 return NDR_ERR_SUCCESS;
654 static enum ndr_err_code ndr_pull_dcerpc_response(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_response *r)
656 if (ndr_flags & NDR_SCALARS) {
657 NDR_CHECK(ndr_pull_align(ndr, 4));
658 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alloc_hint));
659 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->context_id));
660 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->cancel_count));
662 uint32_t _flags_save_DATA_BLOB = ndr->flags;
663 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
664 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
665 ndr->flags = _flags_save_DATA_BLOB;
668 uint32_t _flags_save_DATA_BLOB = ndr->flags;
669 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
670 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->stub_and_verifier));
671 ndr->flags = _flags_save_DATA_BLOB;
673 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
675 if (ndr_flags & NDR_BUFFERS) {
677 return NDR_ERR_SUCCESS;
680 _PUBLIC_ void ndr_print_dcerpc_response(struct ndr_print *ndr, const char *name, const struct dcerpc_response *r)
682 ndr_print_struct(ndr, name, "dcerpc_response");
683 ndr->depth++;
684 ndr_print_uint32(ndr, "alloc_hint", r->alloc_hint);
685 ndr_print_uint16(ndr, "context_id", r->context_id);
686 ndr_print_uint8(ndr, "cancel_count", r->cancel_count);
687 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
688 ndr_print_DATA_BLOB(ndr, "stub_and_verifier", r->stub_and_verifier);
689 ndr->depth--;
692 static enum ndr_err_code ndr_push_dcerpc_fault(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_fault *r)
694 if (ndr_flags & NDR_SCALARS) {
695 NDR_CHECK(ndr_push_align(ndr, 4));
696 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alloc_hint));
697 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->context_id));
698 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->cancel_count));
699 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
701 uint32_t _flags_save_DATA_BLOB = ndr->flags;
702 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
703 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
704 ndr->flags = _flags_save_DATA_BLOB;
706 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
708 if (ndr_flags & NDR_BUFFERS) {
710 return NDR_ERR_SUCCESS;
713 static enum ndr_err_code ndr_pull_dcerpc_fault(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_fault *r)
715 if (ndr_flags & NDR_SCALARS) {
716 NDR_CHECK(ndr_pull_align(ndr, 4));
717 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alloc_hint));
718 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->context_id));
719 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->cancel_count));
720 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
722 uint32_t _flags_save_DATA_BLOB = ndr->flags;
723 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
724 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
725 ndr->flags = _flags_save_DATA_BLOB;
727 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
729 if (ndr_flags & NDR_BUFFERS) {
731 return NDR_ERR_SUCCESS;
734 _PUBLIC_ void ndr_print_dcerpc_fault(struct ndr_print *ndr, const char *name, const struct dcerpc_fault *r)
736 ndr_print_struct(ndr, name, "dcerpc_fault");
737 ndr->depth++;
738 ndr_print_uint32(ndr, "alloc_hint", r->alloc_hint);
739 ndr_print_uint16(ndr, "context_id", r->context_id);
740 ndr_print_uint8(ndr, "cancel_count", r->cancel_count);
741 ndr_print_uint32(ndr, "status", r->status);
742 ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
743 ndr->depth--;
746 static enum ndr_err_code ndr_push_dcerpc_AuthType(struct ndr_push *ndr, int ndr_flags, enum dcerpc_AuthType r)
748 NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
749 return NDR_ERR_SUCCESS;
752 static enum ndr_err_code ndr_pull_dcerpc_AuthType(struct ndr_pull *ndr, int ndr_flags, enum dcerpc_AuthType *r)
754 uint8_t v;
755 NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
756 *r = v;
757 return NDR_ERR_SUCCESS;
760 _PUBLIC_ void ndr_print_dcerpc_AuthType(struct ndr_print *ndr, const char *name, enum dcerpc_AuthType r)
762 const char *val = NULL;
764 switch (r) {
765 case DCERPC_AUTH_TYPE_NONE: val = "DCERPC_AUTH_TYPE_NONE"; break;
766 case DCERPC_AUTH_TYPE_KRB5_1: val = "DCERPC_AUTH_TYPE_KRB5_1"; break;
767 case DCERPC_AUTH_TYPE_SPNEGO: val = "DCERPC_AUTH_TYPE_SPNEGO"; break;
768 case DCERPC_AUTH_TYPE_NTLMSSP: val = "DCERPC_AUTH_TYPE_NTLMSSP"; break;
769 case DCERPC_AUTH_TYPE_KRB5: val = "DCERPC_AUTH_TYPE_KRB5"; break;
770 case DCERPC_AUTH_TYPE_DPA: val = "DCERPC_AUTH_TYPE_DPA"; break;
771 case DCERPC_AUTH_TYPE_MSN: val = "DCERPC_AUTH_TYPE_MSN"; break;
772 case DCERPC_AUTH_TYPE_DIGEST: val = "DCERPC_AUTH_TYPE_DIGEST"; break;
773 case DCERPC_AUTH_TYPE_SCHANNEL: val = "DCERPC_AUTH_TYPE_SCHANNEL"; break;
774 case DCERPC_AUTH_TYPE_MSMQ: val = "DCERPC_AUTH_TYPE_MSMQ"; break;
776 ndr_print_enum(ndr, name, "ENUM", val, r);
779 static enum ndr_err_code ndr_push_dcerpc_AuthLevel(struct ndr_push *ndr, int ndr_flags, enum dcerpc_AuthLevel r)
781 NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
782 return NDR_ERR_SUCCESS;
785 static enum ndr_err_code ndr_pull_dcerpc_AuthLevel(struct ndr_pull *ndr, int ndr_flags, enum dcerpc_AuthLevel *r)
787 uint8_t v;
788 NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
789 *r = v;
790 return NDR_ERR_SUCCESS;
793 _PUBLIC_ void ndr_print_dcerpc_AuthLevel(struct ndr_print *ndr, const char *name, enum dcerpc_AuthLevel r)
795 const char *val = NULL;
797 switch (r) {
798 case DCERPC_AUTH_LEVEL_NONE: val = "DCERPC_AUTH_LEVEL_NONE"; break;
799 case DCERPC_AUTH_LEVEL_CONNECT: val = "DCERPC_AUTH_LEVEL_CONNECT"; break;
800 case DCERPC_AUTH_LEVEL_CALL: val = "DCERPC_AUTH_LEVEL_CALL"; break;
801 case DCERPC_AUTH_LEVEL_PACKET: val = "DCERPC_AUTH_LEVEL_PACKET"; break;
802 case DCERPC_AUTH_LEVEL_INTEGRITY: val = "DCERPC_AUTH_LEVEL_INTEGRITY"; break;
803 case DCERPC_AUTH_LEVEL_PRIVACY: val = "DCERPC_AUTH_LEVEL_PRIVACY"; break;
805 ndr_print_enum(ndr, name, "ENUM", val, r);
808 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_auth(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_auth *r)
810 if (ndr_flags & NDR_SCALARS) {
811 NDR_CHECK(ndr_push_align(ndr, 4));
812 NDR_CHECK(ndr_push_dcerpc_AuthType(ndr, NDR_SCALARS, r->auth_type));
813 NDR_CHECK(ndr_push_dcerpc_AuthLevel(ndr, NDR_SCALARS, r->auth_level));
814 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->auth_pad_length));
815 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->auth_reserved));
816 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auth_context_id));
818 uint32_t _flags_save_DATA_BLOB = ndr->flags;
819 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
820 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->credentials));
821 ndr->flags = _flags_save_DATA_BLOB;
823 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
825 if (ndr_flags & NDR_BUFFERS) {
827 return NDR_ERR_SUCCESS;
830 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_auth(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_auth *r)
832 if (ndr_flags & NDR_SCALARS) {
833 NDR_CHECK(ndr_pull_align(ndr, 4));
834 NDR_CHECK(ndr_pull_dcerpc_AuthType(ndr, NDR_SCALARS, &r->auth_type));
835 NDR_CHECK(ndr_pull_dcerpc_AuthLevel(ndr, NDR_SCALARS, &r->auth_level));
836 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->auth_pad_length));
837 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->auth_reserved));
838 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auth_context_id));
840 uint32_t _flags_save_DATA_BLOB = ndr->flags;
841 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
842 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->credentials));
843 ndr->flags = _flags_save_DATA_BLOB;
845 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
847 if (ndr_flags & NDR_BUFFERS) {
849 return NDR_ERR_SUCCESS;
852 _PUBLIC_ void ndr_print_dcerpc_auth(struct ndr_print *ndr, const char *name, const struct dcerpc_auth *r)
854 ndr_print_struct(ndr, name, "dcerpc_auth");
855 ndr->depth++;
856 ndr_print_dcerpc_AuthType(ndr, "auth_type", r->auth_type);
857 ndr_print_dcerpc_AuthLevel(ndr, "auth_level", r->auth_level);
858 ndr_print_uint8(ndr, "auth_pad_length", r->auth_pad_length);
859 ndr_print_uint8(ndr, "auth_reserved", r->auth_reserved);
860 ndr_print_uint32(ndr, "auth_context_id", r->auth_context_id);
861 ndr_print_DATA_BLOB(ndr, "credentials", r->credentials);
862 ndr->depth--;
865 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_auth3(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_auth3 *r)
867 if (ndr_flags & NDR_SCALARS) {
868 NDR_CHECK(ndr_push_align(ndr, 4));
869 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
871 uint32_t _flags_save_DATA_BLOB = ndr->flags;
872 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
873 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info));
874 ndr->flags = _flags_save_DATA_BLOB;
876 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
878 if (ndr_flags & NDR_BUFFERS) {
880 return NDR_ERR_SUCCESS;
883 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_auth3(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_auth3 *r)
885 if (ndr_flags & NDR_SCALARS) {
886 NDR_CHECK(ndr_pull_align(ndr, 4));
887 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
889 uint32_t _flags_save_DATA_BLOB = ndr->flags;
890 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
891 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info));
892 ndr->flags = _flags_save_DATA_BLOB;
894 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
896 if (ndr_flags & NDR_BUFFERS) {
898 return NDR_ERR_SUCCESS;
901 _PUBLIC_ void ndr_print_dcerpc_auth3(struct ndr_print *ndr, const char *name, const struct dcerpc_auth3 *r)
903 ndr_print_struct(ndr, name, "dcerpc_auth3");
904 ndr->depth++;
905 ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad);
906 ndr_print_DATA_BLOB(ndr, "auth_info", r->auth_info);
907 ndr->depth--;
910 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_orphaned(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_orphaned *r)
912 if (ndr_flags & NDR_SCALARS) {
913 NDR_CHECK(ndr_push_align(ndr, 4));
914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
916 uint32_t _flags_save_DATA_BLOB = ndr->flags;
917 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
918 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info));
919 ndr->flags = _flags_save_DATA_BLOB;
921 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
923 if (ndr_flags & NDR_BUFFERS) {
925 return NDR_ERR_SUCCESS;
928 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_orphaned(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_orphaned *r)
930 if (ndr_flags & NDR_SCALARS) {
931 NDR_CHECK(ndr_pull_align(ndr, 4));
932 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
934 uint32_t _flags_save_DATA_BLOB = ndr->flags;
935 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
936 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info));
937 ndr->flags = _flags_save_DATA_BLOB;
939 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
941 if (ndr_flags & NDR_BUFFERS) {
943 return NDR_ERR_SUCCESS;
946 _PUBLIC_ void ndr_print_dcerpc_orphaned(struct ndr_print *ndr, const char *name, const struct dcerpc_orphaned *r)
948 ndr_print_struct(ndr, name, "dcerpc_orphaned");
949 ndr->depth++;
950 ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad);
951 ndr_print_DATA_BLOB(ndr, "auth_info", r->auth_info);
952 ndr->depth--;
955 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_co_cancel(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_co_cancel *r)
957 if (ndr_flags & NDR_SCALARS) {
958 NDR_CHECK(ndr_push_align(ndr, 4));
959 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
961 uint32_t _flags_save_DATA_BLOB = ndr->flags;
962 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
963 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->auth_info));
964 ndr->flags = _flags_save_DATA_BLOB;
966 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
968 if (ndr_flags & NDR_BUFFERS) {
970 return NDR_ERR_SUCCESS;
973 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_co_cancel(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_co_cancel *r)
975 if (ndr_flags & NDR_SCALARS) {
976 NDR_CHECK(ndr_pull_align(ndr, 4));
977 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_pad));
979 uint32_t _flags_save_DATA_BLOB = ndr->flags;
980 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
981 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->auth_info));
982 ndr->flags = _flags_save_DATA_BLOB;
984 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
986 if (ndr_flags & NDR_BUFFERS) {
988 return NDR_ERR_SUCCESS;
991 _PUBLIC_ void ndr_print_dcerpc_co_cancel(struct ndr_print *ndr, const char *name, const struct dcerpc_co_cancel *r)
993 ndr_print_struct(ndr, name, "dcerpc_co_cancel");
994 ndr->depth++;
995 ndr_print_uint32(ndr, "_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->_pad);
996 ndr_print_DATA_BLOB(ndr, "auth_info", r->auth_info);
997 ndr->depth--;
1000 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_cl_cancel(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_cl_cancel *r)
1002 if (ndr_flags & NDR_SCALARS) {
1003 NDR_CHECK(ndr_push_align(ndr, 4));
1004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
1005 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->id));
1006 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1008 if (ndr_flags & NDR_BUFFERS) {
1010 return NDR_ERR_SUCCESS;
1013 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_cl_cancel(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_cl_cancel *r)
1015 if (ndr_flags & NDR_SCALARS) {
1016 NDR_CHECK(ndr_pull_align(ndr, 4));
1017 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1018 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->id));
1019 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1021 if (ndr_flags & NDR_BUFFERS) {
1023 return NDR_ERR_SUCCESS;
1026 _PUBLIC_ void ndr_print_dcerpc_cl_cancel(struct ndr_print *ndr, const char *name, const struct dcerpc_cl_cancel *r)
1028 ndr_print_struct(ndr, name, "dcerpc_cl_cancel");
1029 ndr->depth++;
1030 ndr_print_uint32(ndr, "version", r->version);
1031 ndr_print_uint32(ndr, "id", r->id);
1032 ndr->depth--;
1035 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_cancel_ack(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_cancel_ack *r)
1037 if (ndr_flags & NDR_SCALARS) {
1038 NDR_CHECK(ndr_push_align(ndr, 4));
1039 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
1040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->id));
1041 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->server_is_accepting));
1042 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1044 if (ndr_flags & NDR_BUFFERS) {
1046 return NDR_ERR_SUCCESS;
1049 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_cancel_ack(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_cancel_ack *r)
1051 if (ndr_flags & NDR_SCALARS) {
1052 NDR_CHECK(ndr_pull_align(ndr, 4));
1053 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1054 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->id));
1055 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->server_is_accepting));
1056 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1058 if (ndr_flags & NDR_BUFFERS) {
1060 return NDR_ERR_SUCCESS;
1063 _PUBLIC_ void ndr_print_dcerpc_cancel_ack(struct ndr_print *ndr, const char *name, const struct dcerpc_cancel_ack *r)
1065 ndr_print_struct(ndr, name, "dcerpc_cancel_ack");
1066 ndr->depth++;
1067 ndr_print_uint32(ndr, "version", r->version);
1068 ndr_print_uint32(ndr, "id", r->id);
1069 ndr_print_uint32(ndr, "server_is_accepting", r->server_is_accepting);
1070 ndr->depth--;
1073 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_fack(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_fack *r)
1075 uint32_t cntr_selack_0;
1076 if (ndr_flags & NDR_SCALARS) {
1077 NDR_CHECK(ndr_push_align(ndr, 4));
1078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
1079 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->_pad1));
1080 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->window_size));
1081 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_tdsu));
1082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_frag_size));
1083 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->serial_no));
1084 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->selack_size));
1085 for (cntr_selack_0 = 0; cntr_selack_0 < r->selack_size; cntr_selack_0++) {
1086 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->selack[cntr_selack_0]));
1088 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1090 if (ndr_flags & NDR_BUFFERS) {
1092 return NDR_ERR_SUCCESS;
1095 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_fack(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_fack *r)
1097 uint32_t cntr_selack_0;
1098 TALLOC_CTX *_mem_save_selack_0;
1099 if (ndr_flags & NDR_SCALARS) {
1100 NDR_CHECK(ndr_pull_align(ndr, 4));
1101 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
1102 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->_pad1));
1103 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->window_size));
1104 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_tdsu));
1105 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_frag_size));
1106 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->serial_no));
1107 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->selack_size));
1108 NDR_PULL_ALLOC_N(ndr, r->selack, r->selack_size);
1109 _mem_save_selack_0 = NDR_PULL_GET_MEM_CTX(ndr);
1110 NDR_PULL_SET_MEM_CTX(ndr, r->selack, 0);
1111 for (cntr_selack_0 = 0; cntr_selack_0 < r->selack_size; cntr_selack_0++) {
1112 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->selack[cntr_selack_0]));
1114 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_selack_0, 0);
1115 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1117 if (ndr_flags & NDR_BUFFERS) {
1119 return NDR_ERR_SUCCESS;
1122 _PUBLIC_ void ndr_print_dcerpc_fack(struct ndr_print *ndr, const char *name, const struct dcerpc_fack *r)
1124 uint32_t cntr_selack_0;
1125 ndr_print_struct(ndr, name, "dcerpc_fack");
1126 ndr->depth++;
1127 ndr_print_uint32(ndr, "version", r->version);
1128 ndr_print_uint8(ndr, "_pad1", r->_pad1);
1129 ndr_print_uint16(ndr, "window_size", r->window_size);
1130 ndr_print_uint32(ndr, "max_tdsu", r->max_tdsu);
1131 ndr_print_uint32(ndr, "max_frag_size", r->max_frag_size);
1132 ndr_print_uint16(ndr, "serial_no", r->serial_no);
1133 ndr_print_uint16(ndr, "selack_size", r->selack_size);
1134 ndr->print(ndr, "%s: ARRAY(%d)", "selack", (int)r->selack_size);
1135 ndr->depth++;
1136 for (cntr_selack_0=0;cntr_selack_0<r->selack_size;cntr_selack_0++) {
1137 char *idx_0=NULL;
1138 if (asprintf(&idx_0, "[%d]", cntr_selack_0) != -1) {
1139 ndr_print_uint32(ndr, "selack", r->selack[cntr_selack_0]);
1140 free(idx_0);
1143 ndr->depth--;
1144 ndr->depth--;
1147 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_ack(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_ack *r)
1149 if (ndr_flags & NDR_SCALARS) {
1150 NDR_CHECK(ndr_push_align(ndr, 1));
1151 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1153 if (ndr_flags & NDR_BUFFERS) {
1155 return NDR_ERR_SUCCESS;
1158 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_ack(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_ack *r)
1160 if (ndr_flags & NDR_SCALARS) {
1161 NDR_CHECK(ndr_pull_align(ndr, 1));
1162 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1164 if (ndr_flags & NDR_BUFFERS) {
1166 return NDR_ERR_SUCCESS;
1169 _PUBLIC_ void ndr_print_dcerpc_ack(struct ndr_print *ndr, const char *name, const struct dcerpc_ack *r)
1171 ndr_print_struct(ndr, name, "dcerpc_ack");
1172 ndr->depth++;
1173 ndr->depth--;
1176 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_ping(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_ping *r)
1178 if (ndr_flags & NDR_SCALARS) {
1179 NDR_CHECK(ndr_push_align(ndr, 1));
1180 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1182 if (ndr_flags & NDR_BUFFERS) {
1184 return NDR_ERR_SUCCESS;
1187 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_ping(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_ping *r)
1189 if (ndr_flags & NDR_SCALARS) {
1190 NDR_CHECK(ndr_pull_align(ndr, 1));
1191 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1193 if (ndr_flags & NDR_BUFFERS) {
1195 return NDR_ERR_SUCCESS;
1198 _PUBLIC_ void ndr_print_dcerpc_ping(struct ndr_print *ndr, const char *name, const struct dcerpc_ping *r)
1200 ndr_print_struct(ndr, name, "dcerpc_ping");
1201 ndr->depth++;
1202 ndr->depth--;
1205 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_shutdown(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_shutdown *r)
1207 if (ndr_flags & NDR_SCALARS) {
1208 NDR_CHECK(ndr_push_align(ndr, 1));
1209 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1211 if (ndr_flags & NDR_BUFFERS) {
1213 return NDR_ERR_SUCCESS;
1216 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_shutdown(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_shutdown *r)
1218 if (ndr_flags & NDR_SCALARS) {
1219 NDR_CHECK(ndr_pull_align(ndr, 1));
1220 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1222 if (ndr_flags & NDR_BUFFERS) {
1224 return NDR_ERR_SUCCESS;
1227 _PUBLIC_ void ndr_print_dcerpc_shutdown(struct ndr_print *ndr, const char *name, const struct dcerpc_shutdown *r)
1229 ndr_print_struct(ndr, name, "dcerpc_shutdown");
1230 ndr->depth++;
1231 ndr->depth--;
1234 _PUBLIC_ enum ndr_err_code ndr_push_dcerpc_working(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_working *r)
1236 if (ndr_flags & NDR_SCALARS) {
1237 NDR_CHECK(ndr_push_align(ndr, 1));
1238 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
1240 if (ndr_flags & NDR_BUFFERS) {
1242 return NDR_ERR_SUCCESS;
1245 _PUBLIC_ enum ndr_err_code ndr_pull_dcerpc_working(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_working *r)
1247 if (ndr_flags & NDR_SCALARS) {
1248 NDR_CHECK(ndr_pull_align(ndr, 1));
1249 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
1251 if (ndr_flags & NDR_BUFFERS) {
1253 return NDR_ERR_SUCCESS;
1256 _PUBLIC_ void ndr_print_dcerpc_working(struct ndr_print *ndr, const char *name, const struct dcerpc_working *r)
1258 ndr_print_struct(ndr, name, "dcerpc_working");
1259 ndr->depth++;
1260 ndr->depth--;
1263 static enum ndr_err_code ndr_push_dcerpc_pkt_type(struct ndr_push *ndr, int ndr_flags, enum dcerpc_pkt_type r)
1265 NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
1266 return NDR_ERR_SUCCESS;
1269 static enum ndr_err_code ndr_pull_dcerpc_pkt_type(struct ndr_pull *ndr, int ndr_flags, enum dcerpc_pkt_type *r)
1271 uint8_t v;
1272 NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
1273 *r = v;
1274 return NDR_ERR_SUCCESS;
1277 _PUBLIC_ void ndr_print_dcerpc_pkt_type(struct ndr_print *ndr, const char *name, enum dcerpc_pkt_type r)
1279 const char *val = NULL;
1281 switch (r) {
1282 case DCERPC_PKT_REQUEST: val = "DCERPC_PKT_REQUEST"; break;
1283 case DCERPC_PKT_PING: val = "DCERPC_PKT_PING"; break;
1284 case DCERPC_PKT_RESPONSE: val = "DCERPC_PKT_RESPONSE"; break;
1285 case DCERPC_PKT_FAULT: val = "DCERPC_PKT_FAULT"; break;
1286 case DCERPC_PKT_WORKING: val = "DCERPC_PKT_WORKING"; break;
1287 case DCERPC_PKT_NOCALL: val = "DCERPC_PKT_NOCALL"; break;
1288 case DCERPC_PKT_REJECT: val = "DCERPC_PKT_REJECT"; break;
1289 case DCERPC_PKT_ACK: val = "DCERPC_PKT_ACK"; break;
1290 case DCERPC_PKT_CL_CANCEL: val = "DCERPC_PKT_CL_CANCEL"; break;
1291 case DCERPC_PKT_FACK: val = "DCERPC_PKT_FACK"; break;
1292 case DCERPC_PKT_CANCEL_ACK: val = "DCERPC_PKT_CANCEL_ACK"; break;
1293 case DCERPC_PKT_BIND: val = "DCERPC_PKT_BIND"; break;
1294 case DCERPC_PKT_BIND_ACK: val = "DCERPC_PKT_BIND_ACK"; break;
1295 case DCERPC_PKT_BIND_NAK: val = "DCERPC_PKT_BIND_NAK"; break;
1296 case DCERPC_PKT_ALTER: val = "DCERPC_PKT_ALTER"; break;
1297 case DCERPC_PKT_ALTER_RESP: val = "DCERPC_PKT_ALTER_RESP"; break;
1298 case DCERPC_PKT_AUTH3: val = "DCERPC_PKT_AUTH3"; break;
1299 case DCERPC_PKT_SHUTDOWN: val = "DCERPC_PKT_SHUTDOWN"; break;
1300 case DCERPC_PKT_CO_CANCEL: val = "DCERPC_PKT_CO_CANCEL"; break;
1301 case DCERPC_PKT_ORPHANED: val = "DCERPC_PKT_ORPHANED"; break;
1303 ndr_print_enum(ndr, name, "ENUM", val, r);
1306 static enum ndr_err_code ndr_push_dcerpc_payload(struct ndr_push *ndr, int ndr_flags, const union dcerpc_payload *r)
1308 if (ndr_flags & NDR_SCALARS) {
1309 int level = ndr_push_get_switch_value(ndr, r);
1310 NDR_CHECK(ndr_push_union_align(ndr, 4));
1311 switch (level) {
1312 case DCERPC_PKT_REQUEST: {
1313 NDR_CHECK(ndr_push_dcerpc_request(ndr, NDR_SCALARS, &r->request));
1314 break; }
1316 case DCERPC_PKT_PING: {
1317 NDR_CHECK(ndr_push_dcerpc_ping(ndr, NDR_SCALARS, &r->ping));
1318 break; }
1320 case DCERPC_PKT_RESPONSE: {
1321 NDR_CHECK(ndr_push_dcerpc_response(ndr, NDR_SCALARS, &r->response));
1322 break; }
1324 case DCERPC_PKT_FAULT: {
1325 NDR_CHECK(ndr_push_dcerpc_fault(ndr, NDR_SCALARS, &r->fault));
1326 break; }
1328 case DCERPC_PKT_WORKING: {
1329 NDR_CHECK(ndr_push_dcerpc_working(ndr, NDR_SCALARS, &r->working));
1330 break; }
1332 case DCERPC_PKT_NOCALL: {
1333 NDR_CHECK(ndr_push_dcerpc_fack(ndr, NDR_SCALARS, &r->nocall));
1334 break; }
1336 case DCERPC_PKT_REJECT: {
1337 NDR_CHECK(ndr_push_dcerpc_fault(ndr, NDR_SCALARS, &r->reject));
1338 break; }
1340 case DCERPC_PKT_ACK: {
1341 NDR_CHECK(ndr_push_dcerpc_ack(ndr, NDR_SCALARS, &r->ack));
1342 break; }
1344 case DCERPC_PKT_CL_CANCEL: {
1345 NDR_CHECK(ndr_push_dcerpc_cl_cancel(ndr, NDR_SCALARS, &r->cl_cancel));
1346 break; }
1348 case DCERPC_PKT_FACK: {
1349 NDR_CHECK(ndr_push_dcerpc_fack(ndr, NDR_SCALARS, &r->fack));
1350 break; }
1352 case DCERPC_PKT_CANCEL_ACK: {
1353 NDR_CHECK(ndr_push_dcerpc_cancel_ack(ndr, NDR_SCALARS, &r->cancel_ack));
1354 break; }
1356 case DCERPC_PKT_BIND: {
1357 NDR_CHECK(ndr_push_dcerpc_bind(ndr, NDR_SCALARS, &r->bind));
1358 break; }
1360 case DCERPC_PKT_BIND_ACK: {
1361 NDR_CHECK(ndr_push_dcerpc_bind_ack(ndr, NDR_SCALARS, &r->bind_ack));
1362 break; }
1364 case DCERPC_PKT_BIND_NAK: {
1365 NDR_CHECK(ndr_push_dcerpc_bind_nak(ndr, NDR_SCALARS, &r->bind_nak));
1366 break; }
1368 case DCERPC_PKT_ALTER: {
1369 NDR_CHECK(ndr_push_dcerpc_bind(ndr, NDR_SCALARS, &r->alter));
1370 break; }
1372 case DCERPC_PKT_ALTER_RESP: {
1373 NDR_CHECK(ndr_push_dcerpc_bind_ack(ndr, NDR_SCALARS, &r->alter_resp));
1374 break; }
1376 case DCERPC_PKT_SHUTDOWN: {
1377 NDR_CHECK(ndr_push_dcerpc_shutdown(ndr, NDR_SCALARS, &r->shutdown));
1378 break; }
1380 case DCERPC_PKT_CO_CANCEL: {
1381 NDR_CHECK(ndr_push_dcerpc_co_cancel(ndr, NDR_SCALARS, &r->co_cancel));
1382 break; }
1384 case DCERPC_PKT_ORPHANED: {
1385 NDR_CHECK(ndr_push_dcerpc_orphaned(ndr, NDR_SCALARS, &r->orphaned));
1386 break; }
1388 case DCERPC_PKT_AUTH3: {
1389 NDR_CHECK(ndr_push_dcerpc_auth3(ndr, NDR_SCALARS, &r->auth3));
1390 break; }
1392 default:
1393 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1396 if (ndr_flags & NDR_BUFFERS) {
1397 int level = ndr_push_get_switch_value(ndr, r);
1398 switch (level) {
1399 case DCERPC_PKT_REQUEST:
1400 break;
1402 case DCERPC_PKT_PING:
1403 break;
1405 case DCERPC_PKT_RESPONSE:
1406 break;
1408 case DCERPC_PKT_FAULT:
1409 break;
1411 case DCERPC_PKT_WORKING:
1412 break;
1414 case DCERPC_PKT_NOCALL:
1415 break;
1417 case DCERPC_PKT_REJECT:
1418 break;
1420 case DCERPC_PKT_ACK:
1421 break;
1423 case DCERPC_PKT_CL_CANCEL:
1424 break;
1426 case DCERPC_PKT_FACK:
1427 break;
1429 case DCERPC_PKT_CANCEL_ACK:
1430 break;
1432 case DCERPC_PKT_BIND:
1433 break;
1435 case DCERPC_PKT_BIND_ACK:
1436 break;
1438 case DCERPC_PKT_BIND_NAK:
1439 NDR_CHECK(ndr_push_dcerpc_bind_nak(ndr, NDR_BUFFERS, &r->bind_nak));
1440 break;
1442 case DCERPC_PKT_ALTER:
1443 break;
1445 case DCERPC_PKT_ALTER_RESP:
1446 break;
1448 case DCERPC_PKT_SHUTDOWN:
1449 break;
1451 case DCERPC_PKT_CO_CANCEL:
1452 break;
1454 case DCERPC_PKT_ORPHANED:
1455 break;
1457 case DCERPC_PKT_AUTH3:
1458 break;
1460 default:
1461 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1464 return NDR_ERR_SUCCESS;
1467 static enum ndr_err_code ndr_pull_dcerpc_payload(struct ndr_pull *ndr, int ndr_flags, union dcerpc_payload *r)
1469 int level;
1470 level = ndr_pull_get_switch_value(ndr, r);
1471 if (ndr_flags & NDR_SCALARS) {
1472 NDR_CHECK(ndr_pull_union_align(ndr, 4));
1473 switch (level) {
1474 case DCERPC_PKT_REQUEST: {
1475 NDR_CHECK(ndr_pull_dcerpc_request(ndr, NDR_SCALARS, &r->request));
1476 break; }
1478 case DCERPC_PKT_PING: {
1479 NDR_CHECK(ndr_pull_dcerpc_ping(ndr, NDR_SCALARS, &r->ping));
1480 break; }
1482 case DCERPC_PKT_RESPONSE: {
1483 NDR_CHECK(ndr_pull_dcerpc_response(ndr, NDR_SCALARS, &r->response));
1484 break; }
1486 case DCERPC_PKT_FAULT: {
1487 NDR_CHECK(ndr_pull_dcerpc_fault(ndr, NDR_SCALARS, &r->fault));
1488 break; }
1490 case DCERPC_PKT_WORKING: {
1491 NDR_CHECK(ndr_pull_dcerpc_working(ndr, NDR_SCALARS, &r->working));
1492 break; }
1494 case DCERPC_PKT_NOCALL: {
1495 NDR_CHECK(ndr_pull_dcerpc_fack(ndr, NDR_SCALARS, &r->nocall));
1496 break; }
1498 case DCERPC_PKT_REJECT: {
1499 NDR_CHECK(ndr_pull_dcerpc_fault(ndr, NDR_SCALARS, &r->reject));
1500 break; }
1502 case DCERPC_PKT_ACK: {
1503 NDR_CHECK(ndr_pull_dcerpc_ack(ndr, NDR_SCALARS, &r->ack));
1504 break; }
1506 case DCERPC_PKT_CL_CANCEL: {
1507 NDR_CHECK(ndr_pull_dcerpc_cl_cancel(ndr, NDR_SCALARS, &r->cl_cancel));
1508 break; }
1510 case DCERPC_PKT_FACK: {
1511 NDR_CHECK(ndr_pull_dcerpc_fack(ndr, NDR_SCALARS, &r->fack));
1512 break; }
1514 case DCERPC_PKT_CANCEL_ACK: {
1515 NDR_CHECK(ndr_pull_dcerpc_cancel_ack(ndr, NDR_SCALARS, &r->cancel_ack));
1516 break; }
1518 case DCERPC_PKT_BIND: {
1519 NDR_CHECK(ndr_pull_dcerpc_bind(ndr, NDR_SCALARS, &r->bind));
1520 break; }
1522 case DCERPC_PKT_BIND_ACK: {
1523 NDR_CHECK(ndr_pull_dcerpc_bind_ack(ndr, NDR_SCALARS, &r->bind_ack));
1524 break; }
1526 case DCERPC_PKT_BIND_NAK: {
1527 NDR_CHECK(ndr_pull_dcerpc_bind_nak(ndr, NDR_SCALARS, &r->bind_nak));
1528 break; }
1530 case DCERPC_PKT_ALTER: {
1531 NDR_CHECK(ndr_pull_dcerpc_bind(ndr, NDR_SCALARS, &r->alter));
1532 break; }
1534 case DCERPC_PKT_ALTER_RESP: {
1535 NDR_CHECK(ndr_pull_dcerpc_bind_ack(ndr, NDR_SCALARS, &r->alter_resp));
1536 break; }
1538 case DCERPC_PKT_SHUTDOWN: {
1539 NDR_CHECK(ndr_pull_dcerpc_shutdown(ndr, NDR_SCALARS, &r->shutdown));
1540 break; }
1542 case DCERPC_PKT_CO_CANCEL: {
1543 NDR_CHECK(ndr_pull_dcerpc_co_cancel(ndr, NDR_SCALARS, &r->co_cancel));
1544 break; }
1546 case DCERPC_PKT_ORPHANED: {
1547 NDR_CHECK(ndr_pull_dcerpc_orphaned(ndr, NDR_SCALARS, &r->orphaned));
1548 break; }
1550 case DCERPC_PKT_AUTH3: {
1551 NDR_CHECK(ndr_pull_dcerpc_auth3(ndr, NDR_SCALARS, &r->auth3));
1552 break; }
1554 default:
1555 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1558 if (ndr_flags & NDR_BUFFERS) {
1559 switch (level) {
1560 case DCERPC_PKT_REQUEST:
1561 break;
1563 case DCERPC_PKT_PING:
1564 break;
1566 case DCERPC_PKT_RESPONSE:
1567 break;
1569 case DCERPC_PKT_FAULT:
1570 break;
1572 case DCERPC_PKT_WORKING:
1573 break;
1575 case DCERPC_PKT_NOCALL:
1576 break;
1578 case DCERPC_PKT_REJECT:
1579 break;
1581 case DCERPC_PKT_ACK:
1582 break;
1584 case DCERPC_PKT_CL_CANCEL:
1585 break;
1587 case DCERPC_PKT_FACK:
1588 break;
1590 case DCERPC_PKT_CANCEL_ACK:
1591 break;
1593 case DCERPC_PKT_BIND:
1594 break;
1596 case DCERPC_PKT_BIND_ACK:
1597 break;
1599 case DCERPC_PKT_BIND_NAK:
1600 NDR_CHECK(ndr_pull_dcerpc_bind_nak(ndr, NDR_BUFFERS, &r->bind_nak));
1601 break;
1603 case DCERPC_PKT_ALTER:
1604 break;
1606 case DCERPC_PKT_ALTER_RESP:
1607 break;
1609 case DCERPC_PKT_SHUTDOWN:
1610 break;
1612 case DCERPC_PKT_CO_CANCEL:
1613 break;
1615 case DCERPC_PKT_ORPHANED:
1616 break;
1618 case DCERPC_PKT_AUTH3:
1619 break;
1621 default:
1622 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1625 return NDR_ERR_SUCCESS;
1628 _PUBLIC_ void ndr_print_dcerpc_payload(struct ndr_print *ndr, const char *name, const union dcerpc_payload *r)
1630 int level;
1631 level = ndr_print_get_switch_value(ndr, r);
1632 ndr_print_union(ndr, name, level, "dcerpc_payload");
1633 switch (level) {
1634 case DCERPC_PKT_REQUEST:
1635 ndr_print_dcerpc_request(ndr, "request", &r->request);
1636 break;
1638 case DCERPC_PKT_PING:
1639 ndr_print_dcerpc_ping(ndr, "ping", &r->ping);
1640 break;
1642 case DCERPC_PKT_RESPONSE:
1643 ndr_print_dcerpc_response(ndr, "response", &r->response);
1644 break;
1646 case DCERPC_PKT_FAULT:
1647 ndr_print_dcerpc_fault(ndr, "fault", &r->fault);
1648 break;
1650 case DCERPC_PKT_WORKING:
1651 ndr_print_dcerpc_working(ndr, "working", &r->working);
1652 break;
1654 case DCERPC_PKT_NOCALL:
1655 ndr_print_dcerpc_fack(ndr, "nocall", &r->nocall);
1656 break;
1658 case DCERPC_PKT_REJECT:
1659 ndr_print_dcerpc_fault(ndr, "reject", &r->reject);
1660 break;
1662 case DCERPC_PKT_ACK:
1663 ndr_print_dcerpc_ack(ndr, "ack", &r->ack);
1664 break;
1666 case DCERPC_PKT_CL_CANCEL:
1667 ndr_print_dcerpc_cl_cancel(ndr, "cl_cancel", &r->cl_cancel);
1668 break;
1670 case DCERPC_PKT_FACK:
1671 ndr_print_dcerpc_fack(ndr, "fack", &r->fack);
1672 break;
1674 case DCERPC_PKT_CANCEL_ACK:
1675 ndr_print_dcerpc_cancel_ack(ndr, "cancel_ack", &r->cancel_ack);
1676 break;
1678 case DCERPC_PKT_BIND:
1679 ndr_print_dcerpc_bind(ndr, "bind", &r->bind);
1680 break;
1682 case DCERPC_PKT_BIND_ACK:
1683 ndr_print_dcerpc_bind_ack(ndr, "bind_ack", &r->bind_ack);
1684 break;
1686 case DCERPC_PKT_BIND_NAK:
1687 ndr_print_dcerpc_bind_nak(ndr, "bind_nak", &r->bind_nak);
1688 break;
1690 case DCERPC_PKT_ALTER:
1691 ndr_print_dcerpc_bind(ndr, "alter", &r->alter);
1692 break;
1694 case DCERPC_PKT_ALTER_RESP:
1695 ndr_print_dcerpc_bind_ack(ndr, "alter_resp", &r->alter_resp);
1696 break;
1698 case DCERPC_PKT_SHUTDOWN:
1699 ndr_print_dcerpc_shutdown(ndr, "shutdown", &r->shutdown);
1700 break;
1702 case DCERPC_PKT_CO_CANCEL:
1703 ndr_print_dcerpc_co_cancel(ndr, "co_cancel", &r->co_cancel);
1704 break;
1706 case DCERPC_PKT_ORPHANED:
1707 ndr_print_dcerpc_orphaned(ndr, "orphaned", &r->orphaned);
1708 break;
1710 case DCERPC_PKT_AUTH3:
1711 ndr_print_dcerpc_auth3(ndr, "auth3", &r->auth3);
1712 break;
1714 default:
1715 ndr_print_bad_level(ndr, name, level);
1719 _PUBLIC_ enum ndr_err_code ndr_push_ncacn_packet(struct ndr_push *ndr, int ndr_flags, const struct ncacn_packet *r)
1721 if (ndr_flags & NDR_SCALARS) {
1722 NDR_CHECK(ndr_push_align(ndr, 4));
1723 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->rpc_vers));
1724 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->rpc_vers_minor));
1725 NDR_CHECK(ndr_push_dcerpc_pkt_type(ndr, NDR_SCALARS, r->ptype));
1726 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pfc_flags));
1727 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->drep, 4));
1728 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->frag_length));
1729 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->auth_length));
1730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->call_id));
1731 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->ptype));
1732 NDR_CHECK(ndr_push_dcerpc_payload(ndr, NDR_SCALARS, &r->u));
1733 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1735 if (ndr_flags & NDR_BUFFERS) {
1736 NDR_CHECK(ndr_push_dcerpc_payload(ndr, NDR_BUFFERS, &r->u));
1738 return NDR_ERR_SUCCESS;
1741 _PUBLIC_ enum ndr_err_code ndr_pull_ncacn_packet(struct ndr_pull *ndr, int ndr_flags, struct ncacn_packet *r)
1743 if (ndr_flags & NDR_SCALARS) {
1744 NDR_CHECK(ndr_pull_align(ndr, 4));
1745 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->rpc_vers));
1746 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->rpc_vers_minor));
1747 NDR_CHECK(ndr_pull_dcerpc_pkt_type(ndr, NDR_SCALARS, &r->ptype));
1748 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pfc_flags));
1749 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->drep, 4));
1750 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->frag_length));
1751 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->auth_length));
1752 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->call_id));
1753 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->ptype));
1754 NDR_CHECK(ndr_pull_dcerpc_payload(ndr, NDR_SCALARS, &r->u));
1755 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1757 if (ndr_flags & NDR_BUFFERS) {
1758 NDR_CHECK(ndr_pull_dcerpc_payload(ndr, NDR_BUFFERS, &r->u));
1760 return NDR_ERR_SUCCESS;
1763 _PUBLIC_ void ndr_print_ncacn_packet(struct ndr_print *ndr, const char *name, const struct ncacn_packet *r)
1765 ndr_print_struct(ndr, name, "ncacn_packet");
1766 ndr->depth++;
1767 ndr_print_uint8(ndr, "rpc_vers", r->rpc_vers);
1768 ndr_print_uint8(ndr, "rpc_vers_minor", r->rpc_vers_minor);
1769 ndr_print_dcerpc_pkt_type(ndr, "ptype", r->ptype);
1770 ndr_print_uint8(ndr, "pfc_flags", r->pfc_flags);
1771 ndr_print_array_uint8(ndr, "drep", r->drep, 4);
1772 ndr_print_uint16(ndr, "frag_length", r->frag_length);
1773 ndr_print_uint16(ndr, "auth_length", r->auth_length);
1774 ndr_print_uint32(ndr, "call_id", r->call_id);
1775 ndr_print_set_switch_value(ndr, &r->u, r->ptype);
1776 ndr_print_dcerpc_payload(ndr, "u", &r->u);
1777 ndr->depth--;
1780 _PUBLIC_ enum ndr_err_code ndr_push_ncadg_packet(struct ndr_push *ndr, int ndr_flags, const struct ncadg_packet *r)
1782 if (ndr_flags & NDR_SCALARS) {
1783 NDR_CHECK(ndr_push_align(ndr, 4));
1784 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->rpc_vers));
1785 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ptype));
1786 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pfc_flags));
1787 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->ncadg_flags));
1788 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->drep, 3));
1789 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->serial_high));
1790 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
1791 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->iface));
1792 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->activity));
1793 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->server_boot));
1794 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->iface_version));
1795 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->seq_num));
1796 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->opnum));
1797 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ihint));
1798 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ahint));
1799 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->len));
1800 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->fragnum));
1801 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->auth_proto));
1802 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->serial_low));
1803 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->ptype));
1804 NDR_CHECK(ndr_push_dcerpc_payload(ndr, NDR_SCALARS, &r->u));
1805 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1807 if (ndr_flags & NDR_BUFFERS) {
1808 NDR_CHECK(ndr_push_dcerpc_payload(ndr, NDR_BUFFERS, &r->u));
1810 return NDR_ERR_SUCCESS;
1813 _PUBLIC_ enum ndr_err_code ndr_pull_ncadg_packet(struct ndr_pull *ndr, int ndr_flags, struct ncadg_packet *r)
1815 if (ndr_flags & NDR_SCALARS) {
1816 NDR_CHECK(ndr_pull_align(ndr, 4));
1817 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->rpc_vers));
1818 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ptype));
1819 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pfc_flags));
1820 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->ncadg_flags));
1821 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->drep, 3));
1822 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->serial_high));
1823 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->object));
1824 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->iface));
1825 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->activity));
1826 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->server_boot));
1827 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->iface_version));
1828 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->seq_num));
1829 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->opnum));
1830 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ihint));
1831 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ahint));
1832 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->len));
1833 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->fragnum));
1834 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->auth_proto));
1835 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->serial_low));
1836 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->ptype));
1837 NDR_CHECK(ndr_pull_dcerpc_payload(ndr, NDR_SCALARS, &r->u));
1838 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1840 if (ndr_flags & NDR_BUFFERS) {
1841 NDR_CHECK(ndr_pull_dcerpc_payload(ndr, NDR_BUFFERS, &r->u));
1843 return NDR_ERR_SUCCESS;
1846 _PUBLIC_ void ndr_print_ncadg_packet(struct ndr_print *ndr, const char *name, const struct ncadg_packet *r)
1848 ndr_print_struct(ndr, name, "ncadg_packet");
1849 ndr->depth++;
1850 ndr_print_uint8(ndr, "rpc_vers", r->rpc_vers);
1851 ndr_print_uint8(ndr, "ptype", r->ptype);
1852 ndr_print_uint8(ndr, "pfc_flags", r->pfc_flags);
1853 ndr_print_uint8(ndr, "ncadg_flags", r->ncadg_flags);
1854 ndr_print_array_uint8(ndr, "drep", r->drep, 3);
1855 ndr_print_uint8(ndr, "serial_high", r->serial_high);
1856 ndr_print_GUID(ndr, "object", &r->object);
1857 ndr_print_GUID(ndr, "iface", &r->iface);
1858 ndr_print_GUID(ndr, "activity", &r->activity);
1859 ndr_print_uint32(ndr, "server_boot", r->server_boot);
1860 ndr_print_uint32(ndr, "iface_version", r->iface_version);
1861 ndr_print_uint32(ndr, "seq_num", r->seq_num);
1862 ndr_print_uint16(ndr, "opnum", r->opnum);
1863 ndr_print_uint16(ndr, "ihint", r->ihint);
1864 ndr_print_uint16(ndr, "ahint", r->ahint);
1865 ndr_print_uint16(ndr, "len", r->len);
1866 ndr_print_uint16(ndr, "fragnum", r->fragnum);
1867 ndr_print_uint8(ndr, "auth_proto", r->auth_proto);
1868 ndr_print_uint8(ndr, "serial_low", r->serial_low);
1869 ndr_print_set_switch_value(ndr, &r->u, r->ptype);
1870 ndr_print_dcerpc_payload(ndr, "u", &r->u);
1871 ndr->depth--;