rerun
[metze/samba/wb-ndr.git] / source / librpc / gen_ndr / winbind_protocol.h
1 /* header auto-generated by pidl */
2
3 #include <stdint.h>
4
5 #include "librpc/gen_ndr/security.h"
6 #include "librpc/gen_ndr/lsa.h"
7 #include "librpc/gen_ndr/samr.h"
8 #include "librpc/gen_ndr/netlogon.h"
9 #ifndef _HEADER_winbind_protocol
10 #define _HEADER_winbind_protocol
11
12 #define WINBIND_MAX_LENGTH_PRIVILEGED   ( 0x0FFFFFFF )
13 #define WINBIND_MAX_LENGTH_UNPRIVILEGED ( 0x00020000 )
14 #define WINBIND_STATUS_FOOBAR   ( WINBIND_STATUS_UNKNOWN_ERROR )
15 #define WINBIND_HEADER_SIZE     ( 0x10 )
16 enum lsa_SidType;
17
18 struct netr_SamInfo3;
19
20 struct samr_DomInfo1;
21
22 enum winbind_status
23 #ifndef USE_UINT_ENUMS
24  {
25         WINBIND_STATUS_OK=0x00000000,
26         WINBIND_STATUS_UNKNOWN_ERROR=0x57420001,
27         WINBIND_STATUS_NOT_IMPLEMENTED=0x57420002,
28         WINBIND_STATUS_NOT_SUPPORTED=0x57420003,
29         WINBIND_STATUS_NO_MEMORY=0x57420004,
30         WINBIND_STATUS_INVALID_PARAMETER=0x57420005,
31         WINBIND_STATUS_INVALID_LEVEL=0x57420006,
32         WINBIND_STATUS_UNKNOWN_LEVEL=0x57420007,
33         WINBIND_STATUS_DOMAIN_OFFLINE=0x57420008
34 }
35 #else
36  { __donnot_use_enum_winbind_status=0x7FFFFFFF}
37 #define WINBIND_STATUS_OK ( 0x00000000 )
38 #define WINBIND_STATUS_UNKNOWN_ERROR ( 0x57420001 )
39 #define WINBIND_STATUS_NOT_IMPLEMENTED ( 0x57420002 )
40 #define WINBIND_STATUS_NOT_SUPPORTED ( 0x57420003 )
41 #define WINBIND_STATUS_NO_MEMORY ( 0x57420004 )
42 #define WINBIND_STATUS_INVALID_PARAMETER ( 0x57420005 )
43 #define WINBIND_STATUS_INVALID_LEVEL ( 0x57420006 )
44 #define WINBIND_STATUS_UNKNOWN_LEVEL ( 0x57420007 )
45 #define WINBIND_STATUS_DOMAIN_OFFLINE ( 0x57420008 )
46 #endif
47 ;
48
49 /* bitmap winbind_header_version */
50 #define WINBIND_HEADER_VERSION ( 0x0001 )
51
52 /* bitmap winbind_header_flags */
53 #define WINBIND_HEADER_FLAGS_RESPONSE ( 0x00000001 )
54 #define WINBIND_HEADER_FLAGS_ERROR ( 0x00000002 )
55
56 struct winbind_header {
57         uint32_t length;
58         const char *magic;/* [value("WBPT"),charset(DOS)] */
59         uint16_t version;/* [value(WINBIND_HEADER_VERSION)] */
60         uint16_t opnum;
61         uint32_t flags;
62 }/* [public] */;
63
64 enum winbind_auth_level
65 #ifndef USE_UINT_ENUMS
66  {
67         WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN=1,
68         WINBIND_AUTH_LEVEL_COMPAT_AUTH_RESPONSE=2
69 }
70 #else
71  { __donnot_use_enum_winbind_auth_level=0x7FFFFFFF}
72 #define WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN ( 1 )
73 #define WINBIND_AUTH_LEVEL_COMPAT_AUTH_RESPONSE ( 2 )
74 #endif
75 ;
76
77 struct winbind_auth_compat_auth_plain_req {
78         uint32_t flags;
79         const char *account_name;/* [charset(UTF8)] */
80         const char *domain_name;/* [unique,charset(UTF8)] */
81         const char *password;/* [charset(UTF8)] */
82         uint32_t num_require_membership_of_sids;
83         struct dom_sid *require_membership_of_sids;/* [unique,size_is(num_require_membership_of_sids)] */
84         const char *krb5_cc_type;/* [unique,charset(UTF8)] */
85         uint64_t *uid;/* [unique] */
86 };
87
88 struct winbind_auth_compat_auth_rep {
89         const char *unix_username;/* [unique,charset(UTF8)] */
90         const char *krb5_cc_name;/* [unique,charset(UTF8)] */
91         struct netr_SamInfo3 *info3;/* [unique] */
92         struct samr_DomInfo1 *password_policy;/* [unique] */
93         DATA_BLOB *afs_token;/* [unique] */
94 };
95
96 struct winbind_auth_compat_auth_response_req {
97         uint32_t flags;
98         const char *account_name;/* [charset(UTF8)] */
99         const char *domain_name;/* [unique,charset(UTF8)] */
100         const char *workstation_name;/* [unique,charset(UTF8)] */
101         uint32_t num_require_membership_of_sids;
102         struct dom_sid *require_membership_of_sids;/* [unique,size_is(num_require_membership_of_sids)] */
103         uint32_t logon_parameters;
104         uint8_t challenge[8];
105         DATA_BLOB lm_response;
106         DATA_BLOB nt_response;
107 };
108
109 union winbind_auth_req {
110         struct winbind_auth_compat_auth_plain_req compat_auth_plain;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN)] */
111         struct winbind_auth_compat_auth_response_req compat_auth_response;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_RESPONSE)] */
112 }/* [switch_type(winbind_auth_level)] */;
113
114 union winbind_auth_rep {
115         struct winbind_auth_compat_auth_rep compat_auth;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN)] */
116 }/* [switch_type(winbind_auth_level)] */;
117
118 enum winbind_trust_level
119 #ifndef USE_UINT_ENUMS
120  {
121         WINBIND_TRUST_LEVEL_COMPAT_LIST=1,
122         WINBIND_TRUST_LEVEL_COMPAT_CHECK_MACHCC=2
123 }
124 #else
125  { __donnot_use_enum_winbind_trust_level=0x7FFFFFFF}
126 #define WINBIND_TRUST_LEVEL_COMPAT_LIST ( 1 )
127 #define WINBIND_TRUST_LEVEL_COMPAT_CHECK_MACHCC ( 2 )
128 #endif
129 ;
130
131 struct winbind_domain_info_compat {
132         const char *netbios_name;/* [charset(UTF8)] */
133         const char *dns_name;/* [unique,charset(UTF8)] */
134         struct dom_sid *sid;/* [ref] */
135         uint32_t is_native_mode;
136         uint32_t is_active_directory;
137         uint32_t is_primary;
138 };
139
140 struct winbind_domain_info_compat_array {
141         uint32_t num_domains;
142         struct winbind_domain_info_compat *domains;
143 };
144
145 struct winbind_domain_info_compat;
146
147 union winbind_trust_req {
148 }/* [switch_type(winbind_trust_level)] */;
149
150 union winbind_trust_rep {
151         struct winbind_domain_info_compat_array compat_trusts;/* [case(WINBIND_TRUST_LEVEL_COMPAT_LIST)] */
152 }/* [switch_type(winbind_trust_level)] */;
153
154 enum winbind_lookup_level
155 #ifndef USE_UINT_ENUMS
156  {
157         WINBIND_LOOKUP_LEVEL_SID2NAME=1,
158         WINBIND_LOOKUP_LEVEL_NAME2SID=2,
159         WINBIND_LOOKUP_LEVEL_RIDS2NAMES=3,
160         WINBIND_LOOKUP_LEVEL_SID2USERINFO=4,
161         WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS=5,
162         WINBIND_LOOKUP_LEVEL_EXPANDALIASES=6
163 }
164 #else
165  { __donnot_use_enum_winbind_lookup_level=0x7FFFFFFF}
166 #define WINBIND_LOOKUP_LEVEL_SID2NAME ( 1 )
167 #define WINBIND_LOOKUP_LEVEL_NAME2SID ( 2 )
168 #define WINBIND_LOOKUP_LEVEL_RIDS2NAMES ( 3 )
169 #define WINBIND_LOOKUP_LEVEL_SID2USERINFO ( 4 )
170 #define WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS ( 5 )
171 #define WINBIND_LOOKUP_LEVEL_EXPANDALIASES ( 6 )
172 #endif
173 ;
174
175 struct winbind_lookup_req_rids {
176         struct dom_sid *domain_sid;/* [unique] */
177         uint32_t num_rids;
178         uint32_t *rids;
179 };
180
181 struct winbind_lookup_name_info {
182         const char *domain_name;/* [charset(UTF8)] */
183         const char *account_name;/* [charset(UTF8)] */
184         enum lsa_SidType type;
185 };
186
187 struct winbind_lookup_sid_info {
188         struct dom_sid *sid;/* [unique] */
189         enum lsa_SidType type;
190 };
191
192 struct winbind_lookup_name_info_array {
193         uint32_t num_names;
194         struct winbind_lookup_name_info *names;
195 };
196
197 struct winbind_lookup_name_info;
198
199 struct winbind_lookup_user_info {
200         const char *account;/* [charset(UTF8)] */
201         const char *gecos;/* [charset(UTF8)] */
202         const char *homedir;/* [charset(UTF8)] */
203         const char *shell;/* [charset(UTF8)] */
204         uint64_t primary_gid;
205         uint32_t primary_rid;
206 };
207
208 struct winbind_lookup_sid_info_array {
209         uint32_t num_sids;
210         struct winbind_lookup_sid_info *sids;
211 };
212
213 struct winbind_lookup_sid_info;
214
215 union winbind_lookup_req {
216         struct dom_sid *sid;/* [unique,case(WINBIND_LOOKUP_LEVEL_SID2NAME)] */
217         const char *name;/* [charset(UTF8),case(WINBIND_LOOKUP_LEVEL_NAME2SID)] */
218         struct winbind_lookup_req_rids rids;/* [case(WINBIND_LOOKUP_LEVEL_RIDS2NAMES)] */
219         struct winbind_lookup_sid_info_array sid_array;/* [case(WINBIND_LOOKUP_LEVEL_EXPANDALIASES)] */
220 }/* [switch_type(winbind_lookup_level)] */;
221
222 union winbind_lookup_rep {
223         struct winbind_lookup_name_info name_info;/* [case(WINBIND_LOOKUP_LEVEL_SID2NAME)] */
224         struct winbind_lookup_sid_info sid_info;/* [case(WINBIND_LOOKUP_LEVEL_NAME2SID)] */
225         struct winbind_lookup_name_info_array name_array;/* [case(WINBIND_LOOKUP_LEVEL_RIDS2NAMES)] */
226         struct winbind_lookup_user_info user_info;/* [case(WINBIND_LOOKUP_LEVEL_SID2USERINFO)] */
227         struct winbind_lookup_sid_info_array sid_array;/* [case(WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS)] */
228 }/* [switch_type(winbind_lookup_level)] */;
229
230 enum winbind_get_idmap_level
231 #ifndef USE_UINT_ENUMS
232  {
233         WINBIND_IDMAP_LEVEL_SID_TO_UID=1,
234         WINBIND_IDMAP_LEVEL_SID_TO_GID=2,
235         WINBIND_IDMAP_LEVEL_UID_TO_SID=3,
236         WINBIND_IDMAP_LEVEL_GID_TO_SID=4
237 }
238 #else
239  { __donnot_use_enum_winbind_get_idmap_level=0x7FFFFFFF}
240 #define WINBIND_IDMAP_LEVEL_SID_TO_UID ( 1 )
241 #define WINBIND_IDMAP_LEVEL_SID_TO_GID ( 2 )
242 #define WINBIND_IDMAP_LEVEL_UID_TO_SID ( 3 )
243 #define WINBIND_IDMAP_LEVEL_GID_TO_SID ( 4 )
244 #endif
245 ;
246
247 union winbind_get_idmap_req {
248         struct dom_sid *sid;/* [unique,case(WINBIND_IDMAP_LEVEL_SID_TO_UID)] */
249         uint64_t uid;/* [case(WINBIND_IDMAP_LEVEL_UID_TO_SID)] */
250         uint64_t gid;/* [case(WINBIND_IDMAP_LEVEL_GID_TO_SID)] */
251 }/* [switch_type(winbind_get_idmap_level)] */;
252
253 union winbind_get_idmap_rep {
254         uint64_t uid;/* [case(WINBIND_IDMAP_LEVEL_SID_TO_UID)] */
255         uint64_t gid;/* [case(WINBIND_IDMAP_LEVEL_SID_TO_GID)] */
256         struct dom_sid *sid;/* [unique,case(WINBIND_IDMAP_LEVEL_UID_TO_SID)] */
257 }/* [switch_type(winbind_get_idmap_level)] */;
258
259 enum winbind_set_idmap_level
260 #ifndef USE_UINT_ENUMS
261  {
262         WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID=1,
263         WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID=2,
264         WINBIND_SET_IDMAP_LEVEL_SET_MAPPING=3,
265         WINBIND_SET_IDMAP_LEVEL_SET_HWM=4
266 }
267 #else
268  { __donnot_use_enum_winbind_set_idmap_level=0x7FFFFFFF}
269 #define WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID ( 1 )
270 #define WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID ( 2 )
271 #define WINBIND_SET_IDMAP_LEVEL_SET_MAPPING ( 3 )
272 #define WINBIND_SET_IDMAP_LEVEL_SET_HWM ( 4 )
273 #endif
274 ;
275
276 union winbind_set_idmap_req {
277         struct id_map mapping;/* [case(WINBIND_SET_IDMAP_LEVEL_SET_MAPPING)] */
278         struct unixid hwm;/* [case(WINBIND_SET_IDMAP_LEVEL_SET_HWM)] */
279 }/* [switch_type(winbind_set_idmap_level)] */;
280
281 union winbind_set_idmap_rep {
282         uint64_t uid;/* [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID)] */
283         uint64_t gid;/* [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID)] */
284 }/* [switch_type(winbind_set_idmap_level)] */;
285
286 enum winbind_domain_info_level
287 #ifndef USE_UINT_ENUMS
288  {
289         WINBIND_DOMAIN_INFO_LEVEL_COMPAT=1,
290         WINBIND_DOMAIN_INFO_LEVEL_SEQNUM=2
291 }
292 #else
293  { __donnot_use_enum_winbind_domain_info_level=0x7FFFFFFF}
294 #define WINBIND_DOMAIN_INFO_LEVEL_COMPAT ( 1 )
295 #define WINBIND_DOMAIN_INFO_LEVEL_SEQNUM ( 2 )
296 #endif
297 ;
298
299 union winbind_domain_info {
300         struct winbind_domain_info_compat compat;/* [case(WINBIND_DOMAIN_INFO_LEVEL_COMPAT)] */
301         uint64_t seqnum;/* [case(WINBIND_DOMAIN_INFO_LEVEL_SEQNUM)] */
302 }/* [switch_type(winbind_domain_info_level)] */;
303
304 enum winbind_dc_info_level
305 #ifndef USE_UINT_ENUMS
306  {
307         WINBIND_DC_INFO_LEVEL_COMPAT_NT4=1,
308         WINBIND_DC_INFO_LEVEL_COMPAT_DS=2
309 }
310 #else
311  { __donnot_use_enum_winbind_dc_info_level=0x7FFFFFFF}
312 #define WINBIND_DC_INFO_LEVEL_COMPAT_NT4 ( 1 )
313 #define WINBIND_DC_INFO_LEVEL_COMPAT_DS ( 2 )
314 #endif
315 ;
316
317 union winbind_dc_info_params {
318         uint32_t flags;/* [case(WINBIND_DC_INFO_LEVEL_COMPAT_DS)] */
319 }/* [switch_type(winbind_dc_info_level)] */;
320
321 union winbind_dc_info {
322         const char *name;/* [unique,charset(UTF8),case(WINBIND_DC_INFO_LEVEL_COMPAT_NT4)] */
323 }/* [switch_type(winbind_dc_info_level)] */;
324
325
326 struct winbind_ping {
327         struct {
328                 enum winbind_status result;
329         } out;
330
331 };
332
333
334 struct winbind_interface_details {
335         struct {
336                 enum winbind_status result;
337         } out;
338
339 };
340
341
342 struct winbind_getpwnam {
343         struct {
344                 enum winbind_status result;
345         } out;
346
347 };
348
349
350 struct winbind_getpwuid {
351         struct {
352                 enum winbind_status result;
353         } out;
354
355 };
356
357
358 struct winbind_getgrnam {
359         struct {
360                 enum winbind_status result;
361         } out;
362
363 };
364
365
366 struct winbind_getgrgid {
367         struct {
368                 enum winbind_status result;
369         } out;
370
371 };
372
373
374 struct winbind_getgroups {
375         struct {
376                 enum winbind_status result;
377         } out;
378
379 };
380
381
382 struct winbind_setpwent {
383         struct {
384                 enum winbind_status result;
385         } out;
386
387 };
388
389
390 struct winbind_endpwent {
391         struct {
392                 enum winbind_status result;
393         } out;
394
395 };
396
397
398 struct winbind_getpwent {
399         struct {
400                 enum winbind_status result;
401         } out;
402
403 };
404
405
406 struct winbind_setgrent {
407         struct {
408                 enum winbind_status result;
409         } out;
410
411 };
412
413
414 struct winbind_endgrent {
415         struct {
416                 enum winbind_status result;
417         } out;
418
419 };
420
421
422 struct winbind_getgrent {
423         struct {
424                 enum winbind_status result;
425         } out;
426
427 };
428
429
430 struct winbind_auth {
431         struct {
432                 enum winbind_auth_level *level;/* [ref] */
433                 union winbind_auth_req req;/* [switch_is(*level)] */
434         } in;
435
436         struct {
437                 union winbind_auth_rep *rep;/* [ref,switch_is(*level)] */
438                 enum winbind_status result;
439         } out;
440
441 };
442
443
444 struct winbind_pam_chauthtok {
445         struct {
446                 enum winbind_status result;
447         } out;
448
449 };
450
451
452 struct winbind_pam_logoff {
453         struct {
454                 enum winbind_status result;
455         } out;
456
457 };
458
459
460 struct winbind_pam_chng_paswd_auth_crap {
461         struct {
462                 enum winbind_status result;
463         } out;
464
465 };
466
467
468 struct winbind_list_users {
469         struct {
470                 enum winbind_status result;
471         } out;
472
473 };
474
475
476 struct winbind_list_groups {
477         struct {
478                 enum winbind_status result;
479         } out;
480
481 };
482
483
484 struct winbind_trust {
485         struct {
486                 enum winbind_trust_level *level;/* [ref] */
487                 union winbind_trust_req req;/* [switch_is(*level)] */
488         } in;
489
490         struct {
491                 union winbind_trust_rep *rep;/* [ref,switch_is(*level)] */
492                 enum winbind_status result;
493         } out;
494
495 };
496
497
498 struct winbind_lookup {
499         struct {
500                 enum winbind_lookup_level *level;/* [ref] */
501                 union winbind_lookup_req req;/* [switch_is(*level)] */
502         } in;
503
504         struct {
505                 union winbind_lookup_rep *rep;/* [ref,switch_is(*level)] */
506                 enum winbind_status result;
507         } out;
508
509 };
510
511
512 struct winbind_get_idmap {
513         struct {
514                 union winbind_get_idmap_req req;/* [switch_is(*level)] */
515                 enum winbind_get_idmap_level *level;/* [ref] */
516         } in;
517
518         struct {
519                 union winbind_get_idmap_rep *rep;/* [ref,switch_is(*level)] */
520                 enum winbind_get_idmap_level *level;/* [ref] */
521                 enum winbind_status result;
522         } out;
523
524 };
525
526
527 struct winbind_set_idmap {
528         struct {
529                 union winbind_set_idmap_req req;/* [switch_is(*level)] */
530                 enum winbind_set_idmap_level *level;/* [ref] */
531         } in;
532
533         struct {
534                 union winbind_set_idmap_rep *rep;/* [ref,switch_is(*level)] */
535                 enum winbind_set_idmap_level *level;/* [ref] */
536                 enum winbind_status result;
537         } out;
538
539 };
540
541
542 struct winbind_info_fixname {
543         struct {
544                 enum winbind_status result;
545         } out;
546
547 };
548
549
550 struct winbind_domain_name {
551         struct {
552                 enum winbind_status result;
553         } out;
554
555 };
556
557
558 struct winbind_get_domain_info {
559         struct {
560                 const char *domain_name;/* [charset(UTF8)] */
561                 const char *dc_name;/* [unique,charset(UTF8)] */
562                 enum winbind_domain_info_level *level;/* [ref] */
563         } in;
564
565         struct {
566                 union winbind_domain_info *domain_info;/* [ref,switch_is(*level)] */
567                 enum winbind_domain_info_level *level;/* [ref] */
568                 enum winbind_status result;
569         } out;
570
571 };
572
573
574 struct winbind_get_dc_info {
575         struct {
576                 const char *domain_name;/* [charset(UTF8)] */
577                 union winbind_dc_info_params params;/* [switch_is(*level)] */
578                 enum winbind_dc_info_level *level;/* [ref] */
579         } in;
580
581         struct {
582                 union winbind_dc_info *dc_info;/* [ref,switch_is(*level)] */
583                 enum winbind_dc_info_level *level;/* [ref] */
584                 enum winbind_status result;
585         } out;
586
587 };
588
589
590 struct winbind_wins_byip {
591         struct {
592                 enum winbind_status result;
593         } out;
594
595 };
596
597
598 struct winbind_wins_byname {
599         struct {
600                 enum winbind_status result;
601         } out;
602
603 };
604
605
606 struct winbind_getgrlist {
607         struct {
608                 enum winbind_status result;
609         } out;
610
611 };
612
613
614 struct winbind_netbios_name {
615         struct {
616                 enum winbind_status result;
617         } out;
618
619 };
620
621
622 struct winbind_getusersids {
623         struct {
624                 enum winbind_status result;
625         } out;
626
627 };
628
629
630 struct winbind_getuserdomgroups {
631         struct {
632                 enum winbind_status result;
633         } out;
634
635 };
636
637
638 struct winbind_dual_userinfo {
639         struct {
640                 enum winbind_status result;
641         } out;
642
643 };
644
645
646 struct winbind_dual_getsidaliases {
647         struct {
648                 enum winbind_status result;
649         } out;
650
651 };
652
653
654 struct winbind_ccache_ntlmauth {
655         struct {
656                 enum winbind_status result;
657         } out;
658
659 };
660
661 #endif /* _HEADER_winbind_protocol */