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