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