Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_gmsa.h"
5 :
6 117 : static enum ndr_err_code ndr_push_MANAGEDPASSWORD_BLOB_PASSWORDS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct MANAGEDPASSWORD_BLOB_PASSWORDS *r)
7 : {
8 117 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
9 117 : if (ndr_flags & NDR_SCALARS) {
10 78 : NDR_CHECK(ndr_push_align(ndr, 5));
11 : {
12 78 : libndr_flags _flags_save_u16string = ndr->flags;
13 78 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
14 78 : NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->current));
15 78 : ndr->flags = _flags_save_u16string;
16 : }
17 : {
18 78 : libndr_flags _flags_save_u16string = ndr->flags;
19 78 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
20 78 : NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->previous));
21 78 : ndr->flags = _flags_save_u16string;
22 : }
23 : {
24 78 : libndr_flags _flags_save_hyper = ndr->flags;
25 78 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
26 78 : NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->query_interval));
27 78 : ndr->flags = _flags_save_hyper;
28 : }
29 : {
30 78 : libndr_flags _flags_save_hyper = ndr->flags;
31 78 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
32 78 : NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->unchanged_interval));
33 78 : ndr->flags = _flags_save_hyper;
34 : }
35 78 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
36 : }
37 117 : if (ndr_flags & NDR_BUFFERS) {
38 : {
39 78 : libndr_flags _flags_save_u16string = ndr->flags;
40 78 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
41 78 : if (r->current) {
42 78 : NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->current));
43 78 : NDR_CHECK(ndr_push_u16string(ndr, NDR_SCALARS, r->current));
44 : }
45 78 : ndr->flags = _flags_save_u16string;
46 : }
47 : {
48 78 : libndr_flags _flags_save_u16string = ndr->flags;
49 78 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
50 78 : if (r->previous) {
51 24 : NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->previous));
52 24 : NDR_CHECK(ndr_push_u16string(ndr, NDR_SCALARS, r->previous));
53 : }
54 78 : ndr->flags = _flags_save_u16string;
55 : }
56 : {
57 78 : libndr_flags _flags_save_hyper = ndr->flags;
58 78 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
59 78 : if (r->query_interval) {
60 78 : NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->query_interval));
61 78 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->query_interval));
62 : }
63 78 : ndr->flags = _flags_save_hyper;
64 : }
65 : {
66 78 : libndr_flags _flags_save_hyper = ndr->flags;
67 78 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
68 78 : if (r->unchanged_interval) {
69 78 : NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->unchanged_interval));
70 78 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, *r->unchanged_interval));
71 : }
72 78 : ndr->flags = _flags_save_hyper;
73 : }
74 : }
75 105 : return NDR_ERR_SUCCESS;
76 : }
77 :
78 66 : static enum ndr_err_code ndr_pull_MANAGEDPASSWORD_BLOB_PASSWORDS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct MANAGEDPASSWORD_BLOB_PASSWORDS *r)
79 : {
80 8 : uint16_t _ptr_current;
81 66 : TALLOC_CTX *_mem_save_current_0 = NULL;
82 8 : uint16_t _ptr_previous;
83 66 : TALLOC_CTX *_mem_save_previous_0 = NULL;
84 8 : uint16_t _ptr_query_interval;
85 66 : TALLOC_CTX *_mem_save_query_interval_0 = NULL;
86 8 : uint16_t _ptr_unchanged_interval;
87 66 : TALLOC_CTX *_mem_save_unchanged_interval_0 = NULL;
88 66 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
89 66 : if (ndr_flags & NDR_SCALARS) {
90 33 : NDR_CHECK(ndr_pull_align(ndr, 5));
91 : {
92 33 : libndr_flags _flags_save_u16string = ndr->flags;
93 33 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
94 33 : NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_current));
95 33 : if (_ptr_current) {
96 33 : NDR_PULL_ALLOC(ndr, r->current);
97 33 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current, _ptr_current));
98 : } else {
99 0 : r->current = NULL;
100 : }
101 33 : ndr->flags = _flags_save_u16string;
102 : }
103 : {
104 33 : libndr_flags _flags_save_u16string = ndr->flags;
105 33 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
106 33 : NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_previous));
107 33 : if (_ptr_previous) {
108 12 : NDR_PULL_ALLOC(ndr, r->previous);
109 12 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous, _ptr_previous));
110 : } else {
111 21 : r->previous = NULL;
112 : }
113 33 : ndr->flags = _flags_save_u16string;
114 : }
115 : {
116 33 : libndr_flags _flags_save_hyper = ndr->flags;
117 33 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
118 33 : NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_query_interval));
119 33 : if (_ptr_query_interval) {
120 33 : NDR_PULL_ALLOC(ndr, r->query_interval);
121 33 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->query_interval, _ptr_query_interval));
122 : } else {
123 0 : r->query_interval = NULL;
124 : }
125 33 : ndr->flags = _flags_save_hyper;
126 : }
127 : {
128 33 : libndr_flags _flags_save_hyper = ndr->flags;
129 33 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
130 33 : NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_unchanged_interval));
131 33 : if (_ptr_unchanged_interval) {
132 33 : NDR_PULL_ALLOC(ndr, r->unchanged_interval);
133 33 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->unchanged_interval, _ptr_unchanged_interval));
134 : } else {
135 0 : r->unchanged_interval = NULL;
136 : }
137 33 : ndr->flags = _flags_save_hyper;
138 : }
139 33 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
140 : }
141 66 : if (ndr_flags & NDR_BUFFERS) {
142 : {
143 33 : libndr_flags _flags_save_u16string = ndr->flags;
144 33 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
145 33 : if (r->current) {
146 4 : uint32_t _relative_save_offset;
147 33 : _relative_save_offset = ndr->offset;
148 33 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current));
149 33 : _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
150 33 : NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
151 33 : NDR_CHECK(ndr_pull_u16string(ndr, NDR_SCALARS, &r->current));
152 33 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
153 33 : if (ndr->offset > ndr->relative_highest_offset) {
154 33 : ndr->relative_highest_offset = ndr->offset;
155 : }
156 33 : ndr->offset = _relative_save_offset;
157 : }
158 33 : ndr->flags = _flags_save_u16string;
159 : }
160 : {
161 33 : libndr_flags _flags_save_u16string = ndr->flags;
162 33 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
163 33 : if (r->previous) {
164 0 : uint32_t _relative_save_offset;
165 12 : _relative_save_offset = ndr->offset;
166 12 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous));
167 12 : _mem_save_previous_0 = NDR_PULL_GET_MEM_CTX(ndr);
168 12 : NDR_PULL_SET_MEM_CTX(ndr, r->previous, 0);
169 12 : NDR_CHECK(ndr_pull_u16string(ndr, NDR_SCALARS, &r->previous));
170 12 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_0, 0);
171 12 : if (ndr->offset > ndr->relative_highest_offset) {
172 12 : ndr->relative_highest_offset = ndr->offset;
173 : }
174 12 : ndr->offset = _relative_save_offset;
175 : }
176 33 : ndr->flags = _flags_save_u16string;
177 : }
178 : {
179 33 : libndr_flags _flags_save_hyper = ndr->flags;
180 33 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
181 33 : if (r->query_interval) {
182 4 : uint32_t _relative_save_offset;
183 33 : _relative_save_offset = ndr->offset;
184 33 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->query_interval));
185 33 : _mem_save_query_interval_0 = NDR_PULL_GET_MEM_CTX(ndr);
186 33 : NDR_PULL_SET_MEM_CTX(ndr, r->query_interval, 0);
187 33 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->query_interval));
188 33 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_interval_0, 0);
189 33 : if (ndr->offset > ndr->relative_highest_offset) {
190 33 : ndr->relative_highest_offset = ndr->offset;
191 : }
192 33 : ndr->offset = _relative_save_offset;
193 : }
194 33 : ndr->flags = _flags_save_hyper;
195 : }
196 : {
197 33 : libndr_flags _flags_save_hyper = ndr->flags;
198 33 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
199 33 : if (r->unchanged_interval) {
200 4 : uint32_t _relative_save_offset;
201 33 : _relative_save_offset = ndr->offset;
202 33 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->unchanged_interval));
203 33 : _mem_save_unchanged_interval_0 = NDR_PULL_GET_MEM_CTX(ndr);
204 33 : NDR_PULL_SET_MEM_CTX(ndr, r->unchanged_interval, 0);
205 33 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, r->unchanged_interval));
206 33 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unchanged_interval_0, 0);
207 33 : if (ndr->offset > ndr->relative_highest_offset) {
208 33 : ndr->relative_highest_offset = ndr->offset;
209 : }
210 33 : ndr->offset = _relative_save_offset;
211 : }
212 33 : ndr->flags = _flags_save_hyper;
213 : }
214 : }
215 58 : return NDR_ERR_SUCCESS;
216 : }
217 :
218 2 : _PUBLIC_ void ndr_print_MANAGEDPASSWORD_BLOB_PASSWORDS(struct ndr_print *ndr, const char *name, const struct MANAGEDPASSWORD_BLOB_PASSWORDS *r)
219 : {
220 2 : ndr_print_struct(ndr, name, "MANAGEDPASSWORD_BLOB_PASSWORDS");
221 2 : if (r == NULL) { ndr_print_null(ndr); return; }
222 2 : ndr->depth++;
223 : {
224 2 : libndr_flags _flags_save_u16string = ndr->flags;
225 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
226 2 : ndr_print_ptr(ndr, "current", r->current);
227 2 : ndr->depth++;
228 2 : if (r->current) {
229 2 : ndr_print_u16string(ndr, "current", r->current);
230 : }
231 2 : ndr->depth--;
232 2 : ndr->flags = _flags_save_u16string;
233 : }
234 : {
235 2 : libndr_flags _flags_save_u16string = ndr->flags;
236 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET|LIBNDR_FLAG_STR_NULLTERM);
237 2 : ndr_print_ptr(ndr, "previous", r->previous);
238 2 : ndr->depth++;
239 2 : if (r->previous) {
240 0 : ndr_print_u16string(ndr, "previous", r->previous);
241 : }
242 2 : ndr->depth--;
243 2 : ndr->flags = _flags_save_u16string;
244 : }
245 : {
246 2 : libndr_flags _flags_save_hyper = ndr->flags;
247 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
248 2 : ndr_print_ptr(ndr, "query_interval", r->query_interval);
249 2 : ndr->depth++;
250 2 : if (r->query_interval) {
251 2 : ndr_print_hyper(ndr, "query_interval", *r->query_interval);
252 : }
253 2 : ndr->depth--;
254 2 : ndr->flags = _flags_save_hyper;
255 : }
256 : {
257 2 : libndr_flags _flags_save_hyper = ndr->flags;
258 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
259 2 : ndr_print_ptr(ndr, "unchanged_interval", r->unchanged_interval);
260 2 : ndr->depth++;
261 2 : if (r->unchanged_interval) {
262 2 : ndr_print_hyper(ndr, "unchanged_interval", *r->unchanged_interval);
263 : }
264 2 : ndr->depth--;
265 2 : ndr->flags = _flags_save_hyper;
266 : }
267 2 : ndr->depth--;
268 : }
269 :
270 39 : static size_t ndr_size_MANAGEDPASSWORD_BLOB_PASSWORDS(const struct MANAGEDPASSWORD_BLOB_PASSWORDS *r, libndr_flags flags)
271 : {
272 39 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_MANAGEDPASSWORD_BLOB_PASSWORDS);
273 : }
274 :
275 39 : _PUBLIC_ enum ndr_err_code ndr_push_MANAGEDPASSWORD_BLOB(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct MANAGEDPASSWORD_BLOB *r)
276 : {
277 39 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
278 39 : if (ndr_flags & NDR_SCALARS) {
279 39 : NDR_CHECK(ndr_push_align(ndr, 5));
280 39 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 1));
281 39 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
282 39 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 8 + ndr_size_MANAGEDPASSWORD_BLOB_PASSWORDS(&r->passwords, ndr->flags)));
283 39 : NDR_CHECK(ndr_push_MANAGEDPASSWORD_BLOB_PASSWORDS(ndr, NDR_SCALARS, &r->passwords));
284 39 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
285 : }
286 39 : if (ndr_flags & NDR_BUFFERS) {
287 39 : NDR_CHECK(ndr_push_MANAGEDPASSWORD_BLOB_PASSWORDS(ndr, NDR_BUFFERS, &r->passwords));
288 : }
289 35 : return NDR_ERR_SUCCESS;
290 : }
291 :
292 33 : _PUBLIC_ enum ndr_err_code ndr_pull_MANAGEDPASSWORD_BLOB(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct MANAGEDPASSWORD_BLOB *r)
293 : {
294 33 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
295 33 : if (ndr_flags & NDR_SCALARS) {
296 33 : NDR_CHECK(ndr_pull_align(ndr, 5));
297 33 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->version));
298 33 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
299 33 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
300 33 : NDR_CHECK(ndr_pull_MANAGEDPASSWORD_BLOB_PASSWORDS(ndr, NDR_SCALARS, &r->passwords));
301 33 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
302 : }
303 33 : if (ndr_flags & NDR_BUFFERS) {
304 33 : NDR_CHECK(ndr_pull_MANAGEDPASSWORD_BLOB_PASSWORDS(ndr, NDR_BUFFERS, &r->passwords));
305 : }
306 29 : return NDR_ERR_SUCCESS;
307 : }
308 :
309 2 : static void ndr_print_flags_MANAGEDPASSWORD_BLOB(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct MANAGEDPASSWORD_BLOB *r)
310 : {
311 2 : ndr_print_MANAGEDPASSWORD_BLOB(ndr, name, r);
312 2 : }
313 :
314 2 : _PUBLIC_ void ndr_print_MANAGEDPASSWORD_BLOB(struct ndr_print *ndr, const char *name, const struct MANAGEDPASSWORD_BLOB *r)
315 : {
316 2 : ndr_print_struct(ndr, name, "MANAGEDPASSWORD_BLOB");
317 2 : if (r == NULL) { ndr_print_null(ndr); return; }
318 2 : ndr->depth++;
319 2 : ndr_print_uint16(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version);
320 2 : ndr_print_uint16(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved);
321 2 : ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?8 + ndr_size_MANAGEDPASSWORD_BLOB_PASSWORDS(&r->passwords, ndr->flags):r->length);
322 2 : ndr_print_MANAGEDPASSWORD_BLOB_PASSWORDS(ndr, "passwords", &r->passwords);
323 2 : ndr->depth--;
324 : }
325 :
326 : #ifndef SKIP_NDR_TABLE_gmsa
327 : static const struct ndr_interface_public_struct gmsa_public_structs[] = {
328 : {
329 : .name = "MANAGEDPASSWORD_BLOB",
330 : .struct_size = sizeof(struct MANAGEDPASSWORD_BLOB ),
331 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_MANAGEDPASSWORD_BLOB,
332 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_MANAGEDPASSWORD_BLOB,
333 : .ndr_print = (ndr_print_function_t) ndr_print_flags_MANAGEDPASSWORD_BLOB,
334 : },
335 : { .name = NULL }
336 : };
337 :
338 : static const struct ndr_interface_call gmsa_calls[] = {
339 : { .name = NULL }
340 : };
341 :
342 : static const char * const gmsa_endpoint_strings[] = {
343 : "ncacn_np:[\\pipe\\gmsa]",
344 : };
345 :
346 : static const struct ndr_interface_string_array gmsa_endpoints = {
347 : .count = 1,
348 : .names = gmsa_endpoint_strings
349 : };
350 :
351 : static const char * const gmsa_authservice_strings[] = {
352 : "host",
353 : };
354 :
355 : static const struct ndr_interface_string_array gmsa_authservices = {
356 : .count = 1,
357 : .names = gmsa_authservice_strings
358 : };
359 :
360 :
361 : const struct ndr_interface_table ndr_table_gmsa = {
362 : .name = "gmsa",
363 : .syntax_id = {
364 : {0xe43b8cf6,0x1ead,0x11ee,{0xae,0xd1},{0xe3,0x59,0x71,0x36,0xce,0x70}},
365 : NDR_GMSA_VERSION
366 : },
367 : .helpstring = NDR_GMSA_HELPSTRING,
368 : .num_calls = 0,
369 : .calls = gmsa_calls,
370 : .num_public_structs = 1,
371 : .public_structs = gmsa_public_structs,
372 : .endpoints = &gmsa_endpoints,
373 : .authservices = &gmsa_authservices
374 : };
375 :
376 : #endif /* SKIP_NDR_TABLE_gmsa */
|