0f1005dda71bcdb00590bd623c0f199023aacb00
[sfrench/samba-autobuild/.git] / librpc / gen_ndr / ndr_epmapper.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_epmapper.h"
5
6 #include "librpc/gen_ndr/ndr_misc.h"
7 static enum ndr_err_code ndr_push_epm_protocol(struct ndr_push *ndr, int ndr_flags, enum epm_protocol r)
8 {
9         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
10         return NDR_ERR_SUCCESS;
11 }
12
13 static enum ndr_err_code ndr_pull_epm_protocol(struct ndr_pull *ndr, int ndr_flags, enum epm_protocol *r)
14 {
15         uint8_t v;
16         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
17         *r = v;
18         return NDR_ERR_SUCCESS;
19 }
20
21 _PUBLIC_ void ndr_print_epm_protocol(struct ndr_print *ndr, const char *name, enum epm_protocol r)
22 {
23         const char *val = NULL;
24
25         switch (r) {
26                 case EPM_PROTOCOL_DNET_NSP: val = "EPM_PROTOCOL_DNET_NSP"; break;
27                 case EPM_PROTOCOL_OSI_TP4: val = "EPM_PROTOCOL_OSI_TP4"; break;
28                 case EPM_PROTOCOL_OSI_CLNS: val = "EPM_PROTOCOL_OSI_CLNS"; break;
29                 case EPM_PROTOCOL_TCP: val = "EPM_PROTOCOL_TCP"; break;
30                 case EPM_PROTOCOL_UDP: val = "EPM_PROTOCOL_UDP"; break;
31                 case EPM_PROTOCOL_IP: val = "EPM_PROTOCOL_IP"; break;
32                 case EPM_PROTOCOL_NCADG: val = "EPM_PROTOCOL_NCADG"; break;
33                 case EPM_PROTOCOL_NCACN: val = "EPM_PROTOCOL_NCACN"; break;
34                 case EPM_PROTOCOL_NCALRPC: val = "EPM_PROTOCOL_NCALRPC"; break;
35                 case EPM_PROTOCOL_UUID: val = "EPM_PROTOCOL_UUID"; break;
36                 case EPM_PROTOCOL_IPX: val = "EPM_PROTOCOL_IPX"; break;
37                 case EPM_PROTOCOL_SMB: val = "EPM_PROTOCOL_SMB"; break;
38                 case EPM_PROTOCOL_PIPE: val = "EPM_PROTOCOL_PIPE"; break;
39                 case EPM_PROTOCOL_NETBIOS: val = "EPM_PROTOCOL_NETBIOS"; break;
40                 case EPM_PROTOCOL_NETBEUI: val = "EPM_PROTOCOL_NETBEUI"; break;
41                 case EPM_PROTOCOL_SPX: val = "EPM_PROTOCOL_SPX"; break;
42                 case EPM_PROTOCOL_NB_IPX: val = "EPM_PROTOCOL_NB_IPX"; break;
43                 case EPM_PROTOCOL_DSP: val = "EPM_PROTOCOL_DSP"; break;
44                 case EPM_PROTOCOL_DDP: val = "EPM_PROTOCOL_DDP"; break;
45                 case EPM_PROTOCOL_APPLETALK: val = "EPM_PROTOCOL_APPLETALK"; break;
46                 case EPM_PROTOCOL_VINES_SPP: val = "EPM_PROTOCOL_VINES_SPP"; break;
47                 case EPM_PROTOCOL_VINES_IPC: val = "EPM_PROTOCOL_VINES_IPC"; break;
48                 case EPM_PROTOCOL_STREETTALK: val = "EPM_PROTOCOL_STREETTALK"; break;
49                 case EPM_PROTOCOL_HTTP: val = "EPM_PROTOCOL_HTTP"; break;
50                 case EPM_PROTOCOL_UNIX_DS: val = "EPM_PROTOCOL_UNIX_DS"; break;
51                 case EPM_PROTOCOL_NULL: val = "EPM_PROTOCOL_NULL"; break;
52         }
53         ndr_print_enum(ndr, name, "ENUM", val, r);
54 }
55
56 static enum ndr_err_code ndr_push_epm_rhs_dnet_nsp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_dnet_nsp *r)
57 {
58         if (ndr_flags & NDR_SCALARS) {
59                 NDR_CHECK(ndr_push_align(ndr, 1));
60         }
61         if (ndr_flags & NDR_BUFFERS) {
62         }
63         return NDR_ERR_SUCCESS;
64 }
65
66 static enum ndr_err_code ndr_pull_epm_rhs_dnet_nsp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_dnet_nsp *r)
67 {
68         if (ndr_flags & NDR_SCALARS) {
69                 NDR_CHECK(ndr_pull_align(ndr, 1));
70         }
71         if (ndr_flags & NDR_BUFFERS) {
72         }
73         return NDR_ERR_SUCCESS;
74 }
75
76 _PUBLIC_ void ndr_print_epm_rhs_dnet_nsp(struct ndr_print *ndr, const char *name, const struct epm_rhs_dnet_nsp *r)
77 {
78         ndr_print_struct(ndr, name, "epm_rhs_dnet_nsp");
79         ndr->depth++;
80         ndr->depth--;
81 }
82
83 static enum ndr_err_code ndr_push_epm_rhs_osi_tp4(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_osi_tp4 *r)
84 {
85         if (ndr_flags & NDR_SCALARS) {
86                 NDR_CHECK(ndr_push_align(ndr, 1));
87         }
88         if (ndr_flags & NDR_BUFFERS) {
89         }
90         return NDR_ERR_SUCCESS;
91 }
92
93 static enum ndr_err_code ndr_pull_epm_rhs_osi_tp4(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_osi_tp4 *r)
94 {
95         if (ndr_flags & NDR_SCALARS) {
96                 NDR_CHECK(ndr_pull_align(ndr, 1));
97         }
98         if (ndr_flags & NDR_BUFFERS) {
99         }
100         return NDR_ERR_SUCCESS;
101 }
102
103 _PUBLIC_ void ndr_print_epm_rhs_osi_tp4(struct ndr_print *ndr, const char *name, const struct epm_rhs_osi_tp4 *r)
104 {
105         ndr_print_struct(ndr, name, "epm_rhs_osi_tp4");
106         ndr->depth++;
107         ndr->depth--;
108 }
109
110 static enum ndr_err_code ndr_push_epm_rhs_osi_clns(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_osi_clns *r)
111 {
112         if (ndr_flags & NDR_SCALARS) {
113                 NDR_CHECK(ndr_push_align(ndr, 1));
114         }
115         if (ndr_flags & NDR_BUFFERS) {
116         }
117         return NDR_ERR_SUCCESS;
118 }
119
120 static enum ndr_err_code ndr_pull_epm_rhs_osi_clns(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_osi_clns *r)
121 {
122         if (ndr_flags & NDR_SCALARS) {
123                 NDR_CHECK(ndr_pull_align(ndr, 1));
124         }
125         if (ndr_flags & NDR_BUFFERS) {
126         }
127         return NDR_ERR_SUCCESS;
128 }
129
130 _PUBLIC_ void ndr_print_epm_rhs_osi_clns(struct ndr_print *ndr, const char *name, const struct epm_rhs_osi_clns *r)
131 {
132         ndr_print_struct(ndr, name, "epm_rhs_osi_clns");
133         ndr->depth++;
134         ndr->depth--;
135 }
136
137 static enum ndr_err_code ndr_push_epm_rhs_udp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_udp *r)
138 {
139         if (ndr_flags & NDR_SCALARS) {
140                 NDR_CHECK(ndr_push_align(ndr, 2));
141                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
142         }
143         if (ndr_flags & NDR_BUFFERS) {
144         }
145         return NDR_ERR_SUCCESS;
146 }
147
148 static enum ndr_err_code ndr_pull_epm_rhs_udp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_udp *r)
149 {
150         if (ndr_flags & NDR_SCALARS) {
151                 NDR_CHECK(ndr_pull_align(ndr, 2));
152                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
153         }
154         if (ndr_flags & NDR_BUFFERS) {
155         }
156         return NDR_ERR_SUCCESS;
157 }
158
159 _PUBLIC_ void ndr_print_epm_rhs_udp(struct ndr_print *ndr, const char *name, const struct epm_rhs_udp *r)
160 {
161         ndr_print_struct(ndr, name, "epm_rhs_udp");
162         ndr->depth++;
163         ndr_print_uint16(ndr, "port", r->port);
164         ndr->depth--;
165 }
166
167 static enum ndr_err_code ndr_push_epm_rhs_tcp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_tcp *r)
168 {
169         if (ndr_flags & NDR_SCALARS) {
170                 NDR_CHECK(ndr_push_align(ndr, 2));
171                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
172         }
173         if (ndr_flags & NDR_BUFFERS) {
174         }
175         return NDR_ERR_SUCCESS;
176 }
177
178 static enum ndr_err_code ndr_pull_epm_rhs_tcp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_tcp *r)
179 {
180         if (ndr_flags & NDR_SCALARS) {
181                 NDR_CHECK(ndr_pull_align(ndr, 2));
182                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
183         }
184         if (ndr_flags & NDR_BUFFERS) {
185         }
186         return NDR_ERR_SUCCESS;
187 }
188
189 _PUBLIC_ void ndr_print_epm_rhs_tcp(struct ndr_print *ndr, const char *name, const struct epm_rhs_tcp *r)
190 {
191         ndr_print_struct(ndr, name, "epm_rhs_tcp");
192         ndr->depth++;
193         ndr_print_uint16(ndr, "port", r->port);
194         ndr->depth--;
195 }
196
197 static enum ndr_err_code ndr_push_epm_rhs_ip(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ip *r)
198 {
199         if (ndr_flags & NDR_SCALARS) {
200                 NDR_CHECK(ndr_push_align(ndr, 4));
201                 NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->ipaddr));
202         }
203         if (ndr_flags & NDR_BUFFERS) {
204         }
205         return NDR_ERR_SUCCESS;
206 }
207
208 static enum ndr_err_code ndr_pull_epm_rhs_ip(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ip *r)
209 {
210         if (ndr_flags & NDR_SCALARS) {
211                 NDR_CHECK(ndr_pull_align(ndr, 4));
212                 NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->ipaddr));
213         }
214         if (ndr_flags & NDR_BUFFERS) {
215         }
216         return NDR_ERR_SUCCESS;
217 }
218
219 _PUBLIC_ void ndr_print_epm_rhs_ip(struct ndr_print *ndr, const char *name, const struct epm_rhs_ip *r)
220 {
221         ndr_print_struct(ndr, name, "epm_rhs_ip");
222         ndr->depth++;
223         ndr_print_ipv4address(ndr, "ipaddr", r->ipaddr);
224         ndr->depth--;
225 }
226
227 static enum ndr_err_code ndr_push_epm_rhs_ncadg(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncadg *r)
228 {
229         if (ndr_flags & NDR_SCALARS) {
230                 NDR_CHECK(ndr_push_align(ndr, 2));
231                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version));
232         }
233         if (ndr_flags & NDR_BUFFERS) {
234         }
235         return NDR_ERR_SUCCESS;
236 }
237
238 static enum ndr_err_code ndr_pull_epm_rhs_ncadg(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncadg *r)
239 {
240         if (ndr_flags & NDR_SCALARS) {
241                 NDR_CHECK(ndr_pull_align(ndr, 2));
242                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version));
243         }
244         if (ndr_flags & NDR_BUFFERS) {
245         }
246         return NDR_ERR_SUCCESS;
247 }
248
249 _PUBLIC_ void ndr_print_epm_rhs_ncadg(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncadg *r)
250 {
251         ndr_print_struct(ndr, name, "epm_rhs_ncadg");
252         ndr->depth++;
253         ndr_print_uint16(ndr, "minor_version", r->minor_version);
254         ndr->depth--;
255 }
256
257 static enum ndr_err_code ndr_push_epm_rhs_ncacn(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncacn *r)
258 {
259         if (ndr_flags & NDR_SCALARS) {
260                 NDR_CHECK(ndr_push_align(ndr, 2));
261                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version));
262         }
263         if (ndr_flags & NDR_BUFFERS) {
264         }
265         return NDR_ERR_SUCCESS;
266 }
267
268 static enum ndr_err_code ndr_pull_epm_rhs_ncacn(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncacn *r)
269 {
270         if (ndr_flags & NDR_SCALARS) {
271                 NDR_CHECK(ndr_pull_align(ndr, 2));
272                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version));
273         }
274         if (ndr_flags & NDR_BUFFERS) {
275         }
276         return NDR_ERR_SUCCESS;
277 }
278
279 _PUBLIC_ void ndr_print_epm_rhs_ncacn(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncacn *r)
280 {
281         ndr_print_struct(ndr, name, "epm_rhs_ncacn");
282         ndr->depth++;
283         ndr_print_uint16(ndr, "minor_version", r->minor_version);
284         ndr->depth--;
285 }
286
287 static enum ndr_err_code ndr_push_epm_rhs_uuid(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_uuid *r)
288 {
289         if (ndr_flags & NDR_SCALARS) {
290                 NDR_CHECK(ndr_push_align(ndr, 4));
291                 {
292                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
293                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
294                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->unknown));
295                         ndr->flags = _flags_save_DATA_BLOB;
296                 }
297         }
298         if (ndr_flags & NDR_BUFFERS) {
299         }
300         return NDR_ERR_SUCCESS;
301 }
302
303 static enum ndr_err_code ndr_pull_epm_rhs_uuid(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_uuid *r)
304 {
305         if (ndr_flags & NDR_SCALARS) {
306                 NDR_CHECK(ndr_pull_align(ndr, 4));
307                 {
308                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
309                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
310                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->unknown));
311                         ndr->flags = _flags_save_DATA_BLOB;
312                 }
313         }
314         if (ndr_flags & NDR_BUFFERS) {
315         }
316         return NDR_ERR_SUCCESS;
317 }
318
319 _PUBLIC_ void ndr_print_epm_rhs_uuid(struct ndr_print *ndr, const char *name, const struct epm_rhs_uuid *r)
320 {
321         ndr_print_struct(ndr, name, "epm_rhs_uuid");
322         ndr->depth++;
323         ndr_print_DATA_BLOB(ndr, "unknown", r->unknown);
324         ndr->depth--;
325 }
326
327 static enum ndr_err_code ndr_push_epm_rhs_ipx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ipx *r)
328 {
329         if (ndr_flags & NDR_SCALARS) {
330                 NDR_CHECK(ndr_push_align(ndr, 1));
331         }
332         if (ndr_flags & NDR_BUFFERS) {
333         }
334         return NDR_ERR_SUCCESS;
335 }
336
337 static enum ndr_err_code ndr_pull_epm_rhs_ipx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ipx *r)
338 {
339         if (ndr_flags & NDR_SCALARS) {
340                 NDR_CHECK(ndr_pull_align(ndr, 1));
341         }
342         if (ndr_flags & NDR_BUFFERS) {
343         }
344         return NDR_ERR_SUCCESS;
345 }
346
347 _PUBLIC_ void ndr_print_epm_rhs_ipx(struct ndr_print *ndr, const char *name, const struct epm_rhs_ipx *r)
348 {
349         ndr_print_struct(ndr, name, "epm_rhs_ipx");
350         ndr->depth++;
351         ndr->depth--;
352 }
353
354 static enum ndr_err_code ndr_push_epm_rhs_smb(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_smb *r)
355 {
356         if (ndr_flags & NDR_SCALARS) {
357                 NDR_CHECK(ndr_push_align(ndr, 4));
358                 {
359                         uint32_t _flags_save_string = ndr->flags;
360                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
361                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->unc));
362                         ndr->flags = _flags_save_string;
363                 }
364         }
365         if (ndr_flags & NDR_BUFFERS) {
366         }
367         return NDR_ERR_SUCCESS;
368 }
369
370 static enum ndr_err_code ndr_pull_epm_rhs_smb(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_smb *r)
371 {
372         if (ndr_flags & NDR_SCALARS) {
373                 NDR_CHECK(ndr_pull_align(ndr, 4));
374                 {
375                         uint32_t _flags_save_string = ndr->flags;
376                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
377                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->unc));
378                         ndr->flags = _flags_save_string;
379                 }
380         }
381         if (ndr_flags & NDR_BUFFERS) {
382         }
383         return NDR_ERR_SUCCESS;
384 }
385
386 _PUBLIC_ void ndr_print_epm_rhs_smb(struct ndr_print *ndr, const char *name, const struct epm_rhs_smb *r)
387 {
388         ndr_print_struct(ndr, name, "epm_rhs_smb");
389         ndr->depth++;
390         ndr_print_string(ndr, "unc", r->unc);
391         ndr->depth--;
392 }
393
394 static enum ndr_err_code ndr_push_epm_rhs_pipe(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_pipe *r)
395 {
396         if (ndr_flags & NDR_SCALARS) {
397                 NDR_CHECK(ndr_push_align(ndr, 4));
398                 {
399                         uint32_t _flags_save_string = ndr->flags;
400                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
401                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
402                         ndr->flags = _flags_save_string;
403                 }
404         }
405         if (ndr_flags & NDR_BUFFERS) {
406         }
407         return NDR_ERR_SUCCESS;
408 }
409
410 static enum ndr_err_code ndr_pull_epm_rhs_pipe(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_pipe *r)
411 {
412         if (ndr_flags & NDR_SCALARS) {
413                 NDR_CHECK(ndr_pull_align(ndr, 4));
414                 {
415                         uint32_t _flags_save_string = ndr->flags;
416                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
417                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
418                         ndr->flags = _flags_save_string;
419                 }
420         }
421         if (ndr_flags & NDR_BUFFERS) {
422         }
423         return NDR_ERR_SUCCESS;
424 }
425
426 _PUBLIC_ void ndr_print_epm_rhs_pipe(struct ndr_print *ndr, const char *name, const struct epm_rhs_pipe *r)
427 {
428         ndr_print_struct(ndr, name, "epm_rhs_pipe");
429         ndr->depth++;
430         ndr_print_string(ndr, "path", r->path);
431         ndr->depth--;
432 }
433
434 static enum ndr_err_code ndr_push_epm_rhs_netbios(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_netbios *r)
435 {
436         if (ndr_flags & NDR_SCALARS) {
437                 NDR_CHECK(ndr_push_align(ndr, 4));
438                 {
439                         uint32_t _flags_save_string = ndr->flags;
440                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
441                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
442                         ndr->flags = _flags_save_string;
443                 }
444         }
445         if (ndr_flags & NDR_BUFFERS) {
446         }
447         return NDR_ERR_SUCCESS;
448 }
449
450 static enum ndr_err_code ndr_pull_epm_rhs_netbios(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_netbios *r)
451 {
452         if (ndr_flags & NDR_SCALARS) {
453                 NDR_CHECK(ndr_pull_align(ndr, 4));
454                 {
455                         uint32_t _flags_save_string = ndr->flags;
456                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
457                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
458                         ndr->flags = _flags_save_string;
459                 }
460         }
461         if (ndr_flags & NDR_BUFFERS) {
462         }
463         return NDR_ERR_SUCCESS;
464 }
465
466 _PUBLIC_ void ndr_print_epm_rhs_netbios(struct ndr_print *ndr, const char *name, const struct epm_rhs_netbios *r)
467 {
468         ndr_print_struct(ndr, name, "epm_rhs_netbios");
469         ndr->depth++;
470         ndr_print_string(ndr, "name", r->name);
471         ndr->depth--;
472 }
473
474 static enum ndr_err_code ndr_push_epm_rhs_netbeui(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_netbeui *r)
475 {
476         if (ndr_flags & NDR_SCALARS) {
477                 NDR_CHECK(ndr_push_align(ndr, 1));
478         }
479         if (ndr_flags & NDR_BUFFERS) {
480         }
481         return NDR_ERR_SUCCESS;
482 }
483
484 static enum ndr_err_code ndr_pull_epm_rhs_netbeui(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_netbeui *r)
485 {
486         if (ndr_flags & NDR_SCALARS) {
487                 NDR_CHECK(ndr_pull_align(ndr, 1));
488         }
489         if (ndr_flags & NDR_BUFFERS) {
490         }
491         return NDR_ERR_SUCCESS;
492 }
493
494 _PUBLIC_ void ndr_print_epm_rhs_netbeui(struct ndr_print *ndr, const char *name, const struct epm_rhs_netbeui *r)
495 {
496         ndr_print_struct(ndr, name, "epm_rhs_netbeui");
497         ndr->depth++;
498         ndr->depth--;
499 }
500
501 static enum ndr_err_code ndr_push_epm_rhs_spx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_spx *r)
502 {
503         if (ndr_flags & NDR_SCALARS) {
504                 NDR_CHECK(ndr_push_align(ndr, 1));
505         }
506         if (ndr_flags & NDR_BUFFERS) {
507         }
508         return NDR_ERR_SUCCESS;
509 }
510
511 static enum ndr_err_code ndr_pull_epm_rhs_spx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_spx *r)
512 {
513         if (ndr_flags & NDR_SCALARS) {
514                 NDR_CHECK(ndr_pull_align(ndr, 1));
515         }
516         if (ndr_flags & NDR_BUFFERS) {
517         }
518         return NDR_ERR_SUCCESS;
519 }
520
521 _PUBLIC_ void ndr_print_epm_rhs_spx(struct ndr_print *ndr, const char *name, const struct epm_rhs_spx *r)
522 {
523         ndr_print_struct(ndr, name, "epm_rhs_spx");
524         ndr->depth++;
525         ndr->depth--;
526 }
527
528 static enum ndr_err_code ndr_push_epm_rhs_nb_ipx(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_nb_ipx *r)
529 {
530         if (ndr_flags & NDR_SCALARS) {
531                 NDR_CHECK(ndr_push_align(ndr, 1));
532         }
533         if (ndr_flags & NDR_BUFFERS) {
534         }
535         return NDR_ERR_SUCCESS;
536 }
537
538 static enum ndr_err_code ndr_pull_epm_rhs_nb_ipx(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_nb_ipx *r)
539 {
540         if (ndr_flags & NDR_SCALARS) {
541                 NDR_CHECK(ndr_pull_align(ndr, 1));
542         }
543         if (ndr_flags & NDR_BUFFERS) {
544         }
545         return NDR_ERR_SUCCESS;
546 }
547
548 _PUBLIC_ void ndr_print_epm_rhs_nb_ipx(struct ndr_print *ndr, const char *name, const struct epm_rhs_nb_ipx *r)
549 {
550         ndr_print_struct(ndr, name, "epm_rhs_nb_ipx");
551         ndr->depth++;
552         ndr->depth--;
553 }
554
555 static enum ndr_err_code ndr_push_epm_rhs_http(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_http *r)
556 {
557         if (ndr_flags & NDR_SCALARS) {
558                 NDR_CHECK(ndr_push_align(ndr, 2));
559                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
560         }
561         if (ndr_flags & NDR_BUFFERS) {
562         }
563         return NDR_ERR_SUCCESS;
564 }
565
566 static enum ndr_err_code ndr_pull_epm_rhs_http(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_http *r)
567 {
568         if (ndr_flags & NDR_SCALARS) {
569                 NDR_CHECK(ndr_pull_align(ndr, 2));
570                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
571         }
572         if (ndr_flags & NDR_BUFFERS) {
573         }
574         return NDR_ERR_SUCCESS;
575 }
576
577 _PUBLIC_ void ndr_print_epm_rhs_http(struct ndr_print *ndr, const char *name, const struct epm_rhs_http *r)
578 {
579         ndr_print_struct(ndr, name, "epm_rhs_http");
580         ndr->depth++;
581         ndr_print_uint16(ndr, "port", r->port);
582         ndr->depth--;
583 }
584
585 static enum ndr_err_code ndr_push_epm_rhs_unix_ds(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_unix_ds *r)
586 {
587         if (ndr_flags & NDR_SCALARS) {
588                 NDR_CHECK(ndr_push_align(ndr, 4));
589                 {
590                         uint32_t _flags_save_string = ndr->flags;
591                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
592                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->path));
593                         ndr->flags = _flags_save_string;
594                 }
595         }
596         if (ndr_flags & NDR_BUFFERS) {
597         }
598         return NDR_ERR_SUCCESS;
599 }
600
601 static enum ndr_err_code ndr_pull_epm_rhs_unix_ds(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_unix_ds *r)
602 {
603         if (ndr_flags & NDR_SCALARS) {
604                 NDR_CHECK(ndr_pull_align(ndr, 4));
605                 {
606                         uint32_t _flags_save_string = ndr->flags;
607                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
608                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->path));
609                         ndr->flags = _flags_save_string;
610                 }
611         }
612         if (ndr_flags & NDR_BUFFERS) {
613         }
614         return NDR_ERR_SUCCESS;
615 }
616
617 _PUBLIC_ void ndr_print_epm_rhs_unix_ds(struct ndr_print *ndr, const char *name, const struct epm_rhs_unix_ds *r)
618 {
619         ndr_print_struct(ndr, name, "epm_rhs_unix_ds");
620         ndr->depth++;
621         ndr_print_string(ndr, "path", r->path);
622         ndr->depth--;
623 }
624
625 static enum ndr_err_code ndr_push_epm_rhs_null(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_null *r)
626 {
627         if (ndr_flags & NDR_SCALARS) {
628                 NDR_CHECK(ndr_push_align(ndr, 1));
629         }
630         if (ndr_flags & NDR_BUFFERS) {
631         }
632         return NDR_ERR_SUCCESS;
633 }
634
635 static enum ndr_err_code ndr_pull_epm_rhs_null(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_null *r)
636 {
637         if (ndr_flags & NDR_SCALARS) {
638                 NDR_CHECK(ndr_pull_align(ndr, 1));
639         }
640         if (ndr_flags & NDR_BUFFERS) {
641         }
642         return NDR_ERR_SUCCESS;
643 }
644
645 _PUBLIC_ void ndr_print_epm_rhs_null(struct ndr_print *ndr, const char *name, const struct epm_rhs_null *r)
646 {
647         ndr_print_struct(ndr, name, "epm_rhs_null");
648         ndr->depth++;
649         ndr->depth--;
650 }
651
652 static enum ndr_err_code ndr_push_epm_rhs_ncalrpc(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_ncalrpc *r)
653 {
654         if (ndr_flags & NDR_SCALARS) {
655                 NDR_CHECK(ndr_push_align(ndr, 2));
656                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minor_version));
657         }
658         if (ndr_flags & NDR_BUFFERS) {
659         }
660         return NDR_ERR_SUCCESS;
661 }
662
663 static enum ndr_err_code ndr_pull_epm_rhs_ncalrpc(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_ncalrpc *r)
664 {
665         if (ndr_flags & NDR_SCALARS) {
666                 NDR_CHECK(ndr_pull_align(ndr, 2));
667                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minor_version));
668         }
669         if (ndr_flags & NDR_BUFFERS) {
670         }
671         return NDR_ERR_SUCCESS;
672 }
673
674 _PUBLIC_ void ndr_print_epm_rhs_ncalrpc(struct ndr_print *ndr, const char *name, const struct epm_rhs_ncalrpc *r)
675 {
676         ndr_print_struct(ndr, name, "epm_rhs_ncalrpc");
677         ndr->depth++;
678         ndr_print_uint16(ndr, "minor_version", r->minor_version);
679         ndr->depth--;
680 }
681
682 static enum ndr_err_code ndr_push_epm_rhs_appletalk(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_appletalk *r)
683 {
684         if (ndr_flags & NDR_SCALARS) {
685                 NDR_CHECK(ndr_push_align(ndr, 1));
686         }
687         if (ndr_flags & NDR_BUFFERS) {
688         }
689         return NDR_ERR_SUCCESS;
690 }
691
692 static enum ndr_err_code ndr_pull_epm_rhs_appletalk(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_appletalk *r)
693 {
694         if (ndr_flags & NDR_SCALARS) {
695                 NDR_CHECK(ndr_pull_align(ndr, 1));
696         }
697         if (ndr_flags & NDR_BUFFERS) {
698         }
699         return NDR_ERR_SUCCESS;
700 }
701
702 _PUBLIC_ void ndr_print_epm_rhs_appletalk(struct ndr_print *ndr, const char *name, const struct epm_rhs_appletalk *r)
703 {
704         ndr_print_struct(ndr, name, "epm_rhs_appletalk");
705         ndr->depth++;
706         ndr->depth--;
707 }
708
709 static enum ndr_err_code ndr_push_epm_rhs_atalk_stream(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_atalk_stream *r)
710 {
711         if (ndr_flags & NDR_SCALARS) {
712                 NDR_CHECK(ndr_push_align(ndr, 1));
713         }
714         if (ndr_flags & NDR_BUFFERS) {
715         }
716         return NDR_ERR_SUCCESS;
717 }
718
719 static enum ndr_err_code ndr_pull_epm_rhs_atalk_stream(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_atalk_stream *r)
720 {
721         if (ndr_flags & NDR_SCALARS) {
722                 NDR_CHECK(ndr_pull_align(ndr, 1));
723         }
724         if (ndr_flags & NDR_BUFFERS) {
725         }
726         return NDR_ERR_SUCCESS;
727 }
728
729 _PUBLIC_ void ndr_print_epm_rhs_atalk_stream(struct ndr_print *ndr, const char *name, const struct epm_rhs_atalk_stream *r)
730 {
731         ndr_print_struct(ndr, name, "epm_rhs_atalk_stream");
732         ndr->depth++;
733         ndr->depth--;
734 }
735
736 static enum ndr_err_code ndr_push_epm_rhs_atalk_datagram(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_atalk_datagram *r)
737 {
738         if (ndr_flags & NDR_SCALARS) {
739                 NDR_CHECK(ndr_push_align(ndr, 1));
740         }
741         if (ndr_flags & NDR_BUFFERS) {
742         }
743         return NDR_ERR_SUCCESS;
744 }
745
746 static enum ndr_err_code ndr_pull_epm_rhs_atalk_datagram(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_atalk_datagram *r)
747 {
748         if (ndr_flags & NDR_SCALARS) {
749                 NDR_CHECK(ndr_pull_align(ndr, 1));
750         }
751         if (ndr_flags & NDR_BUFFERS) {
752         }
753         return NDR_ERR_SUCCESS;
754 }
755
756 _PUBLIC_ void ndr_print_epm_rhs_atalk_datagram(struct ndr_print *ndr, const char *name, const struct epm_rhs_atalk_datagram *r)
757 {
758         ndr_print_struct(ndr, name, "epm_rhs_atalk_datagram");
759         ndr->depth++;
760         ndr->depth--;
761 }
762
763 static enum ndr_err_code ndr_push_epm_rhs_vines_spp(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_vines_spp *r)
764 {
765         if (ndr_flags & NDR_SCALARS) {
766                 NDR_CHECK(ndr_push_align(ndr, 2));
767                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
768         }
769         if (ndr_flags & NDR_BUFFERS) {
770         }
771         return NDR_ERR_SUCCESS;
772 }
773
774 static enum ndr_err_code ndr_pull_epm_rhs_vines_spp(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_vines_spp *r)
775 {
776         if (ndr_flags & NDR_SCALARS) {
777                 NDR_CHECK(ndr_pull_align(ndr, 2));
778                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
779         }
780         if (ndr_flags & NDR_BUFFERS) {
781         }
782         return NDR_ERR_SUCCESS;
783 }
784
785 _PUBLIC_ void ndr_print_epm_rhs_vines_spp(struct ndr_print *ndr, const char *name, const struct epm_rhs_vines_spp *r)
786 {
787         ndr_print_struct(ndr, name, "epm_rhs_vines_spp");
788         ndr->depth++;
789         ndr_print_uint16(ndr, "port", r->port);
790         ndr->depth--;
791 }
792
793 static enum ndr_err_code ndr_push_epm_rhs_vines_ipc(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_vines_ipc *r)
794 {
795         if (ndr_flags & NDR_SCALARS) {
796                 NDR_CHECK(ndr_push_align(ndr, 2));
797                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->port));
798         }
799         if (ndr_flags & NDR_BUFFERS) {
800         }
801         return NDR_ERR_SUCCESS;
802 }
803
804 static enum ndr_err_code ndr_pull_epm_rhs_vines_ipc(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_vines_ipc *r)
805 {
806         if (ndr_flags & NDR_SCALARS) {
807                 NDR_CHECK(ndr_pull_align(ndr, 2));
808                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->port));
809         }
810         if (ndr_flags & NDR_BUFFERS) {
811         }
812         return NDR_ERR_SUCCESS;
813 }
814
815 _PUBLIC_ void ndr_print_epm_rhs_vines_ipc(struct ndr_print *ndr, const char *name, const struct epm_rhs_vines_ipc *r)
816 {
817         ndr_print_struct(ndr, name, "epm_rhs_vines_ipc");
818         ndr->depth++;
819         ndr_print_uint16(ndr, "port", r->port);
820         ndr->depth--;
821 }
822
823 static enum ndr_err_code ndr_push_epm_rhs_streettalk(struct ndr_push *ndr, int ndr_flags, const struct epm_rhs_streettalk *r)
824 {
825         if (ndr_flags & NDR_SCALARS) {
826                 NDR_CHECK(ndr_push_align(ndr, 4));
827                 {
828                         uint32_t _flags_save_string = ndr->flags;
829                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
830                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->streettalk));
831                         ndr->flags = _flags_save_string;
832                 }
833         }
834         if (ndr_flags & NDR_BUFFERS) {
835         }
836         return NDR_ERR_SUCCESS;
837 }
838
839 static enum ndr_err_code ndr_pull_epm_rhs_streettalk(struct ndr_pull *ndr, int ndr_flags, struct epm_rhs_streettalk *r)
840 {
841         if (ndr_flags & NDR_SCALARS) {
842                 NDR_CHECK(ndr_pull_align(ndr, 4));
843                 {
844                         uint32_t _flags_save_string = ndr->flags;
845                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
846                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->streettalk));
847                         ndr->flags = _flags_save_string;
848                 }
849         }
850         if (ndr_flags & NDR_BUFFERS) {
851         }
852         return NDR_ERR_SUCCESS;
853 }
854
855 _PUBLIC_ void ndr_print_epm_rhs_streettalk(struct ndr_print *ndr, const char *name, const struct epm_rhs_streettalk *r)
856 {
857         ndr_print_struct(ndr, name, "epm_rhs_streettalk");
858         ndr->depth++;
859         ndr_print_string(ndr, "streettalk", r->streettalk);
860         ndr->depth--;
861 }
862
863 static enum ndr_err_code ndr_push_epm_rhs(struct ndr_push *ndr, int ndr_flags, const union epm_rhs *r)
864 {
865         {
866                 uint32_t _flags_save_UNION = ndr->flags;
867                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
868                 if (ndr_flags & NDR_SCALARS) {
869                         int level = ndr_push_get_switch_value(ndr, r);
870                         switch (level) {
871                                 case EPM_PROTOCOL_DNET_NSP: {
872                                         NDR_CHECK(ndr_push_epm_rhs_dnet_nsp(ndr, NDR_SCALARS, &r->dnet_nsp));
873                                 break; }
874
875                                 case EPM_PROTOCOL_OSI_TP4: {
876                                         NDR_CHECK(ndr_push_epm_rhs_osi_tp4(ndr, NDR_SCALARS, &r->osi_tp4));
877                                 break; }
878
879                                 case EPM_PROTOCOL_OSI_CLNS: {
880                                         NDR_CHECK(ndr_push_epm_rhs_osi_clns(ndr, NDR_SCALARS, &r->osi_clns));
881                                 break; }
882
883                                 case EPM_PROTOCOL_TCP: {
884                                         NDR_CHECK(ndr_push_epm_rhs_tcp(ndr, NDR_SCALARS, &r->tcp));
885                                 break; }
886
887                                 case EPM_PROTOCOL_UDP: {
888                                         NDR_CHECK(ndr_push_epm_rhs_udp(ndr, NDR_SCALARS, &r->udp));
889                                 break; }
890
891                                 case EPM_PROTOCOL_IP: {
892                                         NDR_CHECK(ndr_push_epm_rhs_ip(ndr, NDR_SCALARS, &r->ip));
893                                 break; }
894
895                                 case EPM_PROTOCOL_NCADG: {
896                                         NDR_CHECK(ndr_push_epm_rhs_ncadg(ndr, NDR_SCALARS, &r->ncadg));
897                                 break; }
898
899                                 case EPM_PROTOCOL_NCACN: {
900                                         NDR_CHECK(ndr_push_epm_rhs_ncacn(ndr, NDR_SCALARS, &r->ncacn));
901                                 break; }
902
903                                 case EPM_PROTOCOL_NCALRPC: {
904                                         NDR_CHECK(ndr_push_epm_rhs_ncalrpc(ndr, NDR_SCALARS, &r->ncalrpc));
905                                 break; }
906
907                                 case EPM_PROTOCOL_UUID: {
908                                         NDR_CHECK(ndr_push_epm_rhs_uuid(ndr, NDR_SCALARS, &r->uuid));
909                                 break; }
910
911                                 case EPM_PROTOCOL_IPX: {
912                                         NDR_CHECK(ndr_push_epm_rhs_ipx(ndr, NDR_SCALARS, &r->ipx));
913                                 break; }
914
915                                 case EPM_PROTOCOL_SMB: {
916                                         NDR_CHECK(ndr_push_epm_rhs_smb(ndr, NDR_SCALARS, &r->smb));
917                                 break; }
918
919                                 case EPM_PROTOCOL_PIPE: {
920                                         NDR_CHECK(ndr_push_epm_rhs_pipe(ndr, NDR_SCALARS, &r->pipe));
921                                 break; }
922
923                                 case EPM_PROTOCOL_NETBIOS: {
924                                         NDR_CHECK(ndr_push_epm_rhs_netbios(ndr, NDR_SCALARS, &r->netbios));
925                                 break; }
926
927                                 case EPM_PROTOCOL_NETBEUI: {
928                                         NDR_CHECK(ndr_push_epm_rhs_netbeui(ndr, NDR_SCALARS, &r->netbeui));
929                                 break; }
930
931                                 case EPM_PROTOCOL_SPX: {
932                                         NDR_CHECK(ndr_push_epm_rhs_spx(ndr, NDR_SCALARS, &r->spx));
933                                 break; }
934
935                                 case EPM_PROTOCOL_NB_IPX: {
936                                         NDR_CHECK(ndr_push_epm_rhs_nb_ipx(ndr, NDR_SCALARS, &r->nb_ipx));
937                                 break; }
938
939                                 case EPM_PROTOCOL_DSP: {
940                                         NDR_CHECK(ndr_push_epm_rhs_atalk_stream(ndr, NDR_SCALARS, &r->atalk_stream));
941                                 break; }
942
943                                 case EPM_PROTOCOL_DDP: {
944                                         NDR_CHECK(ndr_push_epm_rhs_atalk_datagram(ndr, NDR_SCALARS, &r->atalk_datagram));
945                                 break; }
946
947                                 case EPM_PROTOCOL_APPLETALK: {
948                                         NDR_CHECK(ndr_push_epm_rhs_appletalk(ndr, NDR_SCALARS, &r->appletalk));
949                                 break; }
950
951                                 case EPM_PROTOCOL_VINES_SPP: {
952                                         NDR_CHECK(ndr_push_epm_rhs_vines_spp(ndr, NDR_SCALARS, &r->vines_spp));
953                                 break; }
954
955                                 case EPM_PROTOCOL_VINES_IPC: {
956                                         NDR_CHECK(ndr_push_epm_rhs_vines_ipc(ndr, NDR_SCALARS, &r->vines_ipc));
957                                 break; }
958
959                                 case EPM_PROTOCOL_STREETTALK: {
960                                         NDR_CHECK(ndr_push_epm_rhs_streettalk(ndr, NDR_SCALARS, &r->streettalk));
961                                 break; }
962
963                                 case EPM_PROTOCOL_HTTP: {
964                                         NDR_CHECK(ndr_push_epm_rhs_http(ndr, NDR_SCALARS, &r->http));
965                                 break; }
966
967                                 case EPM_PROTOCOL_UNIX_DS: {
968                                         NDR_CHECK(ndr_push_epm_rhs_unix_ds(ndr, NDR_SCALARS, &r->unix_ds));
969                                 break; }
970
971                                 case EPM_PROTOCOL_NULL: {
972                                         NDR_CHECK(ndr_push_epm_rhs_null(ndr, NDR_SCALARS, &r->null));
973                                 break; }
974
975                                 default: {
976                                         {
977                                                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
978                                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
979                                                 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->unknown));
980                                                 ndr->flags = _flags_save_DATA_BLOB;
981                                         }
982                                 break; }
983
984                         }
985                 }
986                 if (ndr_flags & NDR_BUFFERS) {
987                         int level = ndr_push_get_switch_value(ndr, r);
988                         switch (level) {
989                                 case EPM_PROTOCOL_DNET_NSP:
990                                 break;
991
992                                 case EPM_PROTOCOL_OSI_TP4:
993                                 break;
994
995                                 case EPM_PROTOCOL_OSI_CLNS:
996                                 break;
997
998                                 case EPM_PROTOCOL_TCP:
999                                 break;
1000
1001                                 case EPM_PROTOCOL_UDP:
1002                                 break;
1003
1004                                 case EPM_PROTOCOL_IP:
1005                                 break;
1006
1007                                 case EPM_PROTOCOL_NCADG:
1008                                 break;
1009
1010                                 case EPM_PROTOCOL_NCACN:
1011                                 break;
1012
1013                                 case EPM_PROTOCOL_NCALRPC:
1014                                 break;
1015
1016                                 case EPM_PROTOCOL_UUID:
1017                                 break;
1018
1019                                 case EPM_PROTOCOL_IPX:
1020                                 break;
1021
1022                                 case EPM_PROTOCOL_SMB:
1023                                 break;
1024
1025                                 case EPM_PROTOCOL_PIPE:
1026                                 break;
1027
1028                                 case EPM_PROTOCOL_NETBIOS:
1029                                 break;
1030
1031                                 case EPM_PROTOCOL_NETBEUI:
1032                                 break;
1033
1034                                 case EPM_PROTOCOL_SPX:
1035                                 break;
1036
1037                                 case EPM_PROTOCOL_NB_IPX:
1038                                 break;
1039
1040                                 case EPM_PROTOCOL_DSP:
1041                                 break;
1042
1043                                 case EPM_PROTOCOL_DDP:
1044                                 break;
1045
1046                                 case EPM_PROTOCOL_APPLETALK:
1047                                 break;
1048
1049                                 case EPM_PROTOCOL_VINES_SPP:
1050                                 break;
1051
1052                                 case EPM_PROTOCOL_VINES_IPC:
1053                                 break;
1054
1055                                 case EPM_PROTOCOL_STREETTALK:
1056                                 break;
1057
1058                                 case EPM_PROTOCOL_HTTP:
1059                                 break;
1060
1061                                 case EPM_PROTOCOL_UNIX_DS:
1062                                 break;
1063
1064                                 case EPM_PROTOCOL_NULL:
1065                                 break;
1066
1067                                 default:
1068                                 break;
1069
1070                         }
1071                 }
1072                 ndr->flags = _flags_save_UNION;
1073         }
1074         return NDR_ERR_SUCCESS;
1075 }
1076
1077 static enum ndr_err_code ndr_pull_epm_rhs(struct ndr_pull *ndr, int ndr_flags, union epm_rhs *r)
1078 {
1079         int level;
1080         {
1081                 uint32_t _flags_save_UNION = ndr->flags;
1082                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
1083                 level = ndr_pull_get_switch_value(ndr, r);
1084                 if (ndr_flags & NDR_SCALARS) {
1085                         switch (level) {
1086                                 case EPM_PROTOCOL_DNET_NSP: {
1087                                         NDR_CHECK(ndr_pull_epm_rhs_dnet_nsp(ndr, NDR_SCALARS, &r->dnet_nsp));
1088                                 break; }
1089
1090                                 case EPM_PROTOCOL_OSI_TP4: {
1091                                         NDR_CHECK(ndr_pull_epm_rhs_osi_tp4(ndr, NDR_SCALARS, &r->osi_tp4));
1092                                 break; }
1093
1094                                 case EPM_PROTOCOL_OSI_CLNS: {
1095                                         NDR_CHECK(ndr_pull_epm_rhs_osi_clns(ndr, NDR_SCALARS, &r->osi_clns));
1096                                 break; }
1097
1098                                 case EPM_PROTOCOL_TCP: {
1099                                         NDR_CHECK(ndr_pull_epm_rhs_tcp(ndr, NDR_SCALARS, &r->tcp));
1100                                 break; }
1101
1102                                 case EPM_PROTOCOL_UDP: {
1103                                         NDR_CHECK(ndr_pull_epm_rhs_udp(ndr, NDR_SCALARS, &r->udp));
1104                                 break; }
1105
1106                                 case EPM_PROTOCOL_IP: {
1107                                         NDR_CHECK(ndr_pull_epm_rhs_ip(ndr, NDR_SCALARS, &r->ip));
1108                                 break; }
1109
1110                                 case EPM_PROTOCOL_NCADG: {
1111                                         NDR_CHECK(ndr_pull_epm_rhs_ncadg(ndr, NDR_SCALARS, &r->ncadg));
1112                                 break; }
1113
1114                                 case EPM_PROTOCOL_NCACN: {
1115                                         NDR_CHECK(ndr_pull_epm_rhs_ncacn(ndr, NDR_SCALARS, &r->ncacn));
1116                                 break; }
1117
1118                                 case EPM_PROTOCOL_NCALRPC: {
1119                                         NDR_CHECK(ndr_pull_epm_rhs_ncalrpc(ndr, NDR_SCALARS, &r->ncalrpc));
1120                                 break; }
1121
1122                                 case EPM_PROTOCOL_UUID: {
1123                                         NDR_CHECK(ndr_pull_epm_rhs_uuid(ndr, NDR_SCALARS, &r->uuid));
1124                                 break; }
1125
1126                                 case EPM_PROTOCOL_IPX: {
1127                                         NDR_CHECK(ndr_pull_epm_rhs_ipx(ndr, NDR_SCALARS, &r->ipx));
1128                                 break; }
1129
1130                                 case EPM_PROTOCOL_SMB: {
1131                                         NDR_CHECK(ndr_pull_epm_rhs_smb(ndr, NDR_SCALARS, &r->smb));
1132                                 break; }
1133
1134                                 case EPM_PROTOCOL_PIPE: {
1135                                         NDR_CHECK(ndr_pull_epm_rhs_pipe(ndr, NDR_SCALARS, &r->pipe));
1136                                 break; }
1137
1138                                 case EPM_PROTOCOL_NETBIOS: {
1139                                         NDR_CHECK(ndr_pull_epm_rhs_netbios(ndr, NDR_SCALARS, &r->netbios));
1140                                 break; }
1141
1142                                 case EPM_PROTOCOL_NETBEUI: {
1143                                         NDR_CHECK(ndr_pull_epm_rhs_netbeui(ndr, NDR_SCALARS, &r->netbeui));
1144                                 break; }
1145
1146                                 case EPM_PROTOCOL_SPX: {
1147                                         NDR_CHECK(ndr_pull_epm_rhs_spx(ndr, NDR_SCALARS, &r->spx));
1148                                 break; }
1149
1150                                 case EPM_PROTOCOL_NB_IPX: {
1151                                         NDR_CHECK(ndr_pull_epm_rhs_nb_ipx(ndr, NDR_SCALARS, &r->nb_ipx));
1152                                 break; }
1153
1154                                 case EPM_PROTOCOL_DSP: {
1155                                         NDR_CHECK(ndr_pull_epm_rhs_atalk_stream(ndr, NDR_SCALARS, &r->atalk_stream));
1156                                 break; }
1157
1158                                 case EPM_PROTOCOL_DDP: {
1159                                         NDR_CHECK(ndr_pull_epm_rhs_atalk_datagram(ndr, NDR_SCALARS, &r->atalk_datagram));
1160                                 break; }
1161
1162                                 case EPM_PROTOCOL_APPLETALK: {
1163                                         NDR_CHECK(ndr_pull_epm_rhs_appletalk(ndr, NDR_SCALARS, &r->appletalk));
1164                                 break; }
1165
1166                                 case EPM_PROTOCOL_VINES_SPP: {
1167                                         NDR_CHECK(ndr_pull_epm_rhs_vines_spp(ndr, NDR_SCALARS, &r->vines_spp));
1168                                 break; }
1169
1170                                 case EPM_PROTOCOL_VINES_IPC: {
1171                                         NDR_CHECK(ndr_pull_epm_rhs_vines_ipc(ndr, NDR_SCALARS, &r->vines_ipc));
1172                                 break; }
1173
1174                                 case EPM_PROTOCOL_STREETTALK: {
1175                                         NDR_CHECK(ndr_pull_epm_rhs_streettalk(ndr, NDR_SCALARS, &r->streettalk));
1176                                 break; }
1177
1178                                 case EPM_PROTOCOL_HTTP: {
1179                                         NDR_CHECK(ndr_pull_epm_rhs_http(ndr, NDR_SCALARS, &r->http));
1180                                 break; }
1181
1182                                 case EPM_PROTOCOL_UNIX_DS: {
1183                                         NDR_CHECK(ndr_pull_epm_rhs_unix_ds(ndr, NDR_SCALARS, &r->unix_ds));
1184                                 break; }
1185
1186                                 case EPM_PROTOCOL_NULL: {
1187                                         NDR_CHECK(ndr_pull_epm_rhs_null(ndr, NDR_SCALARS, &r->null));
1188                                 break; }
1189
1190                                 default: {
1191                                         {
1192                                                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1193                                                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1194                                                 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->unknown));
1195                                                 ndr->flags = _flags_save_DATA_BLOB;
1196                                         }
1197                                 break; }
1198
1199                         }
1200                 }
1201                 if (ndr_flags & NDR_BUFFERS) {
1202                         switch (level) {
1203                                 case EPM_PROTOCOL_DNET_NSP:
1204                                 break;
1205
1206                                 case EPM_PROTOCOL_OSI_TP4:
1207                                 break;
1208
1209                                 case EPM_PROTOCOL_OSI_CLNS:
1210                                 break;
1211
1212                                 case EPM_PROTOCOL_TCP:
1213                                 break;
1214
1215                                 case EPM_PROTOCOL_UDP:
1216                                 break;
1217
1218                                 case EPM_PROTOCOL_IP:
1219                                 break;
1220
1221                                 case EPM_PROTOCOL_NCADG:
1222                                 break;
1223
1224                                 case EPM_PROTOCOL_NCACN:
1225                                 break;
1226
1227                                 case EPM_PROTOCOL_NCALRPC:
1228                                 break;
1229
1230                                 case EPM_PROTOCOL_UUID:
1231                                 break;
1232
1233                                 case EPM_PROTOCOL_IPX:
1234                                 break;
1235
1236                                 case EPM_PROTOCOL_SMB:
1237                                 break;
1238
1239                                 case EPM_PROTOCOL_PIPE:
1240                                 break;
1241
1242                                 case EPM_PROTOCOL_NETBIOS:
1243                                 break;
1244
1245                                 case EPM_PROTOCOL_NETBEUI:
1246                                 break;
1247
1248                                 case EPM_PROTOCOL_SPX:
1249                                 break;
1250
1251                                 case EPM_PROTOCOL_NB_IPX:
1252                                 break;
1253
1254                                 case EPM_PROTOCOL_DSP:
1255                                 break;
1256
1257                                 case EPM_PROTOCOL_DDP:
1258                                 break;
1259
1260                                 case EPM_PROTOCOL_APPLETALK:
1261                                 break;
1262
1263                                 case EPM_PROTOCOL_VINES_SPP:
1264                                 break;
1265
1266                                 case EPM_PROTOCOL_VINES_IPC:
1267                                 break;
1268
1269                                 case EPM_PROTOCOL_STREETTALK:
1270                                 break;
1271
1272                                 case EPM_PROTOCOL_HTTP:
1273                                 break;
1274
1275                                 case EPM_PROTOCOL_UNIX_DS:
1276                                 break;
1277
1278                                 case EPM_PROTOCOL_NULL:
1279                                 break;
1280
1281                                 default:
1282                                 break;
1283
1284                         }
1285                 }
1286                 ndr->flags = _flags_save_UNION;
1287         }
1288         return NDR_ERR_SUCCESS;
1289 }
1290
1291 _PUBLIC_ void ndr_print_epm_rhs(struct ndr_print *ndr, const char *name, const union epm_rhs *r)
1292 {
1293         int level;
1294         {
1295                 uint32_t _flags_save_UNION = ndr->flags;
1296                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
1297                 level = ndr_print_get_switch_value(ndr, r);
1298                 ndr_print_union(ndr, name, level, "epm_rhs");
1299                 switch (level) {
1300                         case EPM_PROTOCOL_DNET_NSP:
1301                                 ndr_print_epm_rhs_dnet_nsp(ndr, "dnet_nsp", &r->dnet_nsp);
1302                         break;
1303
1304                         case EPM_PROTOCOL_OSI_TP4:
1305                                 ndr_print_epm_rhs_osi_tp4(ndr, "osi_tp4", &r->osi_tp4);
1306                         break;
1307
1308                         case EPM_PROTOCOL_OSI_CLNS:
1309                                 ndr_print_epm_rhs_osi_clns(ndr, "osi_clns", &r->osi_clns);
1310                         break;
1311
1312                         case EPM_PROTOCOL_TCP:
1313                                 ndr_print_epm_rhs_tcp(ndr, "tcp", &r->tcp);
1314                         break;
1315
1316                         case EPM_PROTOCOL_UDP:
1317                                 ndr_print_epm_rhs_udp(ndr, "udp", &r->udp);
1318                         break;
1319
1320                         case EPM_PROTOCOL_IP:
1321                                 ndr_print_epm_rhs_ip(ndr, "ip", &r->ip);
1322                         break;
1323
1324                         case EPM_PROTOCOL_NCADG:
1325                                 ndr_print_epm_rhs_ncadg(ndr, "ncadg", &r->ncadg);
1326                         break;
1327
1328                         case EPM_PROTOCOL_NCACN:
1329                                 ndr_print_epm_rhs_ncacn(ndr, "ncacn", &r->ncacn);
1330                         break;
1331
1332                         case EPM_PROTOCOL_NCALRPC:
1333                                 ndr_print_epm_rhs_ncalrpc(ndr, "ncalrpc", &r->ncalrpc);
1334                         break;
1335
1336                         case EPM_PROTOCOL_UUID:
1337                                 ndr_print_epm_rhs_uuid(ndr, "uuid", &r->uuid);
1338                         break;
1339
1340                         case EPM_PROTOCOL_IPX:
1341                                 ndr_print_epm_rhs_ipx(ndr, "ipx", &r->ipx);
1342                         break;
1343
1344                         case EPM_PROTOCOL_SMB:
1345                                 ndr_print_epm_rhs_smb(ndr, "smb", &r->smb);
1346                         break;
1347
1348                         case EPM_PROTOCOL_PIPE:
1349                                 ndr_print_epm_rhs_pipe(ndr, "pipe", &r->pipe);
1350                         break;
1351
1352                         case EPM_PROTOCOL_NETBIOS:
1353                                 ndr_print_epm_rhs_netbios(ndr, "netbios", &r->netbios);
1354                         break;
1355
1356                         case EPM_PROTOCOL_NETBEUI:
1357                                 ndr_print_epm_rhs_netbeui(ndr, "netbeui", &r->netbeui);
1358                         break;
1359
1360                         case EPM_PROTOCOL_SPX:
1361                                 ndr_print_epm_rhs_spx(ndr, "spx", &r->spx);
1362                         break;
1363
1364                         case EPM_PROTOCOL_NB_IPX:
1365                                 ndr_print_epm_rhs_nb_ipx(ndr, "nb_ipx", &r->nb_ipx);
1366                         break;
1367
1368                         case EPM_PROTOCOL_DSP:
1369                                 ndr_print_epm_rhs_atalk_stream(ndr, "atalk_stream", &r->atalk_stream);
1370                         break;
1371
1372                         case EPM_PROTOCOL_DDP:
1373                                 ndr_print_epm_rhs_atalk_datagram(ndr, "atalk_datagram", &r->atalk_datagram);
1374                         break;
1375
1376                         case EPM_PROTOCOL_APPLETALK:
1377                                 ndr_print_epm_rhs_appletalk(ndr, "appletalk", &r->appletalk);
1378                         break;
1379
1380                         case EPM_PROTOCOL_VINES_SPP:
1381                                 ndr_print_epm_rhs_vines_spp(ndr, "vines_spp", &r->vines_spp);
1382                         break;
1383
1384                         case EPM_PROTOCOL_VINES_IPC:
1385                                 ndr_print_epm_rhs_vines_ipc(ndr, "vines_ipc", &r->vines_ipc);
1386                         break;
1387
1388                         case EPM_PROTOCOL_STREETTALK:
1389                                 ndr_print_epm_rhs_streettalk(ndr, "streettalk", &r->streettalk);
1390                         break;
1391
1392                         case EPM_PROTOCOL_HTTP:
1393                                 ndr_print_epm_rhs_http(ndr, "http", &r->http);
1394                         break;
1395
1396                         case EPM_PROTOCOL_UNIX_DS:
1397                                 ndr_print_epm_rhs_unix_ds(ndr, "unix_ds", &r->unix_ds);
1398                         break;
1399
1400                         case EPM_PROTOCOL_NULL:
1401                                 ndr_print_epm_rhs_null(ndr, "null", &r->null);
1402                         break;
1403
1404                         default:
1405                                 ndr_print_DATA_BLOB(ndr, "unknown", r->unknown);
1406                         break;
1407
1408                 }
1409                 ndr->flags = _flags_save_UNION;
1410         }
1411 }
1412
1413 static enum ndr_err_code ndr_push_epm_lhs(struct ndr_push *ndr, int ndr_flags, const struct epm_lhs *r)
1414 {
1415         if (ndr_flags & NDR_SCALARS) {
1416                 NDR_CHECK(ndr_push_align(ndr, 4));
1417                 NDR_CHECK(ndr_push_epm_protocol(ndr, NDR_SCALARS, r->protocol));
1418                 {
1419                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1420                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1421                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->lhs_data));
1422                         ndr->flags = _flags_save_DATA_BLOB;
1423                 }
1424         }
1425         if (ndr_flags & NDR_BUFFERS) {
1426         }
1427         return NDR_ERR_SUCCESS;
1428 }
1429
1430 static enum ndr_err_code ndr_pull_epm_lhs(struct ndr_pull *ndr, int ndr_flags, struct epm_lhs *r)
1431 {
1432         if (ndr_flags & NDR_SCALARS) {
1433                 NDR_CHECK(ndr_pull_align(ndr, 4));
1434                 NDR_CHECK(ndr_pull_epm_protocol(ndr, NDR_SCALARS, &r->protocol));
1435                 {
1436                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
1437                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1438                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->lhs_data));
1439                         ndr->flags = _flags_save_DATA_BLOB;
1440                 }
1441         }
1442         if (ndr_flags & NDR_BUFFERS) {
1443         }
1444         return NDR_ERR_SUCCESS;
1445 }
1446
1447 _PUBLIC_ void ndr_print_epm_lhs(struct ndr_print *ndr, const char *name, const struct epm_lhs *r)
1448 {
1449         ndr_print_struct(ndr, name, "epm_lhs");
1450         ndr->depth++;
1451         ndr_print_epm_protocol(ndr, "protocol", r->protocol);
1452         ndr_print_DATA_BLOB(ndr, "lhs_data", r->lhs_data);
1453         ndr->depth--;
1454 }
1455
1456 static enum ndr_err_code ndr_push_epm_floor(struct ndr_push *ndr, int ndr_flags, const struct epm_floor *r)
1457 {
1458         if (ndr_flags & NDR_SCALARS) {
1459                 NDR_CHECK(ndr_push_align(ndr, 1));
1460                 {
1461                         struct ndr_push *_ndr_lhs;
1462                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_lhs, 2, -1));
1463                         NDR_CHECK(ndr_push_epm_lhs(_ndr_lhs, NDR_SCALARS, &r->lhs));
1464                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_lhs, 2, -1));
1465                 }
1466                 {
1467                         struct ndr_push *_ndr_rhs;
1468                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_rhs, 2, -1));
1469                         NDR_CHECK(ndr_push_set_switch_value(_ndr_rhs, &r->rhs, r->lhs.protocol));
1470                         NDR_CHECK(ndr_push_epm_rhs(_ndr_rhs, NDR_SCALARS, &r->rhs));
1471                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_rhs, 2, -1));
1472                 }
1473         }
1474         if (ndr_flags & NDR_BUFFERS) {
1475         }
1476         return NDR_ERR_SUCCESS;
1477 }
1478
1479 static enum ndr_err_code ndr_pull_epm_floor(struct ndr_pull *ndr, int ndr_flags, struct epm_floor *r)
1480 {
1481         if (ndr_flags & NDR_SCALARS) {
1482                 NDR_CHECK(ndr_pull_align(ndr, 1));
1483                 {
1484                         struct ndr_pull *_ndr_lhs;
1485                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_lhs, 2, -1));
1486                         NDR_CHECK(ndr_pull_epm_lhs(_ndr_lhs, NDR_SCALARS, &r->lhs));
1487                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_lhs, 2, -1));
1488                 }
1489                 {
1490                         struct ndr_pull *_ndr_rhs;
1491                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_rhs, 2, -1));
1492                         NDR_CHECK(ndr_pull_set_switch_value(_ndr_rhs, &r->rhs, r->lhs.protocol));
1493                         NDR_CHECK(ndr_pull_epm_rhs(_ndr_rhs, NDR_SCALARS, &r->rhs));
1494                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_rhs, 2, -1));
1495                 }
1496         }
1497         if (ndr_flags & NDR_BUFFERS) {
1498         }
1499         return NDR_ERR_SUCCESS;
1500 }
1501
1502 _PUBLIC_ void ndr_print_epm_floor(struct ndr_print *ndr, const char *name, const struct epm_floor *r)
1503 {
1504         ndr_print_struct(ndr, name, "epm_floor");
1505         ndr->depth++;
1506         ndr_print_epm_lhs(ndr, "lhs", &r->lhs);
1507         ndr_print_set_switch_value(ndr, &r->rhs, r->lhs.protocol);
1508         ndr_print_epm_rhs(ndr, "rhs", &r->rhs);
1509         ndr->depth--;
1510 }
1511
1512 static enum ndr_err_code ndr_push_epm_tower(struct ndr_push *ndr, int ndr_flags, const struct epm_tower *r)
1513 {
1514         uint32_t cntr_floors_0;
1515         {
1516                 uint32_t _flags_save_STRUCT = ndr->flags;
1517                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN);
1518                 if (ndr_flags & NDR_SCALARS) {
1519                         NDR_CHECK(ndr_push_align(ndr, 2));
1520                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_floors));
1521                         for (cntr_floors_0 = 0; cntr_floors_0 < r->num_floors; cntr_floors_0++) {
1522                                 NDR_CHECK(ndr_push_epm_floor(ndr, NDR_SCALARS, &r->floors[cntr_floors_0]));
1523                         }
1524                 }
1525                 if (ndr_flags & NDR_BUFFERS) {
1526                 }
1527                 ndr->flags = _flags_save_STRUCT;
1528         }
1529         return NDR_ERR_SUCCESS;
1530 }
1531
1532 static enum ndr_err_code ndr_pull_epm_tower(struct ndr_pull *ndr, int ndr_flags, struct epm_tower *r)
1533 {
1534         uint32_t cntr_floors_0;
1535         TALLOC_CTX *_mem_save_floors_0;
1536         {
1537                 uint32_t _flags_save_STRUCT = ndr->flags;
1538                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN);
1539                 if (ndr_flags & NDR_SCALARS) {
1540                         NDR_CHECK(ndr_pull_align(ndr, 2));
1541                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_floors));
1542                         NDR_PULL_ALLOC_N(ndr, r->floors, r->num_floors);
1543                         _mem_save_floors_0 = NDR_PULL_GET_MEM_CTX(ndr);
1544                         NDR_PULL_SET_MEM_CTX(ndr, r->floors, 0);
1545                         for (cntr_floors_0 = 0; cntr_floors_0 < r->num_floors; cntr_floors_0++) {
1546                                 NDR_CHECK(ndr_pull_epm_floor(ndr, NDR_SCALARS, &r->floors[cntr_floors_0]));
1547                         }
1548                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_floors_0, 0);
1549                 }
1550                 if (ndr_flags & NDR_BUFFERS) {
1551                 }
1552                 ndr->flags = _flags_save_STRUCT;
1553         }
1554         return NDR_ERR_SUCCESS;
1555 }
1556
1557 _PUBLIC_ void ndr_print_epm_tower(struct ndr_print *ndr, const char *name, const struct epm_tower *r)
1558 {
1559         uint32_t cntr_floors_0;
1560         ndr_print_struct(ndr, name, "epm_tower");
1561         {
1562                 uint32_t _flags_save_STRUCT = ndr->flags;
1563                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN);
1564                 ndr->depth++;
1565                 ndr_print_uint16(ndr, "num_floors", r->num_floors);
1566                 ndr->print(ndr, "%s: ARRAY(%d)", "floors", (int)r->num_floors);
1567                 ndr->depth++;
1568                 for (cntr_floors_0=0;cntr_floors_0<r->num_floors;cntr_floors_0++) {
1569                         char *idx_0=NULL;
1570                         if (asprintf(&idx_0, "[%d]", cntr_floors_0) != -1) {
1571                                 ndr_print_epm_floor(ndr, "floors", &r->floors[cntr_floors_0]);
1572                                 free(idx_0);
1573                         }
1574                 }
1575                 ndr->depth--;
1576                 ndr->depth--;
1577                 ndr->flags = _flags_save_STRUCT;
1578         }
1579 }
1580
1581 static size_t ndr_size_epm_tower(const struct epm_tower *r, int flags)
1582 {
1583         flags |= LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN;
1584         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_epm_tower);
1585 }
1586
1587 static enum ndr_err_code ndr_push_epm_twr_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_t *r)
1588 {
1589         if (ndr_flags & NDR_SCALARS) {
1590                 NDR_CHECK(ndr_push_align(ndr, 4));
1591                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_epm_tower(&r->tower, ndr->flags)));
1592                 {
1593                         struct ndr_push *_ndr_tower;
1594                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_tower, 4, -1));
1595                         NDR_CHECK(ndr_push_epm_tower(_ndr_tower, NDR_SCALARS, &r->tower));
1596                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_tower, 4, -1));
1597                 }
1598         }
1599         if (ndr_flags & NDR_BUFFERS) {
1600         }
1601         return NDR_ERR_SUCCESS;
1602 }
1603
1604 static enum ndr_err_code ndr_pull_epm_twr_t(struct ndr_pull *ndr, int ndr_flags, struct epm_twr_t *r)
1605 {
1606         if (ndr_flags & NDR_SCALARS) {
1607                 NDR_CHECK(ndr_pull_align(ndr, 4));
1608                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tower_length));
1609                 {
1610                         struct ndr_pull *_ndr_tower;
1611                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_tower, 4, -1));
1612                         NDR_CHECK(ndr_pull_epm_tower(_ndr_tower, NDR_SCALARS, &r->tower));
1613                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_tower, 4, -1));
1614                 }
1615         }
1616         if (ndr_flags & NDR_BUFFERS) {
1617         }
1618         return NDR_ERR_SUCCESS;
1619 }
1620
1621 _PUBLIC_ void ndr_print_epm_twr_t(struct ndr_print *ndr, const char *name, const struct epm_twr_t *r)
1622 {
1623         ndr_print_struct(ndr, name, "epm_twr_t");
1624         ndr->depth++;
1625         ndr_print_uint32(ndr, "tower_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_epm_tower(&r->tower, ndr->flags):r->tower_length);
1626         ndr_print_epm_tower(ndr, "tower", &r->tower);
1627         ndr->depth--;
1628 }
1629
1630 static enum ndr_err_code ndr_push_epm_entry_t(struct ndr_push *ndr, int ndr_flags, const struct epm_entry_t *r)
1631 {
1632         if (ndr_flags & NDR_SCALARS) {
1633                 NDR_CHECK(ndr_push_align(ndr, 4));
1634                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
1635                 NDR_CHECK(ndr_push_full_ptr(ndr, r->tower));
1636                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1637                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->annotation) + 1));
1638                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->annotation, strlen(r->annotation) + 1, sizeof(uint8_t), CH_DOS));
1639         }
1640         if (ndr_flags & NDR_BUFFERS) {
1641                 if (r->tower) {
1642                         NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->tower));
1643                 }
1644         }
1645         return NDR_ERR_SUCCESS;
1646 }
1647
1648 static enum ndr_err_code ndr_pull_epm_entry_t(struct ndr_pull *ndr, int ndr_flags, struct epm_entry_t *r)
1649 {
1650         uint32_t _ptr_tower;
1651         TALLOC_CTX *_mem_save_tower_0;
1652         if (ndr_flags & NDR_SCALARS) {
1653                 NDR_CHECK(ndr_pull_align(ndr, 4));
1654                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->object));
1655                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tower));
1656                 if (_ptr_tower) {
1657                         NDR_PULL_ALLOC(ndr, r->tower);
1658                 } else {
1659                         r->tower = NULL;
1660                 }
1661                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_offset));
1662                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__annotation_length));
1663                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->annotation, r->__annotation_length, sizeof(uint8_t), CH_DOS));
1664         }
1665         if (ndr_flags & NDR_BUFFERS) {
1666                 if (r->tower) {
1667                         _mem_save_tower_0 = NDR_PULL_GET_MEM_CTX(ndr);
1668                         NDR_PULL_SET_MEM_CTX(ndr, r->tower, 0);
1669                         NDR_CHECK(ndr_pull_epm_twr_t(ndr, NDR_SCALARS, r->tower));
1670                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tower_0, 0);
1671                 }
1672         }
1673         return NDR_ERR_SUCCESS;
1674 }
1675
1676 _PUBLIC_ void ndr_print_epm_entry_t(struct ndr_print *ndr, const char *name, const struct epm_entry_t *r)
1677 {
1678         ndr_print_struct(ndr, name, "epm_entry_t");
1679         ndr->depth++;
1680         ndr_print_GUID(ndr, "object", &r->object);
1681         ndr_print_ptr(ndr, "tower", r->tower);
1682         ndr->depth++;
1683         if (r->tower) {
1684                 ndr_print_epm_twr_t(ndr, "tower", r->tower);
1685         }
1686         ndr->depth--;
1687         ndr_print_uint32(ndr, "__annotation_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->__annotation_offset);
1688         ndr_print_uint32(ndr, "__annotation_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->annotation) + 1:r->__annotation_length);
1689         ndr_print_string(ndr, "annotation", r->annotation);
1690         ndr->depth--;
1691 }
1692
1693 static enum ndr_err_code ndr_push_rpc_if_id_t(struct ndr_push *ndr, int ndr_flags, const struct rpc_if_id_t *r)
1694 {
1695         if (ndr_flags & NDR_SCALARS) {
1696                 NDR_CHECK(ndr_push_align(ndr, 4));
1697                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid));
1698                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vers_major));
1699                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->vers_minor));
1700         }
1701         if (ndr_flags & NDR_BUFFERS) {
1702         }
1703         return NDR_ERR_SUCCESS;
1704 }
1705
1706 static enum ndr_err_code ndr_pull_rpc_if_id_t(struct ndr_pull *ndr, int ndr_flags, struct rpc_if_id_t *r)
1707 {
1708         if (ndr_flags & NDR_SCALARS) {
1709                 NDR_CHECK(ndr_pull_align(ndr, 4));
1710                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid));
1711                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vers_major));
1712                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->vers_minor));
1713         }
1714         if (ndr_flags & NDR_BUFFERS) {
1715         }
1716         return NDR_ERR_SUCCESS;
1717 }
1718
1719 _PUBLIC_ void ndr_print_rpc_if_id_t(struct ndr_print *ndr, const char *name, const struct rpc_if_id_t *r)
1720 {
1721         ndr_print_struct(ndr, name, "rpc_if_id_t");
1722         ndr->depth++;
1723         ndr_print_GUID(ndr, "uuid", &r->uuid);
1724         ndr_print_uint16(ndr, "vers_major", r->vers_major);
1725         ndr_print_uint16(ndr, "vers_minor", r->vers_minor);
1726         ndr->depth--;
1727 }
1728
1729 static enum ndr_err_code ndr_push_epm_twr_p_t(struct ndr_push *ndr, int ndr_flags, const struct epm_twr_p_t *r)
1730 {
1731         if (ndr_flags & NDR_SCALARS) {
1732                 NDR_CHECK(ndr_push_align(ndr, 4));
1733                 NDR_CHECK(ndr_push_full_ptr(ndr, r->twr));
1734         }
1735         if (ndr_flags & NDR_BUFFERS) {
1736                 if (r->twr) {
1737                         NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->twr));
1738                 }
1739         }
1740         return NDR_ERR_SUCCESS;
1741 }
1742
1743 static enum ndr_err_code ndr_pull_epm_twr_p_t(struct ndr_pull *ndr, int ndr_flags, struct epm_twr_p_t *r)
1744 {
1745         uint32_t _ptr_twr;
1746         TALLOC_CTX *_mem_save_twr_0;
1747         if (ndr_flags & NDR_SCALARS) {
1748                 NDR_CHECK(ndr_pull_align(ndr, 4));
1749                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_twr));
1750                 if (_ptr_twr) {
1751                         NDR_PULL_ALLOC(ndr, r->twr);
1752                 } else {
1753                         r->twr = NULL;
1754                 }
1755         }
1756         if (ndr_flags & NDR_BUFFERS) {
1757                 if (r->twr) {
1758                         _mem_save_twr_0 = NDR_PULL_GET_MEM_CTX(ndr);
1759                         NDR_PULL_SET_MEM_CTX(ndr, r->twr, 0);
1760                         NDR_CHECK(ndr_pull_epm_twr_t(ndr, NDR_SCALARS, r->twr));
1761                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_twr_0, 0);
1762                 }
1763         }
1764         return NDR_ERR_SUCCESS;
1765 }
1766
1767 _PUBLIC_ void ndr_print_epm_twr_p_t(struct ndr_print *ndr, const char *name, const struct epm_twr_p_t *r)
1768 {
1769         ndr_print_struct(ndr, name, "epm_twr_p_t");
1770         ndr->depth++;
1771         ndr_print_ptr(ndr, "twr", r->twr);
1772         ndr->depth++;
1773         if (r->twr) {
1774                 ndr_print_epm_twr_t(ndr, "twr", r->twr);
1775         }
1776         ndr->depth--;
1777         ndr->depth--;
1778 }
1779
1780 static enum ndr_err_code ndr_push_epm_Insert(struct ndr_push *ndr, int flags, const struct epm_Insert *r)
1781 {
1782         uint32_t cntr_entries_0;
1783         if (flags & NDR_IN) {
1784                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_ents));
1785                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_ents));
1786                 for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
1787                         NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_SCALARS, &r->in.entries[cntr_entries_0]));
1788                 }
1789                 for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
1790                         NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_BUFFERS, &r->in.entries[cntr_entries_0]));
1791                 }
1792                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.replace));
1793         }
1794         if (flags & NDR_OUT) {
1795                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
1796         }
1797         return NDR_ERR_SUCCESS;
1798 }
1799
1800 static enum ndr_err_code ndr_pull_epm_Insert(struct ndr_pull *ndr, int flags, struct epm_Insert *r)
1801 {
1802         uint32_t cntr_entries_0;
1803         TALLOC_CTX *_mem_save_entries_0;
1804         if (flags & NDR_IN) {
1805                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_ents));
1806                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.entries));
1807                 NDR_PULL_ALLOC_N(ndr, r->in.entries, ndr_get_array_size(ndr, &r->in.entries));
1808                 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
1809                 NDR_PULL_SET_MEM_CTX(ndr, r->in.entries, 0);
1810                 for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
1811                         NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_SCALARS, &r->in.entries[cntr_entries_0]));
1812                 }
1813                 for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
1814                         NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_BUFFERS, &r->in.entries[cntr_entries_0]));
1815                 }
1816                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
1817                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.replace));
1818                 if (r->in.entries) {
1819                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.entries, r->in.num_ents));
1820                 }
1821         }
1822         if (flags & NDR_OUT) {
1823                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
1824         }
1825         return NDR_ERR_SUCCESS;
1826 }
1827
1828 _PUBLIC_ void ndr_print_epm_Insert(struct ndr_print *ndr, const char *name, int flags, const struct epm_Insert *r)
1829 {
1830         uint32_t cntr_entries_0;
1831         ndr_print_struct(ndr, name, "epm_Insert");
1832         ndr->depth++;
1833         if (flags & NDR_SET_VALUES) {
1834                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1835         }
1836         if (flags & NDR_IN) {
1837                 ndr_print_struct(ndr, "in", "epm_Insert");
1838                 ndr->depth++;
1839                 ndr_print_uint32(ndr, "num_ents", r->in.num_ents);
1840                 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->in.num_ents);
1841                 ndr->depth++;
1842                 for (cntr_entries_0=0;cntr_entries_0<r->in.num_ents;cntr_entries_0++) {
1843                         char *idx_0=NULL;
1844                         if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
1845                                 ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]);
1846                                 free(idx_0);
1847                         }
1848                 }
1849                 ndr->depth--;
1850                 ndr_print_uint32(ndr, "replace", r->in.replace);
1851                 ndr->depth--;
1852         }
1853         if (flags & NDR_OUT) {
1854                 ndr_print_struct(ndr, "out", "epm_Insert");
1855                 ndr->depth++;
1856                 ndr_print_uint32(ndr, "result", r->out.result);
1857                 ndr->depth--;
1858         }
1859         ndr->depth--;
1860 }
1861
1862 static enum ndr_err_code ndr_push_epm_Delete(struct ndr_push *ndr, int flags, const struct epm_Delete *r)
1863 {
1864         uint32_t cntr_entries_0;
1865         if (flags & NDR_IN) {
1866                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_ents));
1867                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_ents));
1868                 for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
1869                         NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_SCALARS, &r->in.entries[cntr_entries_0]));
1870                 }
1871                 for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
1872                         NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_BUFFERS, &r->in.entries[cntr_entries_0]));
1873                 }
1874         }
1875         if (flags & NDR_OUT) {
1876                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
1877         }
1878         return NDR_ERR_SUCCESS;
1879 }
1880
1881 static enum ndr_err_code ndr_pull_epm_Delete(struct ndr_pull *ndr, int flags, struct epm_Delete *r)
1882 {
1883         uint32_t cntr_entries_0;
1884         TALLOC_CTX *_mem_save_entries_0;
1885         if (flags & NDR_IN) {
1886                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_ents));
1887                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.entries));
1888                 NDR_PULL_ALLOC_N(ndr, r->in.entries, ndr_get_array_size(ndr, &r->in.entries));
1889                 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
1890                 NDR_PULL_SET_MEM_CTX(ndr, r->in.entries, 0);
1891                 for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
1892                         NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_SCALARS, &r->in.entries[cntr_entries_0]));
1893                 }
1894                 for (cntr_entries_0 = 0; cntr_entries_0 < r->in.num_ents; cntr_entries_0++) {
1895                         NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_BUFFERS, &r->in.entries[cntr_entries_0]));
1896                 }
1897                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
1898                 if (r->in.entries) {
1899                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.entries, r->in.num_ents));
1900                 }
1901         }
1902         if (flags & NDR_OUT) {
1903                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
1904         }
1905         return NDR_ERR_SUCCESS;
1906 }
1907
1908 _PUBLIC_ void ndr_print_epm_Delete(struct ndr_print *ndr, const char *name, int flags, const struct epm_Delete *r)
1909 {
1910         uint32_t cntr_entries_0;
1911         ndr_print_struct(ndr, name, "epm_Delete");
1912         ndr->depth++;
1913         if (flags & NDR_SET_VALUES) {
1914                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1915         }
1916         if (flags & NDR_IN) {
1917                 ndr_print_struct(ndr, "in", "epm_Delete");
1918                 ndr->depth++;
1919                 ndr_print_uint32(ndr, "num_ents", r->in.num_ents);
1920                 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)r->in.num_ents);
1921                 ndr->depth++;
1922                 for (cntr_entries_0=0;cntr_entries_0<r->in.num_ents;cntr_entries_0++) {
1923                         char *idx_0=NULL;
1924                         if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
1925                                 ndr_print_epm_entry_t(ndr, "entries", &r->in.entries[cntr_entries_0]);
1926                                 free(idx_0);
1927                         }
1928                 }
1929                 ndr->depth--;
1930                 ndr->depth--;
1931         }
1932         if (flags & NDR_OUT) {
1933                 ndr_print_struct(ndr, "out", "epm_Delete");
1934                 ndr->depth++;
1935                 ndr_print_uint32(ndr, "result", r->out.result);
1936                 ndr->depth--;
1937         }
1938         ndr->depth--;
1939 }
1940
1941 static enum ndr_err_code ndr_push_epm_Lookup(struct ndr_push *ndr, int flags, const struct epm_Lookup *r)
1942 {
1943         uint32_t cntr_entries_0;
1944         if (flags & NDR_IN) {
1945                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.inquiry_type));
1946                 NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object));
1947                 if (r->in.object) {
1948                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.object));
1949                 }
1950                 NDR_CHECK(ndr_push_full_ptr(ndr, r->in.interface_id));
1951                 if (r->in.interface_id) {
1952                         NDR_CHECK(ndr_push_rpc_if_id_t(ndr, NDR_SCALARS, r->in.interface_id));
1953                 }
1954                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.vers_option));
1955                 if (r->in.entry_handle == NULL) {
1956                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1957                 }
1958                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle));
1959                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_ents));
1960         }
1961         if (flags & NDR_OUT) {
1962                 if (r->out.entry_handle == NULL) {
1963                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1964                 }
1965                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle));
1966                 if (r->out.num_ents == NULL) {
1967                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1968                 }
1969                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ents));
1970                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_ents));
1971                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1972                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_ents));
1973                 for (cntr_entries_0 = 0; cntr_entries_0 < *r->out.num_ents; cntr_entries_0++) {
1974                         NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_SCALARS, &r->out.entries[cntr_entries_0]));
1975                 }
1976                 for (cntr_entries_0 = 0; cntr_entries_0 < *r->out.num_ents; cntr_entries_0++) {
1977                         NDR_CHECK(ndr_push_epm_entry_t(ndr, NDR_BUFFERS, &r->out.entries[cntr_entries_0]));
1978                 }
1979                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
1980         }
1981         return NDR_ERR_SUCCESS;
1982 }
1983
1984 static enum ndr_err_code ndr_pull_epm_Lookup(struct ndr_pull *ndr, int flags, struct epm_Lookup *r)
1985 {
1986         uint32_t _ptr_object;
1987         uint32_t _ptr_interface_id;
1988         uint32_t cntr_entries_0;
1989         TALLOC_CTX *_mem_save_object_0;
1990         TALLOC_CTX *_mem_save_interface_id_0;
1991         TALLOC_CTX *_mem_save_entry_handle_0;
1992         TALLOC_CTX *_mem_save_num_ents_0;
1993         TALLOC_CTX *_mem_save_entries_0;
1994         if (flags & NDR_IN) {
1995                 ZERO_STRUCT(r->out);
1996
1997                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.inquiry_type));
1998                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object));
1999                 if (_ptr_object) {
2000                         NDR_PULL_ALLOC(ndr, r->in.object);
2001                 } else {
2002                         r->in.object = NULL;
2003                 }
2004                 if (r->in.object) {
2005                         _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
2006                         NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0);
2007                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.object));
2008                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0);
2009                 }
2010                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_interface_id));
2011                 if (_ptr_interface_id) {
2012                         NDR_PULL_ALLOC(ndr, r->in.interface_id);
2013                 } else {
2014                         r->in.interface_id = NULL;
2015                 }
2016                 if (r->in.interface_id) {
2017                         _mem_save_interface_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
2018                         NDR_PULL_SET_MEM_CTX(ndr, r->in.interface_id, 0);
2019                         NDR_CHECK(ndr_pull_rpc_if_id_t(ndr, NDR_SCALARS, r->in.interface_id));
2020                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_interface_id_0, 0);
2021                 }
2022                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.vers_option));
2023                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2024                         NDR_PULL_ALLOC(ndr, r->in.entry_handle);
2025                 }
2026                 _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2027                 NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC);
2028                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle));
2029                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
2030                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_ents));
2031                 NDR_PULL_ALLOC(ndr, r->out.entry_handle);
2032                 *r->out.entry_handle = *r->in.entry_handle;
2033                 NDR_PULL_ALLOC(ndr, r->out.num_ents);
2034                 ZERO_STRUCTP(r->out.num_ents);
2035         }
2036         if (flags & NDR_OUT) {
2037                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2038                         NDR_PULL_ALLOC(ndr, r->out.entry_handle);
2039                 }
2040                 _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2041                 NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC);
2042                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle));
2043                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
2044                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2045                         NDR_PULL_ALLOC(ndr, r->out.num_ents);
2046                 }
2047                 _mem_save_num_ents_0 = NDR_PULL_GET_MEM_CTX(ndr);
2048                 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_ents, LIBNDR_FLAG_REF_ALLOC);
2049                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_ents));
2050                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_ents_0, LIBNDR_FLAG_REF_ALLOC);
2051                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.entries));
2052                 NDR_CHECK(ndr_pull_array_length(ndr, &r->out.entries));
2053                 if (ndr_get_array_length(ndr, &r->out.entries) > ndr_get_array_size(ndr, &r->out.entries)) {
2054                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.entries), ndr_get_array_length(ndr, &r->out.entries));
2055                 }
2056                 NDR_PULL_ALLOC_N(ndr, r->out.entries, ndr_get_array_size(ndr, &r->out.entries));
2057                 _mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
2058                 NDR_PULL_SET_MEM_CTX(ndr, r->out.entries, 0);
2059                 for (cntr_entries_0 = 0; cntr_entries_0 < *r->out.num_ents; cntr_entries_0++) {
2060                         NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_SCALARS, &r->out.entries[cntr_entries_0]));
2061                 }
2062                 for (cntr_entries_0 = 0; cntr_entries_0 < *r->out.num_ents; cntr_entries_0++) {
2063                         NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_BUFFERS, &r->out.entries[cntr_entries_0]));
2064                 }
2065                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
2066                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
2067                 if (r->out.entries) {
2068                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.entries, r->in.max_ents));
2069                 }
2070                 if (r->out.entries) {
2071                         NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.entries, *r->out.num_ents));
2072                 }
2073         }
2074         return NDR_ERR_SUCCESS;
2075 }
2076
2077 _PUBLIC_ void ndr_print_epm_Lookup(struct ndr_print *ndr, const char *name, int flags, const struct epm_Lookup *r)
2078 {
2079         uint32_t cntr_entries_0;
2080         ndr_print_struct(ndr, name, "epm_Lookup");
2081         ndr->depth++;
2082         if (flags & NDR_SET_VALUES) {
2083                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2084         }
2085         if (flags & NDR_IN) {
2086                 ndr_print_struct(ndr, "in", "epm_Lookup");
2087                 ndr->depth++;
2088                 ndr_print_uint32(ndr, "inquiry_type", r->in.inquiry_type);
2089                 ndr_print_ptr(ndr, "object", r->in.object);
2090                 ndr->depth++;
2091                 if (r->in.object) {
2092                         ndr_print_GUID(ndr, "object", r->in.object);
2093                 }
2094                 ndr->depth--;
2095                 ndr_print_ptr(ndr, "interface_id", r->in.interface_id);
2096                 ndr->depth++;
2097                 if (r->in.interface_id) {
2098                         ndr_print_rpc_if_id_t(ndr, "interface_id", r->in.interface_id);
2099                 }
2100                 ndr->depth--;
2101                 ndr_print_uint32(ndr, "vers_option", r->in.vers_option);
2102                 ndr_print_ptr(ndr, "entry_handle", r->in.entry_handle);
2103                 ndr->depth++;
2104                 ndr_print_policy_handle(ndr, "entry_handle", r->in.entry_handle);
2105                 ndr->depth--;
2106                 ndr_print_uint32(ndr, "max_ents", r->in.max_ents);
2107                 ndr->depth--;
2108         }
2109         if (flags & NDR_OUT) {
2110                 ndr_print_struct(ndr, "out", "epm_Lookup");
2111                 ndr->depth++;
2112                 ndr_print_ptr(ndr, "entry_handle", r->out.entry_handle);
2113                 ndr->depth++;
2114                 ndr_print_policy_handle(ndr, "entry_handle", r->out.entry_handle);
2115                 ndr->depth--;
2116                 ndr_print_ptr(ndr, "num_ents", r->out.num_ents);
2117                 ndr->depth++;
2118                 ndr_print_uint32(ndr, "num_ents", *r->out.num_ents);
2119                 ndr->depth--;
2120                 ndr->print(ndr, "%s: ARRAY(%d)", "entries", (int)*r->out.num_ents);
2121                 ndr->depth++;
2122                 for (cntr_entries_0=0;cntr_entries_0<*r->out.num_ents;cntr_entries_0++) {
2123                         char *idx_0=NULL;
2124                         if (asprintf(&idx_0, "[%d]", cntr_entries_0) != -1) {
2125                                 ndr_print_epm_entry_t(ndr, "entries", &r->out.entries[cntr_entries_0]);
2126                                 free(idx_0);
2127                         }
2128                 }
2129                 ndr->depth--;
2130                 ndr_print_uint32(ndr, "result", r->out.result);
2131                 ndr->depth--;
2132         }
2133         ndr->depth--;
2134 }
2135
2136 _PUBLIC_ enum ndr_err_code ndr_push_epm_Map(struct ndr_push *ndr, int flags, const struct epm_Map *r)
2137 {
2138         uint32_t cntr_towers_0;
2139         if (flags & NDR_IN) {
2140                 NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object));
2141                 if (r->in.object) {
2142                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.object));
2143                 }
2144                 NDR_CHECK(ndr_push_full_ptr(ndr, r->in.map_tower));
2145                 if (r->in.map_tower) {
2146                         NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->in.map_tower));
2147                 }
2148                 if (r->in.entry_handle == NULL) {
2149                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2150                 }
2151                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle));
2152                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_towers));
2153         }
2154         if (flags & NDR_OUT) {
2155                 if (r->out.entry_handle == NULL) {
2156                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2157                 }
2158                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle));
2159                 if (r->out.num_towers == NULL) {
2160                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2161                 }
2162                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_towers));
2163                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_towers));
2164                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2165                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_towers));
2166                 for (cntr_towers_0 = 0; cntr_towers_0 < *r->out.num_towers; cntr_towers_0++) {
2167                         NDR_CHECK(ndr_push_epm_twr_p_t(ndr, NDR_SCALARS, &r->out.towers[cntr_towers_0]));
2168                 }
2169                 for (cntr_towers_0 = 0; cntr_towers_0 < *r->out.num_towers; cntr_towers_0++) {
2170                         NDR_CHECK(ndr_push_epm_twr_p_t(ndr, NDR_BUFFERS, &r->out.towers[cntr_towers_0]));
2171                 }
2172                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
2173         }
2174         return NDR_ERR_SUCCESS;
2175 }
2176
2177 _PUBLIC_ enum ndr_err_code ndr_pull_epm_Map(struct ndr_pull *ndr, int flags, struct epm_Map *r)
2178 {
2179         uint32_t _ptr_object;
2180         uint32_t _ptr_map_tower;
2181         uint32_t cntr_towers_0;
2182         TALLOC_CTX *_mem_save_object_0;
2183         TALLOC_CTX *_mem_save_map_tower_0;
2184         TALLOC_CTX *_mem_save_entry_handle_0;
2185         TALLOC_CTX *_mem_save_num_towers_0;
2186         TALLOC_CTX *_mem_save_towers_0;
2187         if (flags & NDR_IN) {
2188                 ZERO_STRUCT(r->out);
2189
2190                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object));
2191                 if (_ptr_object) {
2192                         NDR_PULL_ALLOC(ndr, r->in.object);
2193                 } else {
2194                         r->in.object = NULL;
2195                 }
2196                 if (r->in.object) {
2197                         _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
2198                         NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0);
2199                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.object));
2200                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0);
2201                 }
2202                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_map_tower));
2203                 if (_ptr_map_tower) {
2204                         NDR_PULL_ALLOC(ndr, r->in.map_tower);
2205                 } else {
2206                         r->in.map_tower = NULL;
2207                 }
2208                 if (r->in.map_tower) {
2209                         _mem_save_map_tower_0 = NDR_PULL_GET_MEM_CTX(ndr);
2210                         NDR_PULL_SET_MEM_CTX(ndr, r->in.map_tower, 0);
2211                         NDR_CHECK(ndr_pull_epm_twr_t(ndr, NDR_SCALARS, r->in.map_tower));
2212                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_map_tower_0, 0);
2213                 }
2214                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2215                         NDR_PULL_ALLOC(ndr, r->in.entry_handle);
2216                 }
2217                 _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2218                 NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC);
2219                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle));
2220                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
2221                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_towers));
2222                 NDR_PULL_ALLOC(ndr, r->out.entry_handle);
2223                 *r->out.entry_handle = *r->in.entry_handle;
2224                 NDR_PULL_ALLOC(ndr, r->out.num_towers);
2225                 ZERO_STRUCTP(r->out.num_towers);
2226         }
2227         if (flags & NDR_OUT) {
2228                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2229                         NDR_PULL_ALLOC(ndr, r->out.entry_handle);
2230                 }
2231                 _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2232                 NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC);
2233                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle));
2234                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
2235                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2236                         NDR_PULL_ALLOC(ndr, r->out.num_towers);
2237                 }
2238                 _mem_save_num_towers_0 = NDR_PULL_GET_MEM_CTX(ndr);
2239                 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_towers, LIBNDR_FLAG_REF_ALLOC);
2240                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_towers));
2241                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_towers_0, LIBNDR_FLAG_REF_ALLOC);
2242                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.towers));
2243                 NDR_CHECK(ndr_pull_array_length(ndr, &r->out.towers));
2244                 if (ndr_get_array_length(ndr, &r->out.towers) > ndr_get_array_size(ndr, &r->out.towers)) {
2245                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.towers), ndr_get_array_length(ndr, &r->out.towers));
2246                 }
2247                 NDR_PULL_ALLOC_N(ndr, r->out.towers, ndr_get_array_size(ndr, &r->out.towers));
2248                 _mem_save_towers_0 = NDR_PULL_GET_MEM_CTX(ndr);
2249                 NDR_PULL_SET_MEM_CTX(ndr, r->out.towers, 0);
2250                 for (cntr_towers_0 = 0; cntr_towers_0 < *r->out.num_towers; cntr_towers_0++) {
2251                         NDR_CHECK(ndr_pull_epm_twr_p_t(ndr, NDR_SCALARS, &r->out.towers[cntr_towers_0]));
2252                 }
2253                 for (cntr_towers_0 = 0; cntr_towers_0 < *r->out.num_towers; cntr_towers_0++) {
2254                         NDR_CHECK(ndr_pull_epm_twr_p_t(ndr, NDR_BUFFERS, &r->out.towers[cntr_towers_0]));
2255                 }
2256                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_towers_0, 0);
2257                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
2258                 if (r->out.towers) {
2259                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.towers, r->in.max_towers));
2260                 }
2261                 if (r->out.towers) {
2262                         NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.towers, *r->out.num_towers));
2263                 }
2264         }
2265         return NDR_ERR_SUCCESS;
2266 }
2267
2268 _PUBLIC_ void ndr_print_epm_Map(struct ndr_print *ndr, const char *name, int flags, const struct epm_Map *r)
2269 {
2270         uint32_t cntr_towers_0;
2271         ndr_print_struct(ndr, name, "epm_Map");
2272         ndr->depth++;
2273         if (flags & NDR_SET_VALUES) {
2274                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2275         }
2276         if (flags & NDR_IN) {
2277                 ndr_print_struct(ndr, "in", "epm_Map");
2278                 ndr->depth++;
2279                 ndr_print_ptr(ndr, "object", r->in.object);
2280                 ndr->depth++;
2281                 if (r->in.object) {
2282                         ndr_print_GUID(ndr, "object", r->in.object);
2283                 }
2284                 ndr->depth--;
2285                 ndr_print_ptr(ndr, "map_tower", r->in.map_tower);
2286                 ndr->depth++;
2287                 if (r->in.map_tower) {
2288                         ndr_print_epm_twr_t(ndr, "map_tower", r->in.map_tower);
2289                 }
2290                 ndr->depth--;
2291                 ndr_print_ptr(ndr, "entry_handle", r->in.entry_handle);
2292                 ndr->depth++;
2293                 ndr_print_policy_handle(ndr, "entry_handle", r->in.entry_handle);
2294                 ndr->depth--;
2295                 ndr_print_uint32(ndr, "max_towers", r->in.max_towers);
2296                 ndr->depth--;
2297         }
2298         if (flags & NDR_OUT) {
2299                 ndr_print_struct(ndr, "out", "epm_Map");
2300                 ndr->depth++;
2301                 ndr_print_ptr(ndr, "entry_handle", r->out.entry_handle);
2302                 ndr->depth++;
2303                 ndr_print_policy_handle(ndr, "entry_handle", r->out.entry_handle);
2304                 ndr->depth--;
2305                 ndr_print_ptr(ndr, "num_towers", r->out.num_towers);
2306                 ndr->depth++;
2307                 ndr_print_uint32(ndr, "num_towers", *r->out.num_towers);
2308                 ndr->depth--;
2309                 ndr->print(ndr, "%s: ARRAY(%d)", "towers", (int)*r->out.num_towers);
2310                 ndr->depth++;
2311                 for (cntr_towers_0=0;cntr_towers_0<*r->out.num_towers;cntr_towers_0++) {
2312                         char *idx_0=NULL;
2313                         if (asprintf(&idx_0, "[%d]", cntr_towers_0) != -1) {
2314                                 ndr_print_epm_twr_p_t(ndr, "towers", &r->out.towers[cntr_towers_0]);
2315                                 free(idx_0);
2316                         }
2317                 }
2318                 ndr->depth--;
2319                 ndr_print_uint32(ndr, "result", r->out.result);
2320                 ndr->depth--;
2321         }
2322         ndr->depth--;
2323 }
2324
2325 static enum ndr_err_code ndr_push_epm_LookupHandleFree(struct ndr_push *ndr, int flags, const struct epm_LookupHandleFree *r)
2326 {
2327         if (flags & NDR_IN) {
2328                 if (r->in.entry_handle == NULL) {
2329                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2330                 }
2331                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle));
2332         }
2333         if (flags & NDR_OUT) {
2334                 if (r->out.entry_handle == NULL) {
2335                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2336                 }
2337                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle));
2338                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
2339         }
2340         return NDR_ERR_SUCCESS;
2341 }
2342
2343 static enum ndr_err_code ndr_pull_epm_LookupHandleFree(struct ndr_pull *ndr, int flags, struct epm_LookupHandleFree *r)
2344 {
2345         TALLOC_CTX *_mem_save_entry_handle_0;
2346         if (flags & NDR_IN) {
2347                 ZERO_STRUCT(r->out);
2348
2349                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2350                         NDR_PULL_ALLOC(ndr, r->in.entry_handle);
2351                 }
2352                 _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2353                 NDR_PULL_SET_MEM_CTX(ndr, r->in.entry_handle, LIBNDR_FLAG_REF_ALLOC);
2354                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.entry_handle));
2355                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
2356                 NDR_PULL_ALLOC(ndr, r->out.entry_handle);
2357                 *r->out.entry_handle = *r->in.entry_handle;
2358         }
2359         if (flags & NDR_OUT) {
2360                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2361                         NDR_PULL_ALLOC(ndr, r->out.entry_handle);
2362                 }
2363                 _mem_save_entry_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2364                 NDR_PULL_SET_MEM_CTX(ndr, r->out.entry_handle, LIBNDR_FLAG_REF_ALLOC);
2365                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.entry_handle));
2366                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_handle_0, LIBNDR_FLAG_REF_ALLOC);
2367                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
2368         }
2369         return NDR_ERR_SUCCESS;
2370 }
2371
2372 _PUBLIC_ void ndr_print_epm_LookupHandleFree(struct ndr_print *ndr, const char *name, int flags, const struct epm_LookupHandleFree *r)
2373 {
2374         ndr_print_struct(ndr, name, "epm_LookupHandleFree");
2375         ndr->depth++;
2376         if (flags & NDR_SET_VALUES) {
2377                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2378         }
2379         if (flags & NDR_IN) {
2380                 ndr_print_struct(ndr, "in", "epm_LookupHandleFree");
2381                 ndr->depth++;
2382                 ndr_print_ptr(ndr, "entry_handle", r->in.entry_handle);
2383                 ndr->depth++;
2384                 ndr_print_policy_handle(ndr, "entry_handle", r->in.entry_handle);
2385                 ndr->depth--;
2386                 ndr->depth--;
2387         }
2388         if (flags & NDR_OUT) {
2389                 ndr_print_struct(ndr, "out", "epm_LookupHandleFree");
2390                 ndr->depth++;
2391                 ndr_print_ptr(ndr, "entry_handle", r->out.entry_handle);
2392                 ndr->depth++;
2393                 ndr_print_policy_handle(ndr, "entry_handle", r->out.entry_handle);
2394                 ndr->depth--;
2395                 ndr_print_uint32(ndr, "result", r->out.result);
2396                 ndr->depth--;
2397         }
2398         ndr->depth--;
2399 }
2400
2401 static enum ndr_err_code ndr_push_epm_InqObject(struct ndr_push *ndr, int flags, const struct epm_InqObject *r)
2402 {
2403         if (flags & NDR_IN) {
2404                 if (r->in.epm_object == NULL) {
2405                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2406                 }
2407                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.epm_object));
2408         }
2409         if (flags & NDR_OUT) {
2410                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
2411         }
2412         return NDR_ERR_SUCCESS;
2413 }
2414
2415 static enum ndr_err_code ndr_pull_epm_InqObject(struct ndr_pull *ndr, int flags, struct epm_InqObject *r)
2416 {
2417         TALLOC_CTX *_mem_save_epm_object_0;
2418         if (flags & NDR_IN) {
2419                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2420                         NDR_PULL_ALLOC(ndr, r->in.epm_object);
2421                 }
2422                 _mem_save_epm_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
2423                 NDR_PULL_SET_MEM_CTX(ndr, r->in.epm_object, LIBNDR_FLAG_REF_ALLOC);
2424                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.epm_object));
2425                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_epm_object_0, LIBNDR_FLAG_REF_ALLOC);
2426         }
2427         if (flags & NDR_OUT) {
2428                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
2429         }
2430         return NDR_ERR_SUCCESS;
2431 }
2432
2433 _PUBLIC_ void ndr_print_epm_InqObject(struct ndr_print *ndr, const char *name, int flags, const struct epm_InqObject *r)
2434 {
2435         ndr_print_struct(ndr, name, "epm_InqObject");
2436         ndr->depth++;
2437         if (flags & NDR_SET_VALUES) {
2438                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2439         }
2440         if (flags & NDR_IN) {
2441                 ndr_print_struct(ndr, "in", "epm_InqObject");
2442                 ndr->depth++;
2443                 ndr_print_ptr(ndr, "epm_object", r->in.epm_object);
2444                 ndr->depth++;
2445                 ndr_print_GUID(ndr, "epm_object", r->in.epm_object);
2446                 ndr->depth--;
2447                 ndr->depth--;
2448         }
2449         if (flags & NDR_OUT) {
2450                 ndr_print_struct(ndr, "out", "epm_InqObject");
2451                 ndr->depth++;
2452                 ndr_print_uint32(ndr, "result", r->out.result);
2453                 ndr->depth--;
2454         }
2455         ndr->depth--;
2456 }
2457
2458 static enum ndr_err_code ndr_push_epm_MgmtDelete(struct ndr_push *ndr, int flags, const struct epm_MgmtDelete *r)
2459 {
2460         if (flags & NDR_IN) {
2461                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.object_speced));
2462                 NDR_CHECK(ndr_push_full_ptr(ndr, r->in.object));
2463                 if (r->in.object) {
2464                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.object));
2465                 }
2466                 NDR_CHECK(ndr_push_full_ptr(ndr, r->in.tower));
2467                 if (r->in.tower) {
2468                         NDR_CHECK(ndr_push_epm_twr_t(ndr, NDR_SCALARS, r->in.tower));
2469                 }
2470         }
2471         if (flags & NDR_OUT) {
2472                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
2473         }
2474         return NDR_ERR_SUCCESS;
2475 }
2476
2477 static enum ndr_err_code ndr_pull_epm_MgmtDelete(struct ndr_pull *ndr, int flags, struct epm_MgmtDelete *r)
2478 {
2479         uint32_t _ptr_object;
2480         uint32_t _ptr_tower;
2481         TALLOC_CTX *_mem_save_object_0;
2482         TALLOC_CTX *_mem_save_tower_0;
2483         if (flags & NDR_IN) {
2484                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.object_speced));
2485                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object));
2486                 if (_ptr_object) {
2487                         NDR_PULL_ALLOC(ndr, r->in.object);
2488                 } else {
2489                         r->in.object = NULL;
2490                 }
2491                 if (r->in.object) {
2492                         _mem_save_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
2493                         NDR_PULL_SET_MEM_CTX(ndr, r->in.object, 0);
2494                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.object));
2495                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_0, 0);
2496                 }
2497                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tower));
2498                 if (_ptr_tower) {
2499                         NDR_PULL_ALLOC(ndr, r->in.tower);
2500                 } else {
2501                         r->in.tower = NULL;
2502                 }
2503                 if (r->in.tower) {
2504                         _mem_save_tower_0 = NDR_PULL_GET_MEM_CTX(ndr);
2505                         NDR_PULL_SET_MEM_CTX(ndr, r->in.tower, 0);
2506                         NDR_CHECK(ndr_pull_epm_twr_t(ndr, NDR_SCALARS, r->in.tower));
2507                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tower_0, 0);
2508                 }
2509         }
2510         if (flags & NDR_OUT) {
2511                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
2512         }
2513         return NDR_ERR_SUCCESS;
2514 }
2515
2516 _PUBLIC_ void ndr_print_epm_MgmtDelete(struct ndr_print *ndr, const char *name, int flags, const struct epm_MgmtDelete *r)
2517 {
2518         ndr_print_struct(ndr, name, "epm_MgmtDelete");
2519         ndr->depth++;
2520         if (flags & NDR_SET_VALUES) {
2521                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2522         }
2523         if (flags & NDR_IN) {
2524                 ndr_print_struct(ndr, "in", "epm_MgmtDelete");
2525                 ndr->depth++;
2526                 ndr_print_uint32(ndr, "object_speced", r->in.object_speced);
2527                 ndr_print_ptr(ndr, "object", r->in.object);
2528                 ndr->depth++;
2529                 if (r->in.object) {
2530                         ndr_print_GUID(ndr, "object", r->in.object);
2531                 }
2532                 ndr->depth--;
2533                 ndr_print_ptr(ndr, "tower", r->in.tower);
2534                 ndr->depth++;
2535                 if (r->in.tower) {
2536                         ndr_print_epm_twr_t(ndr, "tower", r->in.tower);
2537                 }
2538                 ndr->depth--;
2539                 ndr->depth--;
2540         }
2541         if (flags & NDR_OUT) {
2542                 ndr_print_struct(ndr, "out", "epm_MgmtDelete");
2543                 ndr->depth++;
2544                 ndr_print_uint32(ndr, "result", r->out.result);
2545                 ndr->depth--;
2546         }
2547         ndr->depth--;
2548 }
2549
2550 static enum ndr_err_code ndr_push_epm_MapAuth(struct ndr_push *ndr, int flags, const struct epm_MapAuth *r)
2551 {
2552         if (flags & NDR_IN) {
2553         }
2554         if (flags & NDR_OUT) {
2555                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
2556         }
2557         return NDR_ERR_SUCCESS;
2558 }
2559
2560 static enum ndr_err_code ndr_pull_epm_MapAuth(struct ndr_pull *ndr, int flags, struct epm_MapAuth *r)
2561 {
2562         if (flags & NDR_IN) {
2563         }
2564         if (flags & NDR_OUT) {
2565                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
2566         }
2567         return NDR_ERR_SUCCESS;
2568 }
2569
2570 _PUBLIC_ void ndr_print_epm_MapAuth(struct ndr_print *ndr, const char *name, int flags, const struct epm_MapAuth *r)
2571 {
2572         ndr_print_struct(ndr, name, "epm_MapAuth");
2573         ndr->depth++;
2574         if (flags & NDR_SET_VALUES) {
2575                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2576         }
2577         if (flags & NDR_IN) {
2578                 ndr_print_struct(ndr, "in", "epm_MapAuth");
2579                 ndr->depth++;
2580                 ndr->depth--;
2581         }
2582         if (flags & NDR_OUT) {
2583                 ndr_print_struct(ndr, "out", "epm_MapAuth");
2584                 ndr->depth++;
2585                 ndr_print_uint32(ndr, "result", r->out.result);
2586                 ndr->depth--;
2587         }
2588         ndr->depth--;
2589 }
2590
2591 static const struct ndr_interface_call epmapper_calls[] = {
2592         {
2593                 "epm_Insert",
2594                 sizeof(struct epm_Insert),
2595                 (ndr_push_flags_fn_t) ndr_push_epm_Insert,
2596                 (ndr_pull_flags_fn_t) ndr_pull_epm_Insert,
2597                 (ndr_print_function_t) ndr_print_epm_Insert,
2598                 false,
2599         },
2600         {
2601                 "epm_Delete",
2602                 sizeof(struct epm_Delete),
2603                 (ndr_push_flags_fn_t) ndr_push_epm_Delete,
2604                 (ndr_pull_flags_fn_t) ndr_pull_epm_Delete,
2605                 (ndr_print_function_t) ndr_print_epm_Delete,
2606                 false,
2607         },
2608         {
2609                 "epm_Lookup",
2610                 sizeof(struct epm_Lookup),
2611                 (ndr_push_flags_fn_t) ndr_push_epm_Lookup,
2612                 (ndr_pull_flags_fn_t) ndr_pull_epm_Lookup,
2613                 (ndr_print_function_t) ndr_print_epm_Lookup,
2614                 false,
2615         },
2616         {
2617                 "epm_Map",
2618                 sizeof(struct epm_Map),
2619                 (ndr_push_flags_fn_t) ndr_push_epm_Map,
2620                 (ndr_pull_flags_fn_t) ndr_pull_epm_Map,
2621                 (ndr_print_function_t) ndr_print_epm_Map,
2622                 false,
2623         },
2624         {
2625                 "epm_LookupHandleFree",
2626                 sizeof(struct epm_LookupHandleFree),
2627                 (ndr_push_flags_fn_t) ndr_push_epm_LookupHandleFree,
2628                 (ndr_pull_flags_fn_t) ndr_pull_epm_LookupHandleFree,
2629                 (ndr_print_function_t) ndr_print_epm_LookupHandleFree,
2630                 false,
2631         },
2632         {
2633                 "epm_InqObject",
2634                 sizeof(struct epm_InqObject),
2635                 (ndr_push_flags_fn_t) ndr_push_epm_InqObject,
2636                 (ndr_pull_flags_fn_t) ndr_pull_epm_InqObject,
2637                 (ndr_print_function_t) ndr_print_epm_InqObject,
2638                 false,
2639         },
2640         {
2641                 "epm_MgmtDelete",
2642                 sizeof(struct epm_MgmtDelete),
2643                 (ndr_push_flags_fn_t) ndr_push_epm_MgmtDelete,
2644                 (ndr_pull_flags_fn_t) ndr_pull_epm_MgmtDelete,
2645                 (ndr_print_function_t) ndr_print_epm_MgmtDelete,
2646                 false,
2647         },
2648         {
2649                 "epm_MapAuth",
2650                 sizeof(struct epm_MapAuth),
2651                 (ndr_push_flags_fn_t) ndr_push_epm_MapAuth,
2652                 (ndr_pull_flags_fn_t) ndr_pull_epm_MapAuth,
2653                 (ndr_print_function_t) ndr_print_epm_MapAuth,
2654                 false,
2655         },
2656         { NULL, 0, NULL, NULL, NULL, false }
2657 };
2658
2659 static const char * const epmapper_endpoint_strings[] = {
2660         "ncacn_np:[\\pipe\\epmapper]", 
2661         "ncacn_ip_tcp:[135]", 
2662         "ncalrpc:[EPMAPPER]", 
2663 };
2664
2665 static const struct ndr_interface_string_array epmapper_endpoints = {
2666         .count  = 3,
2667         .names  = epmapper_endpoint_strings
2668 };
2669
2670 static const char * const epmapper_authservice_strings[] = {
2671         "host", 
2672 };
2673
2674 static const struct ndr_interface_string_array epmapper_authservices = {
2675         .count  = 1,
2676         .names  = epmapper_authservice_strings
2677 };
2678
2679
2680 const struct ndr_interface_table ndr_table_epmapper = {
2681         .name           = "epmapper",
2682         .syntax_id      = {
2683                 {0xe1af8308,0x5d1f,0x11c9,{0x91,0xa4},{0x08,0x00,0x2b,0x14,0xa0,0xfa}},
2684                 NDR_EPMAPPER_VERSION
2685         },
2686         .helpstring     = NDR_EPMAPPER_HELPSTRING,
2687         .num_calls      = 8,
2688         .calls          = epmapper_calls,
2689         .endpoints      = &epmapper_endpoints,
2690         .authservices   = &epmapper_authservices
2691 };
2692