Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_bkupblobs.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 : #include "librpc/gen_ndr/ndr_fscc.h"
9 0 : static enum ndr_err_code ndr_push_bkup_StreamId(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum bkup_StreamId r)
10 : {
11 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
12 0 : return NDR_ERR_SUCCESS;
13 : }
14 :
15 0 : static enum ndr_err_code ndr_pull_bkup_StreamId(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum bkup_StreamId *r)
16 : {
17 0 : uint32_t v;
18 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
19 0 : *r = v;
20 0 : return NDR_ERR_SUCCESS;
21 : }
22 :
23 0 : _PUBLIC_ void ndr_print_bkup_StreamId(struct ndr_print *ndr, const char *name, enum bkup_StreamId r)
24 : {
25 0 : const char *val = NULL;
26 :
27 0 : switch (r) {
28 0 : case STREAM_ID_DATA: val = "STREAM_ID_DATA"; break;
29 0 : case STREAM_ID_EX_DATA: val = "STREAM_ID_EX_DATA"; break;
30 0 : case STREAM_ID_SECURITY_DATA: val = "STREAM_ID_SECURITY_DATA"; break;
31 0 : case STREAM_ID_ALTERNATE_DATA: val = "STREAM_ID_ALTERNATE_DATA"; break;
32 0 : case STREAM_ID_LINK: val = "STREAM_ID_LINK"; break;
33 0 : case STREAM_ID_OBJECTID: val = "STREAM_ID_OBJECTID"; break;
34 0 : case STREAM_ID_REPARSE_DATA: val = "STREAM_ID_REPARSE_DATA"; break;
35 0 : case STREAM_ID_SPARSE_BLOCK: val = "STREAM_ID_SPARSE_BLOCK"; break;
36 0 : case STREAM_ID_TXFS_DATA: val = "STREAM_ID_TXFS_DATA"; break;
37 : }
38 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
39 0 : }
40 :
41 0 : static enum ndr_err_code ndr_push_bkup_StreamAttribute(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum bkup_StreamAttribute r)
42 : {
43 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
44 0 : return NDR_ERR_SUCCESS;
45 : }
46 :
47 0 : static enum ndr_err_code ndr_pull_bkup_StreamAttribute(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum bkup_StreamAttribute *r)
48 : {
49 0 : uint32_t v;
50 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
51 0 : *r = v;
52 0 : return NDR_ERR_SUCCESS;
53 : }
54 :
55 0 : _PUBLIC_ void ndr_print_bkup_StreamAttribute(struct ndr_print *ndr, const char *name, enum bkup_StreamAttribute r)
56 : {
57 0 : const char *val = NULL;
58 :
59 0 : switch (r) {
60 0 : case STREAM_ATTRIBUTE_NORMAL: val = "STREAM_ATTRIBUTE_NORMAL"; break;
61 0 : case STREAM_ATTRIBUTE_SECURITY: val = "STREAM_ATTRIBUTE_SECURITY"; break;
62 0 : case STREAM_ATTRIBUTE_SPARSE: val = "STREAM_ATTRIBUTE_SPARSE"; break;
63 : }
64 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
65 0 : }
66 :
67 0 : static enum ndr_err_code ndr_push_bkup_StreamData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union bkup_StreamData *r)
68 : {
69 0 : uint32_t level;
70 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
71 0 : if (ndr_flags & NDR_SCALARS) {
72 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
73 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
74 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
75 0 : switch (level) {
76 0 : default: {
77 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
78 0 : break; }
79 :
80 0 : case STREAM_ID_SECURITY_DATA: {
81 : {
82 0 : libndr_flags _flags_save_security_descriptor = ndr->flags;
83 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
84 0 : NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS, &r->sd));
85 0 : ndr->flags = _flags_save_security_descriptor;
86 : }
87 0 : break; }
88 :
89 0 : case STREAM_ID_OBJECTID: {
90 0 : NDR_CHECK(ndr_push_fscc_FileObjectIdBuffer_2(ndr, NDR_SCALARS, &r->object));
91 0 : break; }
92 :
93 : }
94 : }
95 0 : if (ndr_flags & NDR_BUFFERS) {
96 0 : if (!(ndr_flags & NDR_SCALARS)) {
97 : /* We didn't get it above, and the token is not needed after this. */
98 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
99 : }
100 0 : switch (level) {
101 0 : default:
102 0 : break;
103 :
104 0 : case STREAM_ID_SECURITY_DATA:
105 : {
106 0 : libndr_flags _flags_save_security_descriptor = ndr->flags;
107 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
108 0 : NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_BUFFERS, &r->sd));
109 0 : ndr->flags = _flags_save_security_descriptor;
110 : }
111 0 : break;
112 :
113 0 : case STREAM_ID_OBJECTID:
114 0 : break;
115 :
116 : }
117 : }
118 0 : return NDR_ERR_SUCCESS;
119 : }
120 :
121 0 : static enum ndr_err_code ndr_pull_bkup_StreamData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union bkup_StreamData *r)
122 : {
123 0 : uint32_t level;
124 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
125 0 : if (ndr_flags & NDR_SCALARS) {
126 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
127 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
128 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
129 0 : switch (level) {
130 0 : default: {
131 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->blob));
132 0 : break; }
133 :
134 0 : case STREAM_ID_SECURITY_DATA: {
135 : {
136 0 : libndr_flags _flags_save_security_descriptor = ndr->flags;
137 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
138 0 : NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS, &r->sd));
139 0 : ndr->flags = _flags_save_security_descriptor;
140 : }
141 0 : break; }
142 :
143 0 : case STREAM_ID_OBJECTID: {
144 0 : NDR_CHECK(ndr_pull_fscc_FileObjectIdBuffer_2(ndr, NDR_SCALARS, &r->object));
145 0 : break; }
146 :
147 : }
148 : }
149 0 : if (ndr_flags & NDR_BUFFERS) {
150 0 : if (!(ndr_flags & NDR_SCALARS)) {
151 : /* We didn't get it above, and the token is not needed after this. */
152 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
153 : }
154 0 : switch (level) {
155 0 : default:
156 0 : break;
157 :
158 0 : case STREAM_ID_SECURITY_DATA:
159 : {
160 0 : libndr_flags _flags_save_security_descriptor = ndr->flags;
161 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
162 0 : NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_BUFFERS, &r->sd));
163 0 : ndr->flags = _flags_save_security_descriptor;
164 : }
165 0 : break;
166 :
167 0 : case STREAM_ID_OBJECTID:
168 0 : break;
169 :
170 : }
171 : }
172 0 : return NDR_ERR_SUCCESS;
173 : }
174 :
175 0 : _PUBLIC_ void ndr_print_bkup_StreamData(struct ndr_print *ndr, const char *name, const union bkup_StreamData *r)
176 : {
177 0 : uint32_t level;
178 0 : level = ndr_print_steal_switch_value(ndr, r);
179 0 : ndr_print_union(ndr, name, level, "bkup_StreamData");
180 0 : switch (level) {
181 0 : default:
182 0 : ndr_print_DATA_BLOB(ndr, "blob", r->blob);
183 0 : break;
184 :
185 0 : case STREAM_ID_SECURITY_DATA:
186 : {
187 0 : libndr_flags _flags_save_security_descriptor = ndr->flags;
188 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN2);
189 0 : ndr_print_security_descriptor(ndr, "sd", &r->sd);
190 0 : ndr->flags = _flags_save_security_descriptor;
191 : }
192 0 : break;
193 :
194 0 : case STREAM_ID_OBJECTID:
195 0 : ndr_print_fscc_FileObjectIdBuffer_2(ndr, "object", &r->object);
196 0 : break;
197 :
198 : }
199 0 : }
200 :
201 0 : _PUBLIC_ enum ndr_err_code ndr_push_bkup_Win32StreamId(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkup_Win32StreamId *r)
202 : {
203 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
204 0 : if (ndr_flags & NDR_SCALARS) {
205 0 : NDR_CHECK(ndr_push_align(ndr, 8));
206 0 : NDR_CHECK(ndr_push_bkup_StreamId(ndr, NDR_SCALARS, r->id));
207 0 : NDR_CHECK(ndr_push_bkup_StreamAttribute(ndr, NDR_SCALARS, r->attribute));
208 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->size));
209 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stream_name_size));
210 : {
211 0 : libndr_flags _flags_save_uint16 = ndr->flags;
212 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM);
213 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->stream_name, r->stream_name_size, sizeof(uint16_t), CH_UTF16));
214 0 : ndr->flags = _flags_save_uint16;
215 : }
216 : {
217 0 : libndr_flags _flags_save_bkup_StreamData = ndr->flags;
218 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
219 : {
220 0 : struct ndr_push *_ndr_data;
221 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_data, 0, r->size));
222 0 : NDR_CHECK(ndr_push_set_switch_value(_ndr_data, &r->data, r->id));
223 0 : NDR_CHECK(ndr_push_bkup_StreamData(_ndr_data, NDR_SCALARS|NDR_BUFFERS, &r->data));
224 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_data, 0, r->size));
225 : }
226 0 : ndr->flags = _flags_save_bkup_StreamData;
227 : }
228 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
229 : }
230 0 : if (ndr_flags & NDR_BUFFERS) {
231 : {
232 0 : libndr_flags _flags_save_bkup_StreamData = ndr->flags;
233 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
234 0 : ndr->flags = _flags_save_bkup_StreamData;
235 : }
236 : }
237 0 : return NDR_ERR_SUCCESS;
238 : }
239 :
240 0 : _PUBLIC_ enum ndr_err_code ndr_pull_bkup_Win32StreamId(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkup_Win32StreamId *r)
241 : {
242 0 : uint32_t size_stream_name_0 = 0;
243 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
244 0 : if (ndr_flags & NDR_SCALARS) {
245 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
246 0 : NDR_CHECK(ndr_pull_bkup_StreamId(ndr, NDR_SCALARS, &r->id));
247 0 : NDR_CHECK(ndr_pull_bkup_StreamAttribute(ndr, NDR_SCALARS, &r->attribute));
248 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->size));
249 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stream_name_size));
250 : {
251 0 : libndr_flags _flags_save_uint16 = ndr->flags;
252 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM);
253 0 : size_stream_name_0 = r->stream_name_size;
254 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->stream_name, size_stream_name_0, sizeof(uint16_t), CH_UTF16));
255 0 : ndr->flags = _flags_save_uint16;
256 : }
257 : {
258 0 : libndr_flags _flags_save_bkup_StreamData = ndr->flags;
259 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
260 : {
261 0 : struct ndr_pull *_ndr_data;
262 0 : ssize_t sub_size = r->size;
263 0 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_data, 0, sub_size));
264 0 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_data, &r->data, r->id));
265 0 : NDR_CHECK(ndr_pull_bkup_StreamData(_ndr_data, NDR_SCALARS|NDR_BUFFERS, &r->data));
266 0 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_data, 0, sub_size));
267 : }
268 0 : ndr->flags = _flags_save_bkup_StreamData;
269 : }
270 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
271 : }
272 0 : if (ndr_flags & NDR_BUFFERS) {
273 : {
274 0 : libndr_flags _flags_save_bkup_StreamData = ndr->flags;
275 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
276 0 : ndr->flags = _flags_save_bkup_StreamData;
277 : }
278 : }
279 0 : return NDR_ERR_SUCCESS;
280 : }
281 :
282 0 : static void ndr_print_flags_bkup_Win32StreamId(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkup_Win32StreamId *r)
283 : {
284 0 : ndr_print_bkup_Win32StreamId(ndr, name, r);
285 0 : }
286 :
287 0 : _PUBLIC_ void ndr_print_bkup_Win32StreamId(struct ndr_print *ndr, const char *name, const struct bkup_Win32StreamId *r)
288 : {
289 0 : ndr_print_struct(ndr, name, "bkup_Win32StreamId");
290 0 : if (r == NULL) { ndr_print_null(ndr); return; }
291 0 : ndr->depth++;
292 0 : ndr_print_bkup_StreamId(ndr, "id", r->id);
293 0 : ndr_print_bkup_StreamAttribute(ndr, "attribute", r->attribute);
294 0 : ndr_print_hyper(ndr, "size", r->size);
295 0 : ndr_print_uint32(ndr, "stream_name_size", r->stream_name_size);
296 : {
297 0 : libndr_flags _flags_save_uint16 = ndr->flags;
298 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM);
299 0 : ndr_print_string(ndr, "stream_name", r->stream_name);
300 0 : ndr->flags = _flags_save_uint16;
301 : }
302 : {
303 0 : libndr_flags _flags_save_bkup_StreamData = ndr->flags;
304 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
305 0 : ndr_print_set_switch_value(ndr, &r->data, r->id);
306 0 : ndr_print_bkup_StreamData(ndr, "data", &r->data);
307 0 : ndr->flags = _flags_save_bkup_StreamData;
308 : }
309 0 : ndr->depth--;
310 : }
311 :
312 0 : static void ndr_print_flags_bkup_NTBackupFile(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkup_NTBackupFile *r)
313 : {
314 0 : ndr_print_bkup_NTBackupFile(ndr, name, r);
315 0 : }
316 :
317 0 : _PUBLIC_ void ndr_print_bkup_NTBackupFile(struct ndr_print *ndr, const char *name, const struct bkup_NTBackupFile *r)
318 : {
319 0 : uint32_t cntr_streams_0;
320 0 : ndr_print_struct(ndr, name, "bkup_NTBackupFile");
321 0 : if (r == NULL) { ndr_print_null(ndr); return; }
322 : {
323 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
324 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
325 0 : ndr->depth++;
326 0 : ndr_print_uint32(ndr, "num_stream", r->num_stream);
327 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "streams", (uint32_t)(r->num_stream));
328 0 : ndr->depth++;
329 0 : for (cntr_streams_0 = 0; cntr_streams_0 < (r->num_stream); cntr_streams_0++) {
330 0 : ndr_print_bkup_Win32StreamId(ndr, "streams", &r->streams[cntr_streams_0]);
331 : }
332 0 : ndr->depth--;
333 0 : ndr->depth--;
334 0 : ndr->flags = _flags_save_STRUCT;
335 : }
336 : }
337 :
338 : #ifndef SKIP_NDR_TABLE_bkupblobs
339 : static const struct ndr_interface_public_struct bkupblobs_public_structs[] = {
340 : {
341 : .name = "bkup_Win32StreamId",
342 : .struct_size = sizeof(struct bkup_Win32StreamId ),
343 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkup_Win32StreamId,
344 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkup_Win32StreamId,
345 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkup_Win32StreamId,
346 : },
347 : {
348 : .name = "bkup_NTBackupFile",
349 : .struct_size = sizeof(struct bkup_NTBackupFile ),
350 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkup_NTBackupFile,
351 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkup_NTBackupFile,
352 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkup_NTBackupFile,
353 : },
354 : { .name = NULL }
355 : };
356 :
357 : static const struct ndr_interface_call bkupblobs_calls[] = {
358 : { .name = NULL }
359 : };
360 :
361 : static const char * const bkupblobs_endpoint_strings[] = {
362 : "ncacn_np:[\\pipe\\bkupblobs]",
363 : };
364 :
365 : static const struct ndr_interface_string_array bkupblobs_endpoints = {
366 : .count = 1,
367 : .names = bkupblobs_endpoint_strings
368 : };
369 :
370 : static const char * const bkupblobs_authservice_strings[] = {
371 : "host",
372 : };
373 :
374 : static const struct ndr_interface_string_array bkupblobs_authservices = {
375 : .count = 1,
376 : .names = bkupblobs_authservice_strings
377 : };
378 :
379 :
380 : const struct ndr_interface_table ndr_table_bkupblobs = {
381 : .name = "bkupblobs",
382 : .num_calls = 0,
383 : .calls = bkupblobs_calls,
384 : .num_public_structs = 2,
385 : .public_structs = bkupblobs_public_structs,
386 : .endpoints = &bkupblobs_endpoints,
387 : .authservices = &bkupblobs_authservices
388 : };
389 :
390 : #endif /* SKIP_NDR_TABLE_bkupblobs */
|