Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_orpc.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 0 : _PUBLIC_ enum ndr_err_code ndr_push_COMVERSION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct COMVERSION *r)
8 : {
9 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10 0 : if (ndr_flags & NDR_SCALARS) {
11 0 : NDR_CHECK(ndr_push_align(ndr, 2));
12 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->MajorVersion));
13 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->MinorVersion));
14 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
15 : }
16 0 : if (ndr_flags & NDR_BUFFERS) {
17 0 : }
18 0 : return NDR_ERR_SUCCESS;
19 : }
20 :
21 0 : _PUBLIC_ enum ndr_err_code ndr_pull_COMVERSION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct COMVERSION *r)
22 : {
23 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
24 0 : if (ndr_flags & NDR_SCALARS) {
25 0 : NDR_CHECK(ndr_pull_align(ndr, 2));
26 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->MajorVersion));
27 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->MinorVersion));
28 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
29 : }
30 0 : if (ndr_flags & NDR_BUFFERS) {
31 0 : }
32 0 : return NDR_ERR_SUCCESS;
33 : }
34 :
35 0 : static void ndr_print_flags_COMVERSION(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct COMVERSION *r)
36 : {
37 0 : ndr_print_COMVERSION(ndr, name, r);
38 0 : }
39 :
40 0 : _PUBLIC_ void ndr_print_COMVERSION(struct ndr_print *ndr, const char *name, const struct COMVERSION *r)
41 : {
42 0 : ndr_print_struct(ndr, name, "COMVERSION");
43 0 : if (r == NULL) { ndr_print_null(ndr); return; }
44 0 : ndr->depth++;
45 0 : ndr_print_uint16(ndr, "MajorVersion", r->MajorVersion);
46 0 : ndr_print_uint16(ndr, "MinorVersion", r->MinorVersion);
47 0 : ndr->depth--;
48 : }
49 :
50 0 : _PUBLIC_ enum ndr_err_code ndr_push_ORPC_EXTENT(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ORPC_EXTENT *r)
51 : {
52 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
53 0 : if (ndr_flags & NDR_SCALARS) {
54 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ((r->size + 7) & ~7)));
55 0 : NDR_CHECK(ndr_push_align(ndr, 4));
56 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->id));
57 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
58 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, ((r->size + 7) & ~7)));
59 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
60 : }
61 0 : if (ndr_flags & NDR_BUFFERS) {
62 0 : }
63 0 : return NDR_ERR_SUCCESS;
64 : }
65 :
66 0 : _PUBLIC_ enum ndr_err_code ndr_pull_ORPC_EXTENT(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ORPC_EXTENT *r)
67 : {
68 0 : uint32_t size_data_0 = 0;
69 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
70 0 : if (ndr_flags & NDR_SCALARS) {
71 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
72 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
73 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->id));
74 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
75 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_0));
76 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_0);
77 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
78 0 : if (r->data) {
79 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, ((r->size + 7) & ~7)));
80 : }
81 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
82 : }
83 0 : if (ndr_flags & NDR_BUFFERS) {
84 0 : }
85 0 : return NDR_ERR_SUCCESS;
86 : }
87 :
88 0 : static void ndr_print_flags_ORPC_EXTENT(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ORPC_EXTENT *r)
89 : {
90 0 : ndr_print_ORPC_EXTENT(ndr, name, r);
91 0 : }
92 :
93 0 : _PUBLIC_ void ndr_print_ORPC_EXTENT(struct ndr_print *ndr, const char *name, const struct ORPC_EXTENT *r)
94 : {
95 0 : ndr_print_struct(ndr, name, "ORPC_EXTENT");
96 0 : if (r == NULL) { ndr_print_null(ndr); return; }
97 0 : ndr->depth++;
98 0 : ndr_print_GUID(ndr, "id", &r->id);
99 0 : ndr_print_uint32(ndr, "size", r->size);
100 0 : ndr_print_array_uint8(ndr, "data", r->data, ((r->size + 7) & ~7));
101 0 : ndr->depth--;
102 : }
103 :
104 0 : static enum ndr_err_code ndr_push_ORPC_EXTENT_ARRAY(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ORPC_EXTENT_ARRAY *r)
105 : {
106 0 : uint32_t cntr_extent_1;
107 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
108 0 : if (ndr_flags & NDR_SCALARS) {
109 0 : NDR_CHECK(ndr_push_align(ndr, 5));
110 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
111 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
112 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->extent));
113 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
114 : }
115 0 : if (ndr_flags & NDR_BUFFERS) {
116 0 : if (r->extent) {
117 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ((r->size + 1) & ~1)));
118 0 : for (cntr_extent_1 = 0; cntr_extent_1 < (((r->size + 1) & ~1)); cntr_extent_1++) {
119 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->extent[cntr_extent_1]));
120 : }
121 0 : for (cntr_extent_1 = 0; cntr_extent_1 < (((r->size + 1) & ~1)); cntr_extent_1++) {
122 0 : if (r->extent[cntr_extent_1]) {
123 0 : NDR_CHECK(ndr_push_ORPC_EXTENT(ndr, NDR_SCALARS, r->extent[cntr_extent_1]));
124 : }
125 : }
126 : }
127 : }
128 0 : return NDR_ERR_SUCCESS;
129 : }
130 :
131 0 : static enum ndr_err_code ndr_pull_ORPC_EXTENT_ARRAY(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ORPC_EXTENT_ARRAY *r)
132 : {
133 0 : uint32_t _ptr_extent;
134 0 : uint32_t size_extent_1 = 0;
135 0 : uint32_t cntr_extent_1;
136 0 : TALLOC_CTX *_mem_save_extent_0 = NULL;
137 0 : TALLOC_CTX *_mem_save_extent_1 = NULL;
138 0 : TALLOC_CTX *_mem_save_extent_2 = NULL;
139 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
140 0 : if (ndr_flags & NDR_SCALARS) {
141 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
142 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
143 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
144 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_extent));
145 0 : if (_ptr_extent) {
146 0 : NDR_PULL_ALLOC(ndr, r->extent);
147 : } else {
148 0 : r->extent = NULL;
149 : }
150 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
151 : }
152 0 : if (ndr_flags & NDR_BUFFERS) {
153 0 : if (r->extent) {
154 0 : _mem_save_extent_0 = NDR_PULL_GET_MEM_CTX(ndr);
155 0 : NDR_PULL_SET_MEM_CTX(ndr, r->extent, 0);
156 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->extent));
157 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->extent, &size_extent_1));
158 0 : NDR_PULL_ALLOC_N(ndr, r->extent, size_extent_1);
159 0 : _mem_save_extent_1 = NDR_PULL_GET_MEM_CTX(ndr);
160 0 : NDR_PULL_SET_MEM_CTX(ndr, r->extent, 0);
161 0 : for (cntr_extent_1 = 0; cntr_extent_1 < (size_extent_1); cntr_extent_1++) {
162 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_extent));
163 0 : if (_ptr_extent) {
164 0 : NDR_PULL_ALLOC(ndr, r->extent[cntr_extent_1]);
165 : } else {
166 0 : r->extent[cntr_extent_1] = NULL;
167 : }
168 : }
169 0 : for (cntr_extent_1 = 0; cntr_extent_1 < (size_extent_1); cntr_extent_1++) {
170 0 : if (r->extent[cntr_extent_1]) {
171 0 : _mem_save_extent_2 = NDR_PULL_GET_MEM_CTX(ndr);
172 0 : NDR_PULL_SET_MEM_CTX(ndr, r->extent[cntr_extent_1], 0);
173 0 : NDR_CHECK(ndr_pull_ORPC_EXTENT(ndr, NDR_SCALARS, r->extent[cntr_extent_1]));
174 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_extent_2, 0);
175 : }
176 : }
177 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_extent_1, 0);
178 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_extent_0, 0);
179 : }
180 0 : if (r->extent) {
181 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->extent, ((r->size + 1) & ~1)));
182 : }
183 0 : for (cntr_extent_1 = 0; cntr_extent_1 < (size_extent_1); cntr_extent_1++) {
184 0 : }
185 : }
186 0 : return NDR_ERR_SUCCESS;
187 : }
188 :
189 0 : _PUBLIC_ void ndr_print_ORPC_EXTENT_ARRAY(struct ndr_print *ndr, const char *name, const struct ORPC_EXTENT_ARRAY *r)
190 : {
191 0 : uint32_t cntr_extent_1;
192 0 : ndr_print_struct(ndr, name, "ORPC_EXTENT_ARRAY");
193 0 : if (r == NULL) { ndr_print_null(ndr); return; }
194 0 : ndr->depth++;
195 0 : ndr_print_uint32(ndr, "size", r->size);
196 0 : ndr_print_uint32(ndr, "reserved", r->reserved);
197 0 : ndr_print_ptr(ndr, "extent", r->extent);
198 0 : ndr->depth++;
199 0 : if (r->extent) {
200 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "extent", (uint32_t)(((r->size + 1) & ~1)));
201 0 : ndr->depth++;
202 0 : for (cntr_extent_1 = 0; cntr_extent_1 < (((r->size + 1) & ~1)); cntr_extent_1++) {
203 0 : ndr_print_ptr(ndr, "extent", r->extent[cntr_extent_1]);
204 0 : ndr->depth++;
205 0 : if (r->extent[cntr_extent_1]) {
206 0 : ndr_print_ORPC_EXTENT(ndr, "extent", r->extent[cntr_extent_1]);
207 : }
208 0 : ndr->depth--;
209 : }
210 0 : ndr->depth--;
211 : }
212 0 : ndr->depth--;
213 0 : ndr->depth--;
214 : }
215 :
216 0 : _PUBLIC_ enum ndr_err_code ndr_push_ORPCTHIS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ORPCTHIS *r)
217 : {
218 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
219 0 : if (ndr_flags & NDR_SCALARS) {
220 0 : NDR_CHECK(ndr_push_align(ndr, 5));
221 0 : NDR_CHECK(ndr_push_COMVERSION(ndr, NDR_SCALARS, &r->version));
222 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
223 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved1));
224 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->cid));
225 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->extensions));
226 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
227 : }
228 0 : if (ndr_flags & NDR_BUFFERS) {
229 0 : if (r->extensions) {
230 0 : NDR_CHECK(ndr_push_ORPC_EXTENT_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->extensions));
231 : }
232 : }
233 0 : return NDR_ERR_SUCCESS;
234 : }
235 :
236 0 : _PUBLIC_ enum ndr_err_code ndr_pull_ORPCTHIS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ORPCTHIS *r)
237 : {
238 0 : uint32_t _ptr_extensions;
239 0 : TALLOC_CTX *_mem_save_extensions_0 = NULL;
240 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
241 0 : if (ndr_flags & NDR_SCALARS) {
242 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
243 0 : NDR_CHECK(ndr_pull_COMVERSION(ndr, NDR_SCALARS, &r->version));
244 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
245 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
246 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->cid));
247 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_extensions));
248 0 : if (_ptr_extensions) {
249 0 : NDR_PULL_ALLOC(ndr, r->extensions);
250 : } else {
251 0 : r->extensions = NULL;
252 : }
253 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
254 : }
255 0 : if (ndr_flags & NDR_BUFFERS) {
256 0 : if (r->extensions) {
257 0 : _mem_save_extensions_0 = NDR_PULL_GET_MEM_CTX(ndr);
258 0 : NDR_PULL_SET_MEM_CTX(ndr, r->extensions, 0);
259 0 : NDR_CHECK(ndr_pull_ORPC_EXTENT_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->extensions));
260 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_extensions_0, 0);
261 : }
262 : }
263 0 : return NDR_ERR_SUCCESS;
264 : }
265 :
266 0 : static void ndr_print_flags_ORPCTHIS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ORPCTHIS *r)
267 : {
268 0 : ndr_print_ORPCTHIS(ndr, name, r);
269 0 : }
270 :
271 0 : _PUBLIC_ void ndr_print_ORPCTHIS(struct ndr_print *ndr, const char *name, const struct ORPCTHIS *r)
272 : {
273 0 : ndr_print_struct(ndr, name, "ORPCTHIS");
274 0 : if (r == NULL) { ndr_print_null(ndr); return; }
275 0 : ndr->depth++;
276 0 : ndr_print_COMVERSION(ndr, "version", &r->version);
277 0 : ndr_print_uint32(ndr, "flags", r->flags);
278 0 : ndr_print_uint32(ndr, "reserved1", r->reserved1);
279 0 : ndr_print_GUID(ndr, "cid", &r->cid);
280 0 : ndr_print_ptr(ndr, "extensions", r->extensions);
281 0 : ndr->depth++;
282 0 : if (r->extensions) {
283 0 : ndr_print_ORPC_EXTENT_ARRAY(ndr, "extensions", r->extensions);
284 : }
285 0 : ndr->depth--;
286 0 : ndr->depth--;
287 : }
288 :
289 0 : _PUBLIC_ enum ndr_err_code ndr_push_ORPCTHAT(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ORPCTHAT *r)
290 : {
291 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
292 0 : if (ndr_flags & NDR_SCALARS) {
293 0 : NDR_CHECK(ndr_push_align(ndr, 5));
294 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
295 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->extensions));
296 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
297 : }
298 0 : if (ndr_flags & NDR_BUFFERS) {
299 0 : if (r->extensions) {
300 0 : NDR_CHECK(ndr_push_ORPC_EXTENT_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->extensions));
301 : }
302 : }
303 0 : return NDR_ERR_SUCCESS;
304 : }
305 :
306 0 : _PUBLIC_ enum ndr_err_code ndr_pull_ORPCTHAT(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ORPCTHAT *r)
307 : {
308 0 : uint32_t _ptr_extensions;
309 0 : TALLOC_CTX *_mem_save_extensions_0 = NULL;
310 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
311 0 : if (ndr_flags & NDR_SCALARS) {
312 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
313 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
314 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_extensions));
315 0 : if (_ptr_extensions) {
316 0 : NDR_PULL_ALLOC(ndr, r->extensions);
317 : } else {
318 0 : r->extensions = NULL;
319 : }
320 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
321 : }
322 0 : if (ndr_flags & NDR_BUFFERS) {
323 0 : if (r->extensions) {
324 0 : _mem_save_extensions_0 = NDR_PULL_GET_MEM_CTX(ndr);
325 0 : NDR_PULL_SET_MEM_CTX(ndr, r->extensions, 0);
326 0 : NDR_CHECK(ndr_pull_ORPC_EXTENT_ARRAY(ndr, NDR_SCALARS|NDR_BUFFERS, r->extensions));
327 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_extensions_0, 0);
328 : }
329 : }
330 0 : return NDR_ERR_SUCCESS;
331 : }
332 :
333 0 : static void ndr_print_flags_ORPCTHAT(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ORPCTHAT *r)
334 : {
335 0 : ndr_print_ORPCTHAT(ndr, name, r);
336 0 : }
337 :
338 0 : _PUBLIC_ void ndr_print_ORPCTHAT(struct ndr_print *ndr, const char *name, const struct ORPCTHAT *r)
339 : {
340 0 : ndr_print_struct(ndr, name, "ORPCTHAT");
341 0 : if (r == NULL) { ndr_print_null(ndr); return; }
342 0 : ndr->depth++;
343 0 : ndr_print_uint32(ndr, "flags", r->flags);
344 0 : ndr_print_ptr(ndr, "extensions", r->extensions);
345 0 : ndr->depth++;
346 0 : if (r->extensions) {
347 0 : ndr_print_ORPC_EXTENT_ARRAY(ndr, "extensions", r->extensions);
348 : }
349 0 : ndr->depth--;
350 0 : ndr->depth--;
351 : }
352 :
353 0 : _PUBLIC_ enum ndr_err_code ndr_push_STRINGBINDING(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct STRINGBINDING *r)
354 : {
355 : {
356 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
357 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
358 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
359 0 : if (ndr_flags & NDR_SCALARS) {
360 0 : NDR_CHECK(ndr_push_align(ndr, 4));
361 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wTowerId));
362 : {
363 0 : libndr_flags _flags_save_string = ndr->flags;
364 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
365 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->NetworkAddr));
366 0 : ndr->flags = _flags_save_string;
367 : }
368 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
369 : }
370 0 : if (ndr_flags & NDR_BUFFERS) {
371 0 : }
372 0 : ndr->flags = _flags_save_STRUCT;
373 : }
374 0 : return NDR_ERR_SUCCESS;
375 : }
376 :
377 0 : _PUBLIC_ enum ndr_err_code ndr_pull_STRINGBINDING(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct STRINGBINDING *r)
378 : {
379 : {
380 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
381 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
382 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
383 0 : if (ndr_flags & NDR_SCALARS) {
384 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
385 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wTowerId));
386 : {
387 0 : libndr_flags _flags_save_string = ndr->flags;
388 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
389 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->NetworkAddr));
390 0 : ndr->flags = _flags_save_string;
391 : }
392 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
393 : }
394 0 : if (ndr_flags & NDR_BUFFERS) {
395 0 : }
396 0 : ndr->flags = _flags_save_STRUCT;
397 : }
398 0 : return NDR_ERR_SUCCESS;
399 : }
400 :
401 0 : static void ndr_print_flags_STRINGBINDING(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct STRINGBINDING *r)
402 : {
403 0 : ndr_print_STRINGBINDING(ndr, name, r);
404 0 : }
405 :
406 0 : _PUBLIC_ void ndr_print_STRINGBINDING(struct ndr_print *ndr, const char *name, const struct STRINGBINDING *r)
407 : {
408 0 : ndr_print_struct(ndr, name, "STRINGBINDING");
409 0 : if (r == NULL) { ndr_print_null(ndr); return; }
410 : {
411 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
412 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
413 0 : ndr->depth++;
414 0 : ndr_print_uint16(ndr, "wTowerId", r->wTowerId);
415 : {
416 0 : libndr_flags _flags_save_string = ndr->flags;
417 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
418 0 : ndr_print_string(ndr, "NetworkAddr", r->NetworkAddr);
419 0 : ndr->flags = _flags_save_string;
420 : }
421 0 : ndr->depth--;
422 0 : ndr->flags = _flags_save_STRUCT;
423 : }
424 : }
425 :
426 0 : static void ndr_print_flags_STRINGARRAY(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct STRINGARRAY *r)
427 : {
428 0 : ndr_print_STRINGARRAY(ndr, name, r);
429 0 : }
430 :
431 0 : static void ndr_print_flags_DUALSTRINGARRAY(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct DUALSTRINGARRAY *r)
432 : {
433 0 : ndr_print_DUALSTRINGARRAY(ndr, name, r);
434 0 : }
435 :
436 0 : _PUBLIC_ enum ndr_err_code ndr_push_SECURITYBINDING(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SECURITYBINDING *r)
437 : {
438 : {
439 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
440 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
441 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
442 0 : if (ndr_flags & NDR_SCALARS) {
443 0 : NDR_CHECK(ndr_push_align(ndr, 4));
444 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wAuthnSvc));
445 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wAuthzSvc));
446 : {
447 0 : libndr_flags _flags_save_string = ndr->flags;
448 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
449 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->PrincName));
450 0 : ndr->flags = _flags_save_string;
451 : }
452 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
453 : }
454 0 : if (ndr_flags & NDR_BUFFERS) {
455 0 : }
456 0 : ndr->flags = _flags_save_STRUCT;
457 : }
458 0 : return NDR_ERR_SUCCESS;
459 : }
460 :
461 0 : _PUBLIC_ enum ndr_err_code ndr_pull_SECURITYBINDING(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SECURITYBINDING *r)
462 : {
463 : {
464 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
465 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
466 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
467 0 : if (ndr_flags & NDR_SCALARS) {
468 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
469 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wAuthnSvc));
470 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wAuthzSvc));
471 : {
472 0 : libndr_flags _flags_save_string = ndr->flags;
473 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
474 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->PrincName));
475 0 : ndr->flags = _flags_save_string;
476 : }
477 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
478 : }
479 0 : if (ndr_flags & NDR_BUFFERS) {
480 0 : }
481 0 : ndr->flags = _flags_save_STRUCT;
482 : }
483 0 : return NDR_ERR_SUCCESS;
484 : }
485 :
486 0 : static void ndr_print_flags_SECURITYBINDING(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct SECURITYBINDING *r)
487 : {
488 0 : ndr_print_SECURITYBINDING(ndr, name, r);
489 0 : }
490 :
491 0 : _PUBLIC_ void ndr_print_SECURITYBINDING(struct ndr_print *ndr, const char *name, const struct SECURITYBINDING *r)
492 : {
493 0 : ndr_print_struct(ndr, name, "SECURITYBINDING");
494 0 : if (r == NULL) { ndr_print_null(ndr); return; }
495 : {
496 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
497 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
498 0 : ndr->depth++;
499 0 : ndr_print_uint16(ndr, "wAuthnSvc", r->wAuthnSvc);
500 0 : ndr_print_uint16(ndr, "wAuthzSvc", r->wAuthzSvc);
501 : {
502 0 : libndr_flags _flags_save_string = ndr->flags;
503 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
504 0 : ndr_print_string(ndr, "PrincName", r->PrincName);
505 0 : ndr->flags = _flags_save_string;
506 : }
507 0 : ndr->depth--;
508 0 : ndr->flags = _flags_save_STRUCT;
509 : }
510 : }
511 :
512 0 : _PUBLIC_ enum ndr_err_code ndr_push_STDOBJREF(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct STDOBJREF *r)
513 : {
514 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
515 0 : if (ndr_flags & NDR_SCALARS) {
516 0 : NDR_CHECK(ndr_push_align(ndr, 8));
517 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
518 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cPublicRefs));
519 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->oxid));
520 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->oid));
521 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ipid));
522 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
523 : }
524 0 : if (ndr_flags & NDR_BUFFERS) {
525 0 : }
526 0 : return NDR_ERR_SUCCESS;
527 : }
528 :
529 0 : _PUBLIC_ enum ndr_err_code ndr_pull_STDOBJREF(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct STDOBJREF *r)
530 : {
531 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
532 0 : if (ndr_flags & NDR_SCALARS) {
533 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
534 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
535 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cPublicRefs));
536 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->oxid));
537 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->oid));
538 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ipid));
539 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
540 : }
541 0 : if (ndr_flags & NDR_BUFFERS) {
542 0 : }
543 0 : return NDR_ERR_SUCCESS;
544 : }
545 :
546 0 : static void ndr_print_flags_STDOBJREF(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct STDOBJREF *r)
547 : {
548 0 : ndr_print_STDOBJREF(ndr, name, r);
549 0 : }
550 :
551 0 : _PUBLIC_ void ndr_print_STDOBJREF(struct ndr_print *ndr, const char *name, const struct STDOBJREF *r)
552 : {
553 0 : ndr_print_struct(ndr, name, "STDOBJREF");
554 0 : if (r == NULL) { ndr_print_null(ndr); return; }
555 0 : ndr->depth++;
556 0 : ndr_print_uint32(ndr, "flags", r->flags);
557 0 : ndr_print_uint32(ndr, "cPublicRefs", r->cPublicRefs);
558 0 : ndr_print_hyper(ndr, "oxid", r->oxid);
559 0 : ndr_print_hyper(ndr, "oid", r->oid);
560 0 : ndr_print_GUID(ndr, "ipid", &r->ipid);
561 0 : ndr->depth--;
562 : }
563 :
564 0 : static enum ndr_err_code ndr_push_u_standard(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct u_standard *r)
565 : {
566 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
567 0 : if (ndr_flags & NDR_SCALARS) {
568 0 : NDR_CHECK(ndr_push_align(ndr, 8));
569 0 : NDR_CHECK(ndr_push_STDOBJREF(ndr, NDR_SCALARS, &r->std));
570 0 : NDR_CHECK(ndr_push_STRINGARRAY(ndr, NDR_SCALARS, &r->saResAddr));
571 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
572 : }
573 0 : if (ndr_flags & NDR_BUFFERS) {
574 0 : NDR_CHECK(ndr_push_STRINGARRAY(ndr, NDR_BUFFERS, &r->saResAddr));
575 : }
576 0 : return NDR_ERR_SUCCESS;
577 : }
578 :
579 0 : static enum ndr_err_code ndr_pull_u_standard(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct u_standard *r)
580 : {
581 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
582 0 : if (ndr_flags & NDR_SCALARS) {
583 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
584 0 : NDR_CHECK(ndr_pull_STDOBJREF(ndr, NDR_SCALARS, &r->std));
585 0 : NDR_CHECK(ndr_pull_STRINGARRAY(ndr, NDR_SCALARS, &r->saResAddr));
586 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
587 : }
588 0 : if (ndr_flags & NDR_BUFFERS) {
589 0 : NDR_CHECK(ndr_pull_STRINGARRAY(ndr, NDR_BUFFERS, &r->saResAddr));
590 : }
591 0 : return NDR_ERR_SUCCESS;
592 : }
593 :
594 0 : _PUBLIC_ void ndr_print_u_standard(struct ndr_print *ndr, const char *name, const struct u_standard *r)
595 : {
596 0 : ndr_print_struct(ndr, name, "u_standard");
597 0 : if (r == NULL) { ndr_print_null(ndr); return; }
598 0 : ndr->depth++;
599 0 : ndr_print_STDOBJREF(ndr, "std", &r->std);
600 0 : ndr_print_STRINGARRAY(ndr, "saResAddr", &r->saResAddr);
601 0 : ndr->depth--;
602 : }
603 :
604 0 : static enum ndr_err_code ndr_push_u_handler(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct u_handler *r)
605 : {
606 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
607 0 : if (ndr_flags & NDR_SCALARS) {
608 0 : NDR_CHECK(ndr_push_align(ndr, 8));
609 0 : NDR_CHECK(ndr_push_STDOBJREF(ndr, NDR_SCALARS, &r->std));
610 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->clsid));
611 0 : NDR_CHECK(ndr_push_STRINGARRAY(ndr, NDR_SCALARS, &r->saResAddr));
612 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
613 : }
614 0 : if (ndr_flags & NDR_BUFFERS) {
615 0 : NDR_CHECK(ndr_push_STRINGARRAY(ndr, NDR_BUFFERS, &r->saResAddr));
616 : }
617 0 : return NDR_ERR_SUCCESS;
618 : }
619 :
620 0 : static enum ndr_err_code ndr_pull_u_handler(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct u_handler *r)
621 : {
622 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
623 0 : if (ndr_flags & NDR_SCALARS) {
624 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
625 0 : NDR_CHECK(ndr_pull_STDOBJREF(ndr, NDR_SCALARS, &r->std));
626 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->clsid));
627 0 : NDR_CHECK(ndr_pull_STRINGARRAY(ndr, NDR_SCALARS, &r->saResAddr));
628 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
629 : }
630 0 : if (ndr_flags & NDR_BUFFERS) {
631 0 : NDR_CHECK(ndr_pull_STRINGARRAY(ndr, NDR_BUFFERS, &r->saResAddr));
632 : }
633 0 : return NDR_ERR_SUCCESS;
634 : }
635 :
636 0 : _PUBLIC_ void ndr_print_u_handler(struct ndr_print *ndr, const char *name, const struct u_handler *r)
637 : {
638 0 : ndr_print_struct(ndr, name, "u_handler");
639 0 : if (r == NULL) { ndr_print_null(ndr); return; }
640 0 : ndr->depth++;
641 0 : ndr_print_STDOBJREF(ndr, "std", &r->std);
642 0 : ndr_print_GUID(ndr, "clsid", &r->clsid);
643 0 : ndr_print_STRINGARRAY(ndr, "saResAddr", &r->saResAddr);
644 0 : ndr->depth--;
645 : }
646 :
647 0 : static enum ndr_err_code ndr_push_u_custom(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct u_custom *r)
648 : {
649 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
650 0 : if (ndr_flags & NDR_SCALARS) {
651 0 : NDR_CHECK(ndr_push_align(ndr, 4));
652 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->clsid));
653 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cbExtension));
654 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
655 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pData, r->size));
656 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
657 : }
658 0 : if (ndr_flags & NDR_BUFFERS) {
659 0 : }
660 0 : return NDR_ERR_SUCCESS;
661 : }
662 :
663 0 : static enum ndr_err_code ndr_pull_u_custom(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct u_custom *r)
664 : {
665 0 : uint32_t size_pData_0 = 0;
666 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
667 0 : if (ndr_flags & NDR_SCALARS) {
668 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
669 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->clsid));
670 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cbExtension));
671 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
672 0 : size_pData_0 = r->size;
673 0 : NDR_PULL_ALLOC_N(ndr, r->pData, size_pData_0);
674 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pData, size_pData_0));
675 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
676 : }
677 0 : if (ndr_flags & NDR_BUFFERS) {
678 0 : }
679 0 : return NDR_ERR_SUCCESS;
680 : }
681 :
682 0 : _PUBLIC_ void ndr_print_u_custom(struct ndr_print *ndr, const char *name, const struct u_custom *r)
683 : {
684 0 : ndr_print_struct(ndr, name, "u_custom");
685 0 : if (r == NULL) { ndr_print_null(ndr); return; }
686 0 : ndr->depth++;
687 0 : ndr_print_GUID(ndr, "clsid", &r->clsid);
688 0 : ndr_print_uint32(ndr, "cbExtension", r->cbExtension);
689 0 : ndr_print_uint32(ndr, "size", r->size);
690 0 : ndr_print_array_uint8(ndr, "pData", r->pData, r->size);
691 0 : ndr->depth--;
692 : }
693 :
694 0 : static enum ndr_err_code ndr_push_u_null(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct u_null *r)
695 : {
696 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
697 0 : if (ndr_flags & NDR_SCALARS) {
698 0 : NDR_CHECK(ndr_push_align(ndr, 1));
699 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
700 : }
701 0 : if (ndr_flags & NDR_BUFFERS) {
702 0 : }
703 0 : return NDR_ERR_SUCCESS;
704 : }
705 :
706 0 : static enum ndr_err_code ndr_pull_u_null(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct u_null *r)
707 : {
708 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
709 0 : if (ndr_flags & NDR_SCALARS) {
710 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
711 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
712 : }
713 0 : if (ndr_flags & NDR_BUFFERS) {
714 0 : }
715 0 : return NDR_ERR_SUCCESS;
716 : }
717 :
718 0 : _PUBLIC_ void ndr_print_u_null(struct ndr_print *ndr, const char *name, const struct u_null *r)
719 : {
720 0 : ndr_print_struct(ndr, name, "u_null");
721 0 : if (r == NULL) { ndr_print_null(ndr); return; }
722 0 : ndr->depth++;
723 0 : ndr->depth--;
724 : }
725 :
726 0 : static enum ndr_err_code ndr_push_OBJREF_Types(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union OBJREF_Types *r)
727 : {
728 0 : uint32_t level;
729 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
730 0 : if (ndr_flags & NDR_SCALARS) {
731 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
732 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
733 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
734 0 : switch (level) {
735 0 : case OBJREF_NULL: {
736 0 : NDR_CHECK(ndr_push_u_null(ndr, NDR_SCALARS, &r->u_null));
737 0 : break; }
738 :
739 0 : case OBJREF_STANDARD: {
740 0 : NDR_CHECK(ndr_push_u_standard(ndr, NDR_SCALARS, &r->u_standard));
741 0 : break; }
742 :
743 0 : case OBJREF_HANDLER: {
744 0 : NDR_CHECK(ndr_push_u_handler(ndr, NDR_SCALARS, &r->u_handler));
745 0 : break; }
746 :
747 0 : case OBJREF_CUSTOM: {
748 0 : NDR_CHECK(ndr_push_u_custom(ndr, NDR_SCALARS, &r->u_custom));
749 0 : break; }
750 :
751 0 : default:
752 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
753 : }
754 : }
755 0 : if (ndr_flags & NDR_BUFFERS) {
756 0 : if (!(ndr_flags & NDR_SCALARS)) {
757 : /* We didn't get it above, and the token is not needed after this. */
758 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
759 : }
760 0 : switch (level) {
761 0 : case OBJREF_NULL:
762 0 : break;
763 :
764 0 : case OBJREF_STANDARD:
765 0 : NDR_CHECK(ndr_push_u_standard(ndr, NDR_BUFFERS, &r->u_standard));
766 0 : break;
767 :
768 0 : case OBJREF_HANDLER:
769 0 : NDR_CHECK(ndr_push_u_handler(ndr, NDR_BUFFERS, &r->u_handler));
770 0 : break;
771 :
772 0 : case OBJREF_CUSTOM:
773 0 : break;
774 :
775 0 : default:
776 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
777 : }
778 : }
779 0 : return NDR_ERR_SUCCESS;
780 : }
781 :
782 0 : static enum ndr_err_code ndr_pull_OBJREF_Types(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union OBJREF_Types *r)
783 : {
784 0 : uint32_t level;
785 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
786 0 : if (ndr_flags & NDR_SCALARS) {
787 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
788 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
789 0 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
790 0 : switch (level) {
791 0 : case OBJREF_NULL: {
792 0 : NDR_CHECK(ndr_pull_u_null(ndr, NDR_SCALARS, &r->u_null));
793 0 : break; }
794 :
795 0 : case OBJREF_STANDARD: {
796 0 : NDR_CHECK(ndr_pull_u_standard(ndr, NDR_SCALARS, &r->u_standard));
797 0 : break; }
798 :
799 0 : case OBJREF_HANDLER: {
800 0 : NDR_CHECK(ndr_pull_u_handler(ndr, NDR_SCALARS, &r->u_handler));
801 0 : break; }
802 :
803 0 : case OBJREF_CUSTOM: {
804 0 : NDR_CHECK(ndr_pull_u_custom(ndr, NDR_SCALARS, &r->u_custom));
805 0 : break; }
806 :
807 0 : default:
808 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
809 : }
810 : }
811 0 : if (ndr_flags & NDR_BUFFERS) {
812 0 : if (!(ndr_flags & NDR_SCALARS)) {
813 : /* We didn't get it above, and the token is not needed after this. */
814 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
815 : }
816 0 : switch (level) {
817 0 : case OBJREF_NULL:
818 0 : break;
819 :
820 0 : case OBJREF_STANDARD:
821 0 : NDR_CHECK(ndr_pull_u_standard(ndr, NDR_BUFFERS, &r->u_standard));
822 0 : break;
823 :
824 0 : case OBJREF_HANDLER:
825 0 : NDR_CHECK(ndr_pull_u_handler(ndr, NDR_BUFFERS, &r->u_handler));
826 0 : break;
827 :
828 0 : case OBJREF_CUSTOM:
829 0 : break;
830 :
831 0 : default:
832 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
833 : }
834 : }
835 0 : return NDR_ERR_SUCCESS;
836 : }
837 :
838 0 : _PUBLIC_ void ndr_print_OBJREF_Types(struct ndr_print *ndr, const char *name, const union OBJREF_Types *r)
839 : {
840 0 : uint32_t level;
841 0 : level = ndr_print_steal_switch_value(ndr, r);
842 0 : ndr_print_union(ndr, name, level, "OBJREF_Types");
843 0 : switch (level) {
844 0 : case OBJREF_NULL:
845 0 : ndr_print_u_null(ndr, "u_null", &r->u_null);
846 0 : break;
847 :
848 0 : case OBJREF_STANDARD:
849 0 : ndr_print_u_standard(ndr, "u_standard", &r->u_standard);
850 0 : break;
851 :
852 0 : case OBJREF_HANDLER:
853 0 : ndr_print_u_handler(ndr, "u_handler", &r->u_handler);
854 0 : break;
855 :
856 0 : case OBJREF_CUSTOM:
857 0 : ndr_print_u_custom(ndr, "u_custom", &r->u_custom);
858 0 : break;
859 :
860 0 : default:
861 0 : ndr_print_bad_level(ndr, name, level);
862 : }
863 0 : }
864 :
865 0 : _PUBLIC_ enum ndr_err_code ndr_push_OBJREF(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct OBJREF *r)
866 : {
867 : {
868 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
869 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
870 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
871 0 : if (ndr_flags & NDR_SCALARS) {
872 0 : NDR_CHECK(ndr_push_align(ndr, 8));
873 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->signature));
874 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
875 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->iid));
876 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u_objref, r->flags));
877 0 : NDR_CHECK(ndr_push_OBJREF_Types(ndr, NDR_SCALARS, &r->u_objref));
878 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
879 : }
880 0 : if (ndr_flags & NDR_BUFFERS) {
881 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u_objref, r->flags));
882 0 : NDR_CHECK(ndr_push_OBJREF_Types(ndr, NDR_BUFFERS, &r->u_objref));
883 : }
884 0 : ndr->flags = _flags_save_STRUCT;
885 : }
886 0 : return NDR_ERR_SUCCESS;
887 : }
888 :
889 0 : _PUBLIC_ enum ndr_err_code ndr_pull_OBJREF(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct OBJREF *r)
890 : {
891 : {
892 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
893 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
894 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
895 0 : if (ndr_flags & NDR_SCALARS) {
896 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
897 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->signature));
898 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
899 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->iid));
900 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u_objref, r->flags));
901 0 : NDR_CHECK(ndr_pull_OBJREF_Types(ndr, NDR_SCALARS, &r->u_objref));
902 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
903 : }
904 0 : if (ndr_flags & NDR_BUFFERS) {
905 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u_objref, r->flags));
906 0 : NDR_CHECK(ndr_pull_OBJREF_Types(ndr, NDR_BUFFERS, &r->u_objref));
907 : }
908 0 : ndr->flags = _flags_save_STRUCT;
909 : }
910 0 : return NDR_ERR_SUCCESS;
911 : }
912 :
913 0 : static void ndr_print_flags_OBJREF(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct OBJREF *r)
914 : {
915 0 : ndr_print_OBJREF(ndr, name, r);
916 0 : }
917 :
918 0 : _PUBLIC_ void ndr_print_OBJREF(struct ndr_print *ndr, const char *name, const struct OBJREF *r)
919 : {
920 0 : ndr_print_struct(ndr, name, "OBJREF");
921 0 : if (r == NULL) { ndr_print_null(ndr); return; }
922 : {
923 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
924 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
925 0 : ndr->depth++;
926 0 : ndr_print_uint32(ndr, "signature", r->signature);
927 0 : ndr_print_uint32(ndr, "flags", r->flags);
928 0 : ndr_print_GUID(ndr, "iid", &r->iid);
929 0 : ndr_print_set_switch_value(ndr, &r->u_objref, r->flags);
930 0 : ndr_print_OBJREF_Types(ndr, "u_objref", &r->u_objref);
931 0 : ndr->depth--;
932 0 : ndr->flags = _flags_save_STRUCT;
933 : }
934 : }
935 :
936 0 : _PUBLIC_ enum ndr_err_code ndr_push_MInterfacePointer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct MInterfacePointer *r)
937 : {
938 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
939 0 : if (ndr_flags & NDR_SCALARS) {
940 0 : NDR_CHECK(ndr_push_align(ndr, 4));
941 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
942 : {
943 0 : struct ndr_push *_ndr_obj;
944 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_obj, 4, -1));
945 0 : NDR_CHECK(ndr_push_OBJREF(_ndr_obj, NDR_SCALARS|NDR_BUFFERS, &r->obj));
946 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_obj, 4, -1));
947 : }
948 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
949 : }
950 0 : if (ndr_flags & NDR_BUFFERS) {
951 0 : }
952 0 : return NDR_ERR_SUCCESS;
953 : }
954 :
955 0 : _PUBLIC_ enum ndr_err_code ndr_pull_MInterfacePointer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct MInterfacePointer *r)
956 : {
957 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
958 0 : if (ndr_flags & NDR_SCALARS) {
959 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
960 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
961 : {
962 0 : struct ndr_pull *_ndr_obj;
963 0 : ssize_t sub_size = -1;
964 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_obj, 4, sub_size));
965 0 : NDR_CHECK(ndr_pull_OBJREF(_ndr_obj, NDR_SCALARS|NDR_BUFFERS, &r->obj));
966 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_obj, 4, sub_size));
967 : }
968 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
969 : }
970 0 : if (ndr_flags & NDR_BUFFERS) {
971 0 : }
972 0 : return NDR_ERR_SUCCESS;
973 : }
974 :
975 0 : static void ndr_print_flags_MInterfacePointer(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct MInterfacePointer *r)
976 : {
977 0 : ndr_print_MInterfacePointer(ndr, name, r);
978 0 : }
979 :
980 0 : _PUBLIC_ void ndr_print_MInterfacePointer(struct ndr_print *ndr, const char *name, const struct MInterfacePointer *r)
981 : {
982 0 : ndr_print_struct(ndr, name, "MInterfacePointer");
983 0 : if (r == NULL) { ndr_print_null(ndr); return; }
984 0 : ndr->depth++;
985 0 : ndr_print_uint32(ndr, "size", r->size);
986 0 : ndr_print_OBJREF(ndr, "obj", &r->obj);
987 0 : ndr->depth--;
988 : }
989 :
990 0 : _PUBLIC_ enum ndr_err_code ndr_push_COMRESULT(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum COMRESULT r)
991 : {
992 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
993 0 : return NDR_ERR_SUCCESS;
994 : }
995 :
996 0 : _PUBLIC_ enum ndr_err_code ndr_pull_COMRESULT(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum COMRESULT *r)
997 : {
998 0 : uint32_t v;
999 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1000 0 : *r = v;
1001 0 : return NDR_ERR_SUCCESS;
1002 : }
1003 :
1004 0 : _PUBLIC_ void ndr_print_COMRESULT(struct ndr_print *ndr, const char *name, enum COMRESULT r)
1005 : {
1006 0 : const char *val = NULL;
1007 :
1008 0 : switch (r) {
1009 0 : case COM_OK: val = "COM_OK"; break;
1010 0 : case COM_OUTOFMEMORY: val = "COM_OUTOFMEMORY"; break;
1011 0 : case COM_INVALIDARG: val = "COM_INVALIDARG"; break;
1012 0 : case COM_NOINTERFACE: val = "COM_NOINTERFACE"; break;
1013 0 : case COM_ACCESSDENIED: val = "COM_ACCESSDENIED"; break;
1014 0 : case COM_INVALID_OXID: val = "COM_INVALID_OXID"; break;
1015 0 : case COM_INVALID_OID: val = "COM_INVALID_OID"; break;
1016 0 : case COM_INVALID_SET: val = "COM_INVALID_SET"; break;
1017 0 : case COM_UNEXPECTED: val = "COM_UNEXPECTED"; break;
1018 0 : case COM_CLSNOTFOUND: val = "COM_CLSNOTFOUND"; break;
1019 : }
1020 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1021 0 : }
1022 :
1023 : #ifndef SKIP_NDR_TABLE_ObjectRpcBaseTypes
1024 : static const struct ndr_interface_public_struct ObjectRpcBaseTypes_public_structs[] = {
1025 : {
1026 : .name = "COMVERSION",
1027 : .struct_size = sizeof(struct COMVERSION ),
1028 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_COMVERSION,
1029 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_COMVERSION,
1030 : .ndr_print = (ndr_print_function_t) ndr_print_flags_COMVERSION,
1031 : },
1032 : {
1033 : .name = "ORPC_EXTENT",
1034 : .struct_size = sizeof(struct ORPC_EXTENT ),
1035 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ORPC_EXTENT,
1036 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ORPC_EXTENT,
1037 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ORPC_EXTENT,
1038 : },
1039 : {
1040 : .name = "ORPCTHIS",
1041 : .struct_size = sizeof(struct ORPCTHIS ),
1042 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ORPCTHIS,
1043 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ORPCTHIS,
1044 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ORPCTHIS,
1045 : },
1046 : {
1047 : .name = "ORPCTHAT",
1048 : .struct_size = sizeof(struct ORPCTHAT ),
1049 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ORPCTHAT,
1050 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ORPCTHAT,
1051 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ORPCTHAT,
1052 : },
1053 : {
1054 : .name = "STRINGBINDING",
1055 : .struct_size = sizeof(struct STRINGBINDING ),
1056 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_STRINGBINDING,
1057 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_STRINGBINDING,
1058 : .ndr_print = (ndr_print_function_t) ndr_print_flags_STRINGBINDING,
1059 : },
1060 : {
1061 : .name = "STRINGARRAY",
1062 : .struct_size = sizeof(struct STRINGARRAY ),
1063 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_STRINGARRAY,
1064 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_STRINGARRAY,
1065 : .ndr_print = (ndr_print_function_t) ndr_print_flags_STRINGARRAY,
1066 : },
1067 : {
1068 : .name = "DUALSTRINGARRAY",
1069 : .struct_size = sizeof(struct DUALSTRINGARRAY ),
1070 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_DUALSTRINGARRAY,
1071 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_DUALSTRINGARRAY,
1072 : .ndr_print = (ndr_print_function_t) ndr_print_flags_DUALSTRINGARRAY,
1073 : },
1074 : {
1075 : .name = "SECURITYBINDING",
1076 : .struct_size = sizeof(struct SECURITYBINDING ),
1077 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_SECURITYBINDING,
1078 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_SECURITYBINDING,
1079 : .ndr_print = (ndr_print_function_t) ndr_print_flags_SECURITYBINDING,
1080 : },
1081 : {
1082 : .name = "STDOBJREF",
1083 : .struct_size = sizeof(struct STDOBJREF ),
1084 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_STDOBJREF,
1085 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_STDOBJREF,
1086 : .ndr_print = (ndr_print_function_t) ndr_print_flags_STDOBJREF,
1087 : },
1088 : {
1089 : .name = "OBJREF",
1090 : .struct_size = sizeof(struct OBJREF ),
1091 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_OBJREF,
1092 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_OBJREF,
1093 : .ndr_print = (ndr_print_function_t) ndr_print_flags_OBJREF,
1094 : },
1095 : {
1096 : .name = "MInterfacePointer",
1097 : .struct_size = sizeof(struct MInterfacePointer ),
1098 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_MInterfacePointer,
1099 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_MInterfacePointer,
1100 : .ndr_print = (ndr_print_function_t) ndr_print_flags_MInterfacePointer,
1101 : },
1102 : { .name = NULL }
1103 : };
1104 :
1105 : static const struct ndr_interface_call ObjectRpcBaseTypes_calls[] = {
1106 : { .name = NULL }
1107 : };
1108 :
1109 : static const char * const ObjectRpcBaseTypes_endpoint_strings[] = {
1110 : "ncacn_np:[\\pipe\\ObjectRpcBaseTypes]",
1111 : };
1112 :
1113 : static const struct ndr_interface_string_array ObjectRpcBaseTypes_endpoints = {
1114 : .count = 1,
1115 : .names = ObjectRpcBaseTypes_endpoint_strings
1116 : };
1117 :
1118 : static const char * const ObjectRpcBaseTypes_authservice_strings[] = {
1119 : "host",
1120 : };
1121 :
1122 : static const struct ndr_interface_string_array ObjectRpcBaseTypes_authservices = {
1123 : .count = 1,
1124 : .names = ObjectRpcBaseTypes_authservice_strings
1125 : };
1126 :
1127 :
1128 : const struct ndr_interface_table ndr_table_ObjectRpcBaseTypes = {
1129 : .name = "ObjectRpcBaseTypes",
1130 : .num_calls = 0,
1131 : .calls = ObjectRpcBaseTypes_calls,
1132 : .num_public_structs = 11,
1133 : .public_structs = ObjectRpcBaseTypes_public_structs,
1134 : .endpoints = &ObjectRpcBaseTypes_endpoints,
1135 : .authservices = &ObjectRpcBaseTypes_authservices
1136 : };
1137 :
1138 : #endif /* SKIP_NDR_TABLE_ObjectRpcBaseTypes */
|