s3-samr-idl: add Domain Object specific access rights.
[ira/wip.git] / source3 / librpc / idl / libnetapi.idl
1 /*
2   libnetapi interface definition
3 */
4
5 cpp_quote("#define LIBNETAPI_LOCAL_SERVER(x) (!x || is_myname_or_ipaddr(x))")
6 cpp_quote("#ifndef MAXSUBAUTHS")
7 cpp_quote("#define MAXSUBAUTHS 15 /* max sub authorities in a SID */")
8 cpp_quote("#endif")
9
10 [
11         pointer_default(unique)
12 ]
13 interface libnetapi
14 {
15         const int ERROR_MORE_DATA = 234L;
16
17         [public] typedef [v1_enum] enum {
18                 NERR_Success=0
19         } NET_API_STATUS;
20
21         [public] typedef struct {
22                 uint8 sid_rev_num;
23                 uint8 num_auths;
24                 uint8 id_auth[6];
25                 uint32 sub_auths[MAXSUBAUTHS];
26         } domsid;
27
28         /*******************************************/
29         /* NetJoinDomain                           */
30         /*******************************************/
31
32         typedef [public,bitmap32bit] bitmap {
33                 NETSETUP_JOIN_DOMAIN                    = 0x00000001,
34                 NETSETUP_ACCT_CREATE                    = 0x00000002,
35                 NETSETUP_ACCT_DELETE                    = 0x00000004,
36                 NETSETUP_WIN9X_UPGRADE                  = 0x00000010,
37                 NETSETUP_DOMAIN_JOIN_IF_JOINED          = 0x00000020,
38                 NETSETUP_JOIN_UNSECURE                  = 0x00000040,
39                 NETSETUP_MACHINE_PWD_PASSED             = 0x00000080,
40                 NETSETUP_DEFER_SPN_SET                  = 0x00000100,
41                 NETSETUP_JOIN_DC_ACCOUNT                = 0x00000200,
42                 NETSETUP_JOIN_WITH_NEW_NAME             = 0x00000400,
43                 NETSETUP_INSTALL_INVOCATION             = 0x00040000,
44                 NETSETUP_IGNORE_UNSUPPORTED_FLAGS       = 0x10000000
45         } NetJoinFlags;
46
47         [nopush,nopull] NET_API_STATUS NetJoinDomain(
48                 [in,unique] string *server,
49                 [in,ref] string *domain,
50                 [in,unique] string *account_ou,
51                 [in,unique] string *account,
52                 [in,unique] string *password,
53                 [in] NetJoinFlags join_flags
54                 );
55
56         /*******************************************/
57         /* NetUnjoinDomain                         */
58         /*******************************************/
59
60         [nopush,nopull] NET_API_STATUS NetUnjoinDomain(
61                 [in,unique] string *server_name,
62                 [in,unique] string *account,
63                 [in,unique] string *password,
64                 [in] NetJoinFlags unjoin_flags
65                 );
66
67         /*******************************************/
68         /* NetGetJoinInformation                   */
69         /*******************************************/
70
71         typedef enum {
72                 NetSetupUnknownStatus = 0,
73                 NetSetupUnjoined = 1,
74                 NetSetupWorkgroupName = 2,
75                 NetSetupDomainName = 3
76         } NETSETUP_JOIN_STATUS;
77
78         [nopush,nopull] NET_API_STATUS NetGetJoinInformation(
79                 [in,unique] string *server_name,
80                 [out] string **name_buffer,
81                 [out] uint16 *name_type
82                 );
83
84         /*******************************************/
85         /* NetGetJoinableOUs                       */
86         /*******************************************/
87
88         [nopush,nopull] NET_API_STATUS NetGetJoinableOUs(
89                 [in,unique] string *server_name,
90                 [in,ref] string *domain,
91                 [in,unique] string *account,
92                 [in,unique] string *password,
93                 [out] uint32 *ou_count,
94                 [out] string ***ous
95                 );
96
97         /*******************************************/
98         /* NetRenameMachineInDomain                */
99         /*******************************************/
100
101         [nopush,nopull] NET_API_STATUS NetRenameMachineInDomain(
102                 [in] string server_name,
103                 [in] string new_machine_name,
104                 [in] string account,
105                 [in] string password,
106                 [in] uint32 rename_options
107                 );
108
109         /*******************************************/
110         /* NetServerGetInfo                        */
111         /*******************************************/
112
113         [public] typedef struct {
114                 uint32 sv100_platform_id;
115                 string sv100_name;
116         } SERVER_INFO_100;
117
118         [public] typedef struct {
119                 uint32 sv101_platform_id;
120                 string sv101_name;
121                 uint32 sv101_version_major;
122                 uint32 sv101_version_minor;
123                 uint32 sv101_type;
124                 string sv101_comment;
125         } SERVER_INFO_101;
126
127         [public] typedef struct {
128                 uint32 sv102_platform_id;
129                 string sv102_name;
130                 uint32 sv102_version_major;
131                 uint32 sv102_version_minor;
132                 uint32 sv102_type;
133                 string sv102_comment;
134                 uint32 sv102_users;
135                 uint32 sv102_disc;
136                 boolean8 sv102_hidden;
137                 uint32 sv102_announce;
138                 uint32 sv102_anndelta;
139                 uint32 sv102_licenses;
140                 string sv102_userpath;
141         } SERVER_INFO_102;
142
143         [public] typedef struct {
144                 string sv1005_comment;
145         } SERVER_INFO_1005;
146
147         [nopush,nopull] NET_API_STATUS NetServerGetInfo(
148                 [in,unique] string *server_name,
149                 [in] uint32 level,
150                 [out] uint8 **buffer
151                 );
152
153         /*******************************************/
154         /* NetServerSetInfo                        */
155         /*******************************************/
156
157         [nopush,nopull] NET_API_STATUS NetServerSetInfo(
158                 [in,unique] string *server_name,
159                 [in] uint32 level,
160                 [in] uint8 *buffer,
161                 [out] uint32 *parm_error
162                 );
163
164         /*******************************************/
165         /* NetGetDCName                            */
166         /*******************************************/
167
168         [nopush,nopull] NET_API_STATUS NetGetDCName(
169                 [in,unique] string *server_name,
170                 [in,unique] string *domain_name,
171                 [out] uint8 **buffer
172                 );
173
174         /*******************************************/
175         /* NetGetAnyDCName                         */
176         /*******************************************/
177
178         [nopush,nopull] NET_API_STATUS NetGetAnyDCName(
179                 [in,unique] string *server_name,
180                 [in,unique] string *domain_name,
181                 [out] uint8 **buffer
182                 );
183
184         /*******************************************/
185         /* DsGetDcName                             */
186         /*******************************************/
187
188         [public] typedef struct {
189                 string domain_controller_name;
190                 string domain_controller_address;
191                 uint32 domain_controller_address_type;
192                 GUID domain_guid;
193                 string domain_name;
194                 string dns_forest_name;
195                 uint32 flags;
196                 string dc_site_name;
197                 string client_site_name;
198         } DOMAIN_CONTROLLER_INFO;
199
200         [nopush,nopull] NET_API_STATUS DsGetDcName(
201                 [in,unique] string *server_name,
202                 [in,ref] string *domain_name,
203                 [in,unique] GUID *domain_guid,
204                 [in,unique] string *site_name,
205                 [in] uint32 flags,
206                 [out,ref] DOMAIN_CONTROLLER_INFO **dc_info
207                 );
208
209         /*******************************************/
210         /* NetUserAdd                              */
211         /*******************************************/
212
213         [public] typedef struct {
214                 string usri0_name;
215         } USER_INFO_0;
216
217         /* priv */
218         const int USER_PRIV_GUEST       = 0;
219         const int USER_PRIV_USER        = 1;
220         const int USER_PRIV_ADMIN       = 2;
221
222         [public] typedef struct {
223                 string usri1_name;
224                 string usri1_password;
225                 uint32 usri1_password_age;
226                 uint32 usri1_priv;
227                 string usri1_home_dir;
228                 string usri1_comment;
229                 uint32 usri1_flags;
230                 string usri1_script_path;
231         } USER_INFO_1;
232
233         /* auth_flags in USER_INFO_2 */
234
235         const int AF_OP_PRINT           = 0x1;
236         const int AF_OP_COMM            = 0x2;
237         const int AF_OP_SERVER          = 0x4;
238         const int AF_OP_ACCOUNTS        = 0x8;
239         const int AF_SETTABLE_BITS      = (AF_OP_PRINT | AF_OP_COMM | AF_OP_SERVER | AF_OP_ACCOUNTS);
240
241         const int USER_MAXSTORAGE_UNLIMITED = (uint32_t)-1L;
242
243         [public] typedef struct {
244                 string usri2_name;
245                 string usri2_password;
246                 uint32 usri2_password_age;
247                 uint32 usri2_priv;
248                 string usri2_home_dir;
249                 string usri2_comment;
250                 uint32 usri2_flags;
251                 string usri2_script_path;
252                 uint32 usri2_auth_flags;
253                 string usri2_full_name;
254                 string usri2_usr_comment;
255                 string usri2_parms;
256                 string usri2_workstations;
257                 uint32 usri2_last_logon;
258                 uint32 usri2_last_logoff;
259                 uint32 usri2_acct_expires;
260                 uint32 usri2_max_storage;
261                 uint32 usri2_units_per_week;
262                 uint8 *usri2_logon_hours;
263                 uint32 usri2_bad_pw_count;
264                 uint32 usri2_num_logons;
265                 string usri2_logon_server;
266                 uint32 usri2_country_code;
267                 uint32 usri2_code_page;
268         } USER_INFO_2;
269
270         [public] typedef struct {
271                 string usri3_name;
272                 uint32 usri3_password_age;
273                 uint32 usri3_priv;
274                 string usri3_home_dir;
275                 string usri3_comment;
276                 uint32 usri3_flags;
277                 string usri3_script_path;
278                 uint32 usri3_auth_flags;
279                 string usri3_full_name;
280                 string usri3_usr_comment;
281                 string usri3_parms;
282                 string usri3_workstations;
283                 uint32 usri3_last_logon;
284                 uint32 usri3_last_logoff;
285                 uint32 usri3_acct_expires;
286                 uint32 usri3_max_storage;
287                 uint32 usri3_units_per_week;
288                 uint8 *usri3_logon_hours;
289                 uint32 usri3_bad_pw_count;
290                 uint32 usri3_num_logons;
291                 string usri3_logon_server;
292                 uint32 usri3_country_code;
293                 uint32 usri3_code_page;
294                 uint32 usri3_user_id;
295                 uint32 usri3_primary_group_id;
296                 string usri3_profile;
297                 string usri3_home_dir_drive;
298                 uint32 usri3_password_expired;
299         } USER_INFO_3;
300
301         [public] typedef struct {
302                 string usri4_name;
303                 string usri4_password;
304                 uint32 usri4_password_age;
305                 uint32 usri4_priv;
306                 string usri4_home_dir;
307                 string usri4_comment;
308                 uint32 usri4_flags;
309                 string usri4_script_path;
310                 uint32 usri4_auth_flags;
311                 string usri4_full_name;
312                 string usri4_usr_comment;
313                 string usri4_parms;
314                 string usri4_workstations;
315                 uint32 usri4_last_logon;
316                 uint32 usri4_last_logoff;
317                 uint32 usri4_acct_expires;
318                 uint32 usri4_max_storage;
319                 uint32 usri4_units_per_week;
320                 uint8 *usri4_logon_hours;
321                 uint32 usri4_bad_pw_count;
322                 uint32 usri4_num_logons;
323                 string usri4_logon_server;
324                 uint32 usri4_country_code;
325                 uint32 usri4_code_page;
326                 domsid *usri4_user_sid;
327                 uint32 usri4_primary_group_id;
328                 string usri4_profile;
329                 string usri4_home_dir_drive;
330                 uint32 usri4_password_expired;
331         } USER_INFO_4;
332
333         [public] typedef struct {
334                 string usri10_name;
335                 string usri10_comment;
336                 string usri10_usr_comment;
337                 string usri10_full_name;
338         } USER_INFO_10;
339
340         [public] typedef struct {
341                 string usri11_name;
342                 string usri11_comment;
343                 string usri11_usr_comment;
344                 string usri11_full_name;
345                 uint32 usri11_priv;
346                 uint32 usri11_auth_flags;
347                 uint32 usri11_password_age;
348                 string usri11_home_dir;
349                 string usri11_parms;
350                 uint32 usri11_last_logon;
351                 uint32 usri11_last_logoff;
352                 uint32 usri11_bad_pw_count;
353                 uint32 usri11_num_logons;
354                 string usri11_logon_server;
355                 uint32 usri11_country_code;
356                 string usri11_workstations;
357                 uint32 usri11_max_storage;
358                 uint32 usri11_units_per_week;
359                 uint8 *usri11_logon_hours;
360                 uint32 usri11_code_page;
361         } USER_INFO_11;
362
363         [public] typedef struct {
364                 string usri20_name;
365                 string usri20_full_name;
366                 string usri20_comment;
367                 uint32 usri20_flags;
368                 uint32 usri20_user_id;
369         } USER_INFO_20;
370
371         const int ENCRYPTED_PWLEN = 16;
372
373         [public] typedef struct {
374                 uint8 usri21_password[ENCRYPTED_PWLEN];
375         } USER_INFO_21;
376
377         [public] typedef struct {
378                 string usri22_name;
379                 uint8 usri22_password[ENCRYPTED_PWLEN];
380                 uint32 usri22_password_age;
381                 uint32 usri22_priv;
382                 string usri22_home_dir;
383                 string usri22_comment;
384                 uint32 usri22_flags;
385                 uint32 usri22_script_path;
386                 uint32 usri22_auth_flags;
387                 string usri22_full_name;
388                 string usri22_usr_comment;
389                 string usri22_parms;
390                 string usri22_workstations;
391                 uint32 usri22_last_logon;
392                 uint32 usri22_last_logoff;
393                 uint32 usri22_acct_expires;
394                 uint32 usri22_max_storage;
395                 uint32 usri22_units_per_week;
396                 uint8 *usri22_logon_hours;
397                 uint32 usri22_bad_pw_count;
398                 uint32 usri22_num_logons;
399                 string usri22_logon_server;
400                 uint32 usri22_country_code;
401                 uint32 usri22_code_page;
402         } USER_INFO_22;
403
404         [public] typedef struct {
405                 string usri23_name;
406                 string usri23_full_name;
407                 string usri23_comment;
408                 uint32 usri23_flags;
409                 domsid *usri23_user_sid;
410         } USER_INFO_23;
411
412         [public] typedef struct {
413                 string usri1003_password;
414         } USER_INFO_1003;
415
416         [public] typedef struct {
417                 uint32 usri1005_priv;
418         } USER_INFO_1005;
419
420         [public] typedef struct {
421                 string usri1006_home_dir;
422         } USER_INFO_1006;
423
424         [public] typedef struct {
425                 string usri1007_comment;
426         } USER_INFO_1007;
427
428         [public] typedef struct {
429                 uint32 usri1008_flags;
430         } USER_INFO_1008;
431
432         [public] typedef struct {
433                 string usri1009_script_path;
434         } USER_INFO_1009;
435
436         [public] typedef struct {
437                 uint32 usri1010_auth_flags;
438         } USER_INFO_1010;
439
440         [public] typedef struct {
441                 string usri1011_full_name;
442         } USER_INFO_1011;
443
444         [public] typedef struct {
445                 string usri1012_usr_comment;
446         } USER_INFO_1012;
447
448         [public] typedef struct {
449                 string usri1013_parms;
450         } USER_INFO_1013;
451
452         [public] typedef struct {
453                 string usri1014_workstations;
454         } USER_INFO_1014;
455
456         [public] typedef struct {
457                 uint32 usri1017_acct_expires;
458         } USER_INFO_1017;
459
460         [public] typedef struct {
461                 uint32 usri1018_max_storage;
462         } USER_INFO_1018;
463
464         [public] typedef struct {
465                 uint32 usri1020_units_per_week;
466                 uint8 *usri1020_logon_hours;
467         } USER_INFO_1020;
468
469         [public] typedef struct {
470                 string usri1023_logon_server;
471         } USER_INFO_1023;
472
473         [public] typedef struct {
474                 uint32 usri1024_country_code;
475         } USER_INFO_1024;
476
477         [public] typedef struct {
478                 uint32 usri1025_code_page;
479         } USER_INFO_1025;
480
481         [public] typedef struct {
482                 uint32 usri1051_primary_group_id;
483         } USER_INFO_1051;
484
485         [public] typedef struct {
486                 string usri1052_profile;
487         } USER_INFO_1052;
488
489         [public] typedef struct {
490                 string usri1053_home_dir_drive;
491         } USER_INFO_1053;
492
493         [public] typedef struct {
494                 string usriX_name;
495                 string usriX_password;
496                 uint32 usriX_password_age;
497                 uint32 usriX_priv;
498                 string usriX_home_dir;
499                 string usriX_comment;
500                 uint32 usriX_flags;
501                 string usriX_script_path;
502                 uint32 usriX_auth_flags;
503                 string usriX_full_name;
504                 string usriX_usr_comment;
505                 string usriX_parms;
506                 string usriX_workstations;
507                 uint32 usriX_last_logon;
508                 uint32 usriX_last_logoff;
509                 uint32 usriX_acct_expires;
510                 uint32 usriX_max_storage;
511                 uint32 usriX_units_per_week;
512                 uint8 *usriX_logon_hours;
513                 uint32 usriX_bad_pw_count;
514                 uint32 usriX_num_logons;
515                 string usriX_logon_server;
516                 uint32 usriX_country_code;
517                 uint32 usriX_code_page;
518                 string usriX_profile;
519                 string usriX_home_dir_drive;
520                 uint32 usriX_user_id;
521                 uint32 usriX_primary_group_id;
522                 uint32 usriX_password_expired;
523         } USER_INFO_X;
524
525         [nopush,nopull] NET_API_STATUS NetUserAdd(
526                 [in,unique] string *server_name,
527                 [in] uint32 level,
528                 [in,ref] uint8 *buffer,
529                 [out,ref] uint32 *parm_error
530                 );
531
532         /*******************************************/
533         /* NetUserDel                              */
534         /*******************************************/
535
536         [nopush,nopull] NET_API_STATUS NetUserDel(
537                 [in,unique] string *server_name,
538                 [in,ref] string *user_name
539                 );
540
541         /*******************************************/
542         /* NetUserEnum                             */
543         /*******************************************/
544
545         const int FILTER_TEMP_DUPLICATE_ACCOUNT = 0x0001;
546         const int FILTER_NORMAL_ACCOUNT = 0x0002;
547         const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = 0x0008;
548         const int FILTER_WORKSTATION_TRUST_ACCOUNT = 0x0010;
549         const int FILTER_SERVER_TRUST_ACCOUNT = 0x0020;
550
551         [nopush,nopull] NET_API_STATUS NetUserEnum(
552                 [in,unique] string *server_name,
553                 [in] uint32 level,
554                 [in] uint32 filter,
555                 [out,ref] uint8 **buffer,
556                 [in] uint32 prefmaxlen,
557                 [out,ref] uint32 *entries_read,
558                 [out,ref] uint32 *total_entries,
559                 [in,out,ref] uint32 *resume_handle
560                 );
561
562         /*******************************************/
563         /* NetUserChangePassword                   */
564         /*******************************************/
565
566         [nopush,nopull] NET_API_STATUS NetUserChangePassword(
567                 [in] string domain_name,
568                 [in] string user_name,
569                 [in] string old_password,
570                 [in] string new_password
571                 );
572
573         /*******************************************/
574         /* NetUserGetInfo                          */
575         /*******************************************/
576
577         [nopush,nopull] NET_API_STATUS NetUserGetInfo(
578                 [in] string server_name,
579                 [in] string user_name,
580                 [in] uint32 level,
581                 [out] uint8 **buffer
582                 );
583
584         /*******************************************/
585         /* NetUserSetInfo                          */
586         /*******************************************/
587
588         [nopush,nopull] NET_API_STATUS NetUserSetInfo(
589                 [in] string server_name,
590                 [in] string user_name,
591                 [in] uint32 level,
592                 [in] uint8 *buffer,
593                 [out] uint32 *parm_err
594                 );
595
596         /*******************************************/
597         /* NetUserGetGroups                        */
598         /*******************************************/
599
600         [public] typedef struct {
601                 string grui0_name;
602         } GROUP_USERS_INFO_0;
603
604         [public] typedef struct {
605                 string grui1_name;
606                 uint32 grui1_attributes;
607         } GROUP_USERS_INFO_1;
608
609         [nopush,nopull] NET_API_STATUS NetUserGetGroups(
610                 [in] string server_name,
611                 [in] string user_name,
612                 [in] uint32 level,
613                 [out] uint8 **buffer,
614                 [in] uint32 prefmaxlen,
615                 [out,ref] uint32 *entries_read,
616                 [out,ref] uint32 *total_entries
617                 );
618
619         /*******************************************/
620         /* NetUserSetGroups                        */
621         /*******************************************/
622
623         [nopush,nopull] NET_API_STATUS NetUserSetGroups(
624                 [in] string server_name,
625                 [in] string user_name,
626                 [in] uint32 level,
627                 [in] uint8 *buffer,
628                 [in] uint32 num_entries
629                 );
630
631         /*******************************************/
632         /* NetUserGetLocalGroups                   */
633         /*******************************************/
634
635         const int LG_INCLUDE_INDIRECT = 0x0001;
636
637         typedef struct {
638                 string lgrui0_name;
639         } LOCALGROUP_USERS_INFO_0;
640
641         [nopush,nopull] NET_API_STATUS NetUserGetLocalGroups(
642                 [in] string server_name,
643                 [in] string user_name,
644                 [in] uint32 level,
645                 [in] uint32 flags,
646                 [out] uint8 **buffer,
647                 [in] uint32 prefmaxlen,
648                 [out,ref] uint32 *entries_read,
649                 [out,ref] uint32 *total_entries
650                 );
651
652         /*******************************************/
653         /* NetUserModalsGet                        */
654         /*******************************************/
655
656         const int TIMEQ_FOREVER = (uint32_t)-1L;
657
658         typedef struct {
659                 uint32 usrmod0_min_passwd_len;
660                 uint32 usrmod0_max_passwd_age;
661                 uint32 usrmod0_min_passwd_age;
662                 uint32 usrmod0_force_logoff;
663                 uint32 usrmod0_password_hist_len;
664         } USER_MODALS_INFO_0;
665
666         typedef struct {
667                 uint32 usrmod1_role;
668                 string usrmod1_primary;
669         } USER_MODALS_INFO_1;
670
671         typedef struct {
672                 string usrmod2_domain_name;
673                 domsid *usrmod2_domain_id;
674         } USER_MODALS_INFO_2;
675
676         typedef struct {
677                 uint32 usrmod3_lockout_duration;
678                 uint32 usrmod3_lockout_observation_window;
679                 uint32 usrmod3_lockout_threshold;
680         } USER_MODALS_INFO_3;
681
682         typedef struct {
683                 uint32 usrmod1001_min_passwd_len;
684         } USER_MODALS_INFO_1001;
685
686         typedef struct {
687                 uint32 usrmod1002_max_passwd_age;
688         } USER_MODALS_INFO_1002;
689
690         typedef struct {
691                 uint32 usrmod1003_min_passwd_age;
692         } USER_MODALS_INFO_1003;
693
694         typedef struct {
695                 uint32 usrmod1004_force_logoff;
696         } USER_MODALS_INFO_1004;
697
698         typedef struct {
699                 uint32 usrmod1005_password_hist_len;
700         } USER_MODALS_INFO_1005;
701
702         typedef struct {
703                 uint32 usrmod1006_role;
704         } USER_MODALS_INFO_1006;
705
706         typedef struct {
707                 string usrmod1007_primary;
708         } USER_MODALS_INFO_1007;
709
710         [nopush,nopull] NET_API_STATUS NetUserModalsGet(
711                 [in] string server_name,
712                 [in] uint32 level,
713                 [out,ref] uint8 **buffer
714                 );
715
716         /*******************************************/
717         /* NetUserModalsSet                        */
718         /*******************************************/
719
720         [nopush,nopull] NET_API_STATUS NetUserModalsSet(
721                 [in] string server_name,
722                 [in] uint32 level,
723                 [in] uint8 *buffer,
724                 [out,ref] uint32 *parm_err
725                 );
726
727         /*******************************************/
728         /* NetQueryDisplayInformation              */
729         /*******************************************/
730
731         [public] typedef struct {
732                 string usri1_name;
733                 string usri1_comment;
734                 uint32 usri1_flags;
735                 string usri1_full_name;
736                 uint32 usri1_user_id;
737                 uint32 usri1_next_index;
738         } NET_DISPLAY_USER;
739
740         [public] typedef struct {
741                 string usri2_name;
742                 string usri2_comment;
743                 uint32 usri2_flags;
744                 uint32 usri2_user_id;
745                 uint32 usri2_next_index;
746         } NET_DISPLAY_MACHINE;
747
748         [public] typedef struct {
749                 string grpi3_name;
750                 string grpi3_comment;
751                 uint32 grpi3_group_id;
752                 uint32 grpi3_attributes;
753                 uint32 grpi3_next_index;
754         } NET_DISPLAY_GROUP;
755
756         [nopush,nopull] NET_API_STATUS NetQueryDisplayInformation(
757                 [in,unique] string *server_name,
758                 [in] uint32 level,
759                 [in] uint32 idx,
760                 [in] uint32 entries_requested,
761                 [in] uint32 prefmaxlen,
762                 [out,ref] uint32 *entries_read,
763                 [out,ref,noprint] void **buffer
764                 );
765
766         /*******************************************/
767         /* NetGroupAdd                             */
768         /*******************************************/
769
770         typedef struct {
771                 string grpi0_name;
772         } GROUP_INFO_0;
773
774         typedef struct {
775                 string grpi1_name;
776                 string grpi1_comment;
777         } GROUP_INFO_1;
778
779         typedef struct {
780                 string grpi2_name;
781                 string grpi2_comment;
782                 uint32 grpi2_group_id;
783                 uint32 grpi2_attributes;
784         } GROUP_INFO_2;
785
786         typedef struct {
787                 string grpi3_name;
788                 string grpi3_comment;
789                 domsid *grpi3_group_sid;
790                 uint32 grpi3_attributes;
791         } GROUP_INFO_3;
792
793         typedef struct {
794                 string grpi1002_comment;
795         } GROUP_INFO_1002;
796
797         typedef struct {
798                 uint32 grpi1005_attributes;
799         } GROUP_INFO_1005;
800
801         [nopush,nopull] NET_API_STATUS NetGroupAdd(
802                 [in] string server_name,
803                 [in] uint32 level,
804                 [in] uint8 *buffer,
805                 [out] uint32 *parm_err
806                 );
807
808         /*******************************************/
809         /* NetGroupDel                             */
810         /*******************************************/
811
812         [nopush,nopull] NET_API_STATUS NetGroupDel(
813                 [in] string server_name,
814                 [in] string group_name
815                 );
816
817         /*******************************************/
818         /* NetGroupEnum                            */
819         /*******************************************/
820
821         [nopush,nopull] NET_API_STATUS NetGroupEnum(
822                 [in] string server_name,
823                 [in] uint32 level,
824                 [out,ref] uint8 **buffer,
825                 [in] uint32 prefmaxlen,
826                 [out,ref] uint32 *entries_read,
827                 [out,ref] uint32 *total_entries,
828                 [in,out,ref] uint32 *resume_handle
829                 );
830
831         /*******************************************/
832         /* NetGroupSetInfo                         */
833         /*******************************************/
834
835         [nopush,nopull] NET_API_STATUS NetGroupSetInfo(
836                 [in] string server_name,
837                 [in] string group_name,
838                 [in] uint32 level,
839                 [in] uint8 *buffer,
840                 [out] uint32 *parm_err
841                 );
842
843         /*******************************************/
844         /* NetGroupGetInfo                         */
845         /*******************************************/
846
847         [nopush,nopull] NET_API_STATUS NetGroupGetInfo(
848                 [in] string server_name,
849                 [in] string group_name,
850                 [in] uint32 level,
851                 [out] uint8 **buffer
852                 );
853
854         /*******************************************/
855         /* NetGroupAddUser                         */
856         /*******************************************/
857
858         [nopush,nopull] NET_API_STATUS NetGroupAddUser(
859                 [in] string server_name,
860                 [in] string group_name,
861                 [in] string user_name
862                 );
863
864         /*******************************************/
865         /* NetGroupDelUser                         */
866         /*******************************************/
867
868         [nopush,nopull] NET_API_STATUS NetGroupDelUser(
869                 [in] string server_name,
870                 [in] string group_name,
871                 [in] string user_name
872                 );
873
874         /*******************************************/
875         /* NetGroupGetUsers                        */
876         /*******************************************/
877
878         [nopush,nopull] NET_API_STATUS NetGroupGetUsers(
879                 [in] string server_name,
880                 [in] string group_name,
881                 [in] uint32 level,
882                 [out] uint8 **buffer,
883                 [in] uint32 prefmaxlen,
884                 [out,ref] uint32 *entries_read,
885                 [out,ref] uint32 *total_entries,
886                 [in,out,ref] uint32 *resume_handle
887                 );
888
889         /*******************************************/
890         /* NetGroupSetUsers                        */
891         /*******************************************/
892
893         [nopush,nopull] NET_API_STATUS NetGroupSetUsers(
894                 [in] string server_name,
895                 [in] string group_name,
896                 [in] uint32 level,
897                 [in] uint8 *buffer,
898                 [in] uint32 num_entries
899                 );
900
901         /*******************************************/
902         /* NetLocalGroupAdd                        */
903         /*******************************************/
904
905         typedef struct {
906                 string lgrpi0_name;
907         } LOCALGROUP_INFO_0;
908
909         typedef struct {
910                 string lgrpi1_name;
911                 string lgrpi1_comment;
912         } LOCALGROUP_INFO_1;
913
914         typedef struct {
915                 string lgrpi1002_comment;
916         } LOCALGROUP_INFO_1002;
917
918         [nopush,nopull] NET_API_STATUS NetLocalGroupAdd(
919                 [in] string server_name,
920                 [in] uint32 level,
921                 [in] uint8 *buffer,
922                 [out,ref] uint32 *parm_err
923                 );
924
925         /*******************************************/
926         /* NetLocalGroupDel                        */
927         /*******************************************/
928
929         [nopush,nopull] NET_API_STATUS NetLocalGroupDel(
930                 [in] string server_name,
931                 [in] string group_name
932                 );
933
934         /*******************************************/
935         /* NetLocalGroupGetInfo                    */
936         /*******************************************/
937
938         [nopush,nopull] NET_API_STATUS NetLocalGroupGetInfo(
939                 [in] string server_name,
940                 [in] string group_name,
941                 [in] uint32 level,
942                 [out,ref] uint8 **buffer
943                 );
944
945         /*******************************************/
946         /* NetLocalGroupSetInfo                    */
947         /*******************************************/
948
949         [nopush,nopull] NET_API_STATUS NetLocalGroupSetInfo(
950                 [in] string server_name,
951                 [in] string group_name,
952                 [in] uint32 level,
953                 [in,ref] uint8 *buffer,
954                 [out,ref] uint32 *parm_err
955                 );
956
957         /*******************************************/
958         /* NetLocalGroupEnum                       */
959         /*******************************************/
960
961         [nopush,nopull] NET_API_STATUS NetLocalGroupEnum(
962                 [in] string server_name,
963                 [in] uint32 level,
964                 [out,ref] uint8 **buffer,
965                 [in] uint32 prefmaxlen,
966                 [out,ref] uint32 *entries_read,
967                 [out,ref] uint32 *total_entries,
968                 [in,out,ref] uint32 *resume_handle
969                 );
970
971         /*******************************************/
972         /* NetLocalGroupAddMembers                 */
973         /*******************************************/
974
975         typedef enum {
976                 SidTypeUser             = 1,
977                 SidTypeGroup            = 2,
978                 SidTypeDomain           = 3,
979                 SidTypeAlias            = 4,
980                 SidTypeWellKnownGroup   = 5,
981                 SidTypeDeletedAccount   = 6,
982                 SidTypeInvalid          = 7,
983                 SidTypeUnknown          = 8,
984                 SidTypeComputer         = 9,
985                 SidTypeLabel            = 10
986         } SID_NAME_USE;
987
988         typedef struct {
989                 domsid *lgrmi0_sid;
990         } LOCALGROUP_MEMBERS_INFO_0;
991
992         typedef struct {
993                 domsid *lgrmi1_sid;
994                 SID_NAME_USE lgrmi1_sidusage;
995                 string lgrmi1_name;
996         } LOCALGROUP_MEMBERS_INFO_1;
997
998         typedef struct {
999                 domsid *lgrmi2_sid;
1000                 SID_NAME_USE lgrmi2_sidusage;
1001                 string lgrmi2_domainandname;
1002         } LOCALGROUP_MEMBERS_INFO_2;
1003
1004         typedef struct {
1005                 string lgrmi3_domainandname;
1006         } LOCALGROUP_MEMBERS_INFO_3;
1007
1008         [nopush,nopull] NET_API_STATUS NetLocalGroupAddMembers(
1009                 [in] string server_name,
1010                 [in] string group_name,
1011                 [in] uint32 level,
1012                 [in] uint8 *buffer,
1013                 [in] uint32 total_entries
1014                 );
1015
1016         /*******************************************/
1017         /* NetLocalGroupDelMembers                 */
1018         /*******************************************/
1019
1020         [nopush,nopull] NET_API_STATUS NetLocalGroupDelMembers(
1021                 [in] string server_name,
1022                 [in] string group_name,
1023                 [in] uint32 level,
1024                 [in] uint8 *buffer,
1025                 [in] uint32 total_entries
1026                 );
1027
1028         /*******************************************/
1029         /* NetLocalGroupGetMembers                 */
1030         /*******************************************/
1031
1032         [nopush,nopull] NET_API_STATUS NetLocalGroupGetMembers(
1033                 [in] string server_name,
1034                 [in] string local_group_name,
1035                 [in] uint32 level,
1036                 [out] uint8 **buffer,
1037                 [in] uint32 prefmaxlen,
1038                 [out] uint32 *entries_read,
1039                 [out] uint32 *total_entries,
1040                 [in,out] uint32 *resume_handle
1041                 );
1042
1043         /*******************************************/
1044         /* NetLocalGroupSetMembers                 */
1045         /*******************************************/
1046
1047         [nopush,nopull] NET_API_STATUS NetLocalGroupSetMembers(
1048                 [in] string server_name,
1049                 [in] string group_name,
1050                 [in] uint32 level,
1051                 [in] uint8 *buffer,
1052                 [in] uint32 total_entries
1053                 );
1054
1055         /*******************************************/
1056         /* NetRemoteTOD                            */
1057         /*******************************************/
1058
1059         typedef struct {
1060                 uint32 tod_elapsedt;
1061                 uint32 tod_msecs;
1062                 uint32 tod_hours;
1063                 uint32 tod_mins;
1064                 uint32 tod_secs;
1065                 uint32 tod_hunds;
1066                 int32 tod_timezone;
1067                 uint32 tod_tinterval;
1068                 uint32 tod_day;
1069                 uint32 tod_month;
1070                 uint32 tod_year;
1071                 uint32 tod_weekday;
1072         } TIME_OF_DAY_INFO;
1073
1074         [nopush,nopull] NET_API_STATUS NetRemoteTOD(
1075                 [in] string server_name,
1076                 [out,ref] uint8 **buffer
1077                 );
1078
1079         /*******************************************/
1080         /* NetShareAdd                             */
1081         /*******************************************/
1082
1083         typedef struct {
1084                 string shi0_netname;
1085         } SHARE_INFO_0;
1086
1087         typedef struct {
1088                 string shi1_netname;
1089                 uint32 shi1_type;
1090                 string shi1_remark;
1091         } SHARE_INFO_1;
1092
1093         typedef struct {
1094                 string shi2_netname;
1095                 uint32 shi2_type;
1096                 string shi2_remark;
1097                 uint32 shi2_permissions;
1098                 uint32 shi2_max_uses;
1099                 uint32 shi2_current_uses;
1100                 string shi2_path;
1101                 string shi2_passwd;
1102         } SHARE_INFO_2;
1103
1104         typedef struct {
1105                 string shi501_netname;
1106                 uint32 shi501_type;
1107                 string shi501_remark;
1108                 uint32 shi501_flags;
1109         } SHARE_INFO_501;
1110
1111         typedef struct {
1112                 string shi1004_remark;
1113         } SHARE_INFO_1004;
1114
1115         const int CSC_MASK = 0x30;
1116
1117         typedef [public,bitmap32bit] bitmap {
1118                 SHI1005_FLAGS_DFS                               = 0x01,
1119                 SHI1005_FLAGS_DFS_ROOT                          = 0x02,
1120                 CSC_CACHE_MANUAL_REINT                          = 0x00,
1121                 CSC_CACHE_AUTO_REINT                            = 0x10,
1122                 CSC_CACHE_VDO                                   = 0x20,
1123                 CSC_CACHE_NONE                                  = 0x30,
1124                 SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS          = 0x0100,
1125                 SHI1005_FLAGS_FORCE_SHARED_DELETE               = 0x0200,
1126                 SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING           = 0x0400,
1127                 SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM       = 0x0800
1128         } SHARE_INFO_1005_FLAGS;
1129
1130         typedef struct {
1131                 SHARE_INFO_1005_FLAGS shi1005_flags;
1132         } SHARE_INFO_1005;
1133
1134         typedef struct {
1135                 uint32 shi1006_max_uses;
1136         } SHARE_INFO_1006;
1137
1138         [nopush,nopull] NET_API_STATUS NetShareAdd(
1139                 [in] string server_name,
1140                 [in] uint32 level,
1141                 [in] uint8 *buffer,
1142                 [out] uint32 *parm_err
1143                 );
1144
1145         /*******************************************/
1146         /* NetShareDel                             */
1147         /*******************************************/
1148
1149         [nopush,nopull] NET_API_STATUS NetShareDel(
1150                 [in] string server_name,
1151                 [in] string net_name,
1152                 [in] uint32 reserved
1153                 );
1154
1155         /*******************************************/
1156         /* NetShareEnum                            */
1157         /*******************************************/
1158
1159         [nopush,nopull] NET_API_STATUS NetShareEnum(
1160                 [in] string server_name,
1161                 [in] uint32 level,
1162                 [out] uint8 **buffer,
1163                 [in] uint32 prefmaxlen,
1164                 [out] uint32 *entries_read,
1165                 [out] uint32 *total_entries,
1166                 [in,out] uint32 *resume_handle
1167                 );
1168
1169         /*******************************************/
1170         /* NetShareGetInfo                         */
1171         /*******************************************/
1172
1173         [nopush,nopull] NET_API_STATUS NetShareGetInfo(
1174                 [in] string server_name,
1175                 [in] string net_name,
1176                 [in] uint32 level,
1177                 [out] uint8 **buffer
1178                 );
1179
1180         /*******************************************/
1181         /* NetShareSetInfo                         */
1182         /*******************************************/
1183
1184         [nopush,nopull] NET_API_STATUS NetShareSetInfo(
1185                 [in] string server_name,
1186                 [in] string net_name,
1187                 [in] uint32 level,
1188                 [in] uint8 *buffer,
1189                 [out] uint32 *parm_err
1190                 );
1191
1192         /*******************************************/
1193         /* NetFileClose                            */
1194         /*******************************************/
1195
1196         [nopush,nopull] NET_API_STATUS NetFileClose(
1197                 [in] string server_name,
1198                 [in] uint32 fileid
1199                 );
1200
1201         /*******************************************/
1202         /* NetFileGetInfo                          */
1203         /*******************************************/
1204
1205         typedef struct {
1206                 uint32 fi2_id;
1207         } FILE_INFO_2;
1208
1209         typedef struct {
1210                 uint32 fi3_id;
1211                 uint32 fi3_permissions;
1212                 uint32 fi3_num_locks;
1213                 string fi3_pathname;
1214                 string fi3_username;
1215         } FILE_INFO_3;
1216
1217         [nopush,nopull] NET_API_STATUS NetFileGetInfo(
1218                 [in] string server_name,
1219                 [in] uint32 fileid,
1220                 [in] uint32 level,
1221                 [out] uint8 **buffer
1222                 );
1223
1224         /*******************************************/
1225         /* NetFileEnum                             */
1226         /*******************************************/
1227
1228         [nopush,nopull] NET_API_STATUS NetFileEnum(
1229                 [in] string server_name,
1230                 [in] string base_path,
1231                 [in] string user_name,
1232                 [in] uint32 level,
1233                 [out] uint8 **buffer,
1234                 [in] uint32 prefmaxlen,
1235                 [out] uint32 *entries_read,
1236                 [out] uint32 *total_entries,
1237                 [in,out] uint32 *resume_handle
1238                 );
1239 }