netapi: add NetShareDel to IDL.
[kai/samba.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         [nopush,nopull] NET_API_STATUS NetGetJoinInformation(
72                 [in,unique] string *server_name,
73                 [out] string **name_buffer,
74                 [out] uint16 *name_type
75                 );
76
77         /*******************************************/
78         /* NetGetJoinableOUs                       */
79         /*******************************************/
80
81         [nopush,nopull] NET_API_STATUS NetGetJoinableOUs(
82                 [in,unique] string *server_name,
83                 [in,ref] string *domain,
84                 [in,unique] string *account,
85                 [in,unique] string *password,
86                 [out] uint32 *ou_count,
87                 [out] string ***ous
88                 );
89
90         /*******************************************/
91         /* NetServerGetInfo                        */
92         /*******************************************/
93
94         [public] typedef struct {
95                 string sv1005_comment;
96         } SERVER_INFO_1005;
97
98         [nopush,nopull] NET_API_STATUS NetServerGetInfo(
99                 [in,unique] string *server_name,
100                 [in] uint32 level,
101                 [out] uint8 **buffer
102                 );
103
104         /*******************************************/
105         /* NetServerSetInfo                        */
106         /*******************************************/
107
108         [nopush,nopull] NET_API_STATUS NetServerSetInfo(
109                 [in,unique] string *server_name,
110                 [in] uint32 level,
111                 [in] uint8 *buffer,
112                 [out] uint32 *parm_error
113                 );
114
115         /*******************************************/
116         /* NetGetDCName                            */
117         /*******************************************/
118
119         [nopush,nopull] NET_API_STATUS NetGetDCName(
120                 [in,unique] string *server_name,
121                 [in,unique] string *domain_name,
122                 [out] uint8 **buffer
123                 );
124
125         /*******************************************/
126         /* NetGetAnyDCName                         */
127         /*******************************************/
128
129         [nopush,nopull] NET_API_STATUS NetGetAnyDCName(
130                 [in,unique] string *server_name,
131                 [in,unique] string *domain_name,
132                 [out] uint8 **buffer
133                 );
134
135         /*******************************************/
136         /* DsGetDcName                             */
137         /*******************************************/
138
139         [public] typedef struct {
140                 string domain_controller_name;
141                 string domain_controller_address;
142                 uint32 domain_controller_address_type;
143                 GUID domain_guid;
144                 string domain_name;
145                 string dns_forest_name;
146                 uint32 flags;
147                 string dc_site_name;
148                 string client_site_name;
149         } DOMAIN_CONTROLLER_INFO;
150
151         [nopush,nopull] NET_API_STATUS DsGetDcName(
152                 [in,unique] string *server_name,
153                 [in,ref] string *domain_name,
154                 [in,unique] GUID *domain_guid,
155                 [in,unique] string *site_name,
156                 [in] uint32 flags,
157                 [out,ref] DOMAIN_CONTROLLER_INFO **dc_info
158                 );
159
160         /*******************************************/
161         /* NetUserAdd                              */
162         /*******************************************/
163
164         [public] typedef struct {
165                 string usri0_name;
166         } USER_INFO_0;
167
168         /* priv */
169         const int USER_PRIV_GUEST       = 0;
170         const int USER_PRIV_USER        = 1;
171         const int USER_PRIV_ADMIN       = 2;
172
173         [public] typedef struct {
174                 string usri1_name;
175                 string usri1_password;
176                 uint32 usri1_password_age;
177                 uint32 usri1_priv;
178                 string usri1_home_dir;
179                 string usri1_comment;
180                 uint32 usri1_flags;
181                 string usri1_script_path;
182         } USER_INFO_1;
183
184         /* auth_flags in USER_INFO_2 */
185
186         const int AF_OP_PRINT           = 0x1;
187         const int AF_OP_COMM            = 0x2;
188         const int AF_OP_SERVER          = 0x4;
189         const int AF_OP_ACCOUNTS        = 0x8;
190         const int AF_SETTABLE_BITS      = (AF_OP_PRINT | AF_OP_COMM | AF_OP_SERVER | AF_OP_ACCOUNTS);
191
192         const int USER_MAXSTORAGE_UNLIMITED = (uint32_t)-1L;
193
194         [public] typedef struct {
195                 string usri2_name;
196                 string usri2_password;
197                 uint32 usri2_password_age;
198                 uint32 usri2_priv;
199                 string usri2_home_dir;
200                 string usri2_comment;
201                 uint32 usri2_flags;
202                 string usri2_script_path;
203                 uint32 usri2_auth_flags;
204                 string usri2_full_name;
205                 string usri2_usr_comment;
206                 string usri2_parms;
207                 string usri2_workstations;
208                 uint32 usri2_last_logon;
209                 uint32 usri2_last_logoff;
210                 uint32 usri2_acct_expires;
211                 uint32 usri2_max_storage;
212                 uint32 usri2_units_per_week;
213                 uint8 *usri2_logon_hours;
214                 uint32 usri2_bad_pw_count;
215                 uint32 usri2_num_logons;
216                 string usri2_logon_server;
217                 uint32 usri2_country_code;
218                 uint32 usri2_code_page;
219         } USER_INFO_2;
220
221         [public] typedef struct {
222                 string usri3_name;
223                 uint32 usri3_password_age;
224                 uint32 usri3_priv;
225                 string usri3_home_dir;
226                 string usri3_comment;
227                 uint32 usri3_flags;
228                 string usri3_script_path;
229                 uint32 usri3_auth_flags;
230                 string usri3_full_name;
231                 string usri3_usr_comment;
232                 string usri3_parms;
233                 string usri3_workstations;
234                 uint32 usri3_last_logon;
235                 uint32 usri3_last_logoff;
236                 uint32 usri3_acct_expires;
237                 uint32 usri3_max_storage;
238                 uint32 usri3_units_per_week;
239                 uint8 *usri3_logon_hours;
240                 uint32 usri3_bad_pw_count;
241                 uint32 usri3_num_logons;
242                 string usri3_logon_server;
243                 uint32 usri3_country_code;
244                 uint32 usri3_code_page;
245                 uint32 usri3_user_id;
246                 uint32 usri3_primary_group_id;
247                 string usri3_profile;
248                 string usri3_home_dir_drive;
249                 uint32 usri3_password_expired;
250         } USER_INFO_3;
251
252         [public] typedef struct {
253                 string usri4_name;
254                 string usri4_password;
255                 uint32 usri4_password_age;
256                 uint32 usri4_priv;
257                 string usri4_home_dir;
258                 string usri4_comment;
259                 uint32 usri4_flags;
260                 string usri4_script_path;
261                 uint32 usri4_auth_flags;
262                 string usri4_full_name;
263                 string usri4_usr_comment;
264                 string usri4_parms;
265                 string usri4_workstations;
266                 uint32 usri4_last_logon;
267                 uint32 usri4_last_logoff;
268                 uint32 usri4_acct_expires;
269                 uint32 usri4_max_storage;
270                 uint32 usri4_units_per_week;
271                 uint8 *usri4_logon_hours;
272                 uint32 usri4_bad_pw_count;
273                 uint32 usri4_num_logons;
274                 string usri4_logon_server;
275                 uint32 usri4_country_code;
276                 uint32 usri4_code_page;
277                 domsid *usri4_user_sid;
278                 uint32 usri4_primary_group_id;
279                 string usri4_profile;
280                 string usri4_home_dir_drive;
281                 uint32 usri4_password_expired;
282         } USER_INFO_4;
283
284         [public] typedef struct {
285                 string usri10_name;
286                 string usri10_comment;
287                 string usri10_usr_comment;
288                 string usri10_full_name;
289         } USER_INFO_10;
290
291         [public] typedef struct {
292                 string usri11_name;
293                 string usri11_comment;
294                 string usri11_usr_comment;
295                 string usri11_full_name;
296                 uint32 usri11_priv;
297                 uint32 usri11_auth_flags;
298                 uint32 usri11_password_age;
299                 string usri11_home_dir;
300                 string usri11_parms;
301                 uint32 usri11_last_logon;
302                 uint32 usri11_last_logoff;
303                 uint32 usri11_bad_pw_count;
304                 uint32 usri11_num_logons;
305                 string usri11_logon_server;
306                 uint32 usri11_country_code;
307                 string usri11_workstations;
308                 uint32 usri11_max_storage;
309                 uint32 usri11_units_per_week;
310                 uint8 *usri11_logon_hours;
311                 uint32 usri11_code_page;
312         } USER_INFO_11;
313
314         [public] typedef struct {
315                 string usri20_name;
316                 string usri20_full_name;
317                 string usri20_comment;
318                 uint32 usri20_flags;
319                 uint32 usri20_user_id;
320         } USER_INFO_20;
321
322         const int ENCRYPTED_PWLEN = 16;
323
324         [public] typedef struct {
325                 uint8 usri21_password[ENCRYPTED_PWLEN];
326         } USER_INFO_21;
327
328         [public] typedef struct {
329                 string usri22_name;
330                 uint8 usri22_password[ENCRYPTED_PWLEN];
331                 uint32 usri22_password_age;
332                 uint32 usri22_priv;
333                 string usri22_home_dir;
334                 string usri22_comment;
335                 uint32 usri22_flags;
336                 uint32 usri22_script_path;
337                 uint32 usri22_auth_flags;
338                 string usri22_full_name;
339                 string usri22_usr_comment;
340                 string usri22_parms;
341                 string usri22_workstations;
342                 uint32 usri22_last_logon;
343                 uint32 usri22_last_logoff;
344                 uint32 usri22_acct_expires;
345                 uint32 usri22_max_storage;
346                 uint32 usri22_units_per_week;
347                 uint8 *usri22_logon_hours;
348                 uint32 usri22_bad_pw_count;
349                 uint32 usri22_num_logons;
350                 string usri22_logon_server;
351                 uint32 usri22_country_code;
352                 uint32 usri22_code_page;
353         } USER_INFO_22;
354
355         [public] typedef struct {
356                 string usri23_name;
357                 string usri23_full_name;
358                 string usri23_comment;
359                 uint32 usri23_flags;
360                 domsid *usri23_user_sid;
361         } USER_INFO_23;
362
363         [public] typedef struct {
364                 string usri1003_password;
365         } USER_INFO_1003;
366
367         [public] typedef struct {
368                 uint32 usri1005_priv;
369         } USER_INFO_1005;
370
371         [public] typedef struct {
372                 string usri1006_home_dir;
373         } USER_INFO_1006;
374
375         [public] typedef struct {
376                 string usri1007_comment;
377         } USER_INFO_1007;
378
379         [public] typedef struct {
380                 uint32 usri1008_flags;
381         } USER_INFO_1008;
382
383         [public] typedef struct {
384                 string usri1009_script_path;
385         } USER_INFO_1009;
386
387         [public] typedef struct {
388                 uint32 usri1010_auth_flags;
389         } USER_INFO_1010;
390
391         [public] typedef struct {
392                 string usri1011_full_name;
393         } USER_INFO_1011;
394
395         [public] typedef struct {
396                 string usri1012_usr_comment;
397         } USER_INFO_1012;
398
399         [public] typedef struct {
400                 string usri1013_parms;
401         } USER_INFO_1013;
402
403         [public] typedef struct {
404                 string usri1014_workstations;
405         } USER_INFO_1014;
406
407         [public] typedef struct {
408                 uint32 usri1017_acct_expires;
409         } USER_INFO_1017;
410
411         [public] typedef struct {
412                 uint32 usri1018_max_storage;
413         } USER_INFO_1018;
414
415         [public] typedef struct {
416                 uint32 usri1020_units_per_week;
417                 uint8 *usri1020_logon_hours;
418         } USER_INFO_1020;
419
420         [public] typedef struct {
421                 string usri1023_logon_server;
422         } USER_INFO_1023;
423
424         [public] typedef struct {
425                 uint32 usri1024_country_code;
426         } USER_INFO_1024;
427
428         [public] typedef struct {
429                 uint32 usri1025_code_page;
430         } USER_INFO_1025;
431
432         [public] typedef struct {
433                 uint32 usri1051_primary_group_id;
434         } USER_INFO_1051;
435
436         [public] typedef struct {
437                 string usri1052_profile;
438         } USER_INFO_1052;
439
440         [public] typedef struct {
441                 string usri1053_home_dir_drive;
442         } USER_INFO_1053;
443
444         [public] typedef struct {
445                 string usriX_name;
446                 string usriX_password;
447                 uint32 usriX_password_age;
448                 uint32 usriX_priv;
449                 string usriX_home_dir;
450                 string usriX_comment;
451                 uint32 usriX_flags;
452                 string usriX_script_path;
453                 uint32 usriX_auth_flags;
454                 string usriX_full_name;
455                 string usriX_usr_comment;
456                 string usriX_parms;
457                 string usriX_workstations;
458                 uint32 usriX_last_logon;
459                 uint32 usriX_last_logoff;
460                 uint32 usriX_acct_expires;
461                 uint32 usriX_max_storage;
462                 uint32 usriX_units_per_week;
463                 uint8 *usriX_logon_hours;
464                 uint32 usriX_bad_pw_count;
465                 uint32 usriX_num_logons;
466                 string usriX_logon_server;
467                 uint32 usriX_country_code;
468                 uint32 usriX_code_page;
469                 string usriX_profile;
470                 string usriX_home_dir_drive;
471                 uint32 usriX_primary_group_id;
472         } USER_INFO_X;
473
474         [nopush,nopull] NET_API_STATUS NetUserAdd(
475                 [in,unique] string *server_name,
476                 [in] uint32 level,
477                 [in,ref] uint8 *buffer,
478                 [out,ref] uint32 *parm_error
479                 );
480
481         /*******************************************/
482         /* NetUserDel                              */
483         /*******************************************/
484
485         [nopush,nopull] NET_API_STATUS NetUserDel(
486                 [in,unique] string *server_name,
487                 [in,ref] string *user_name
488                 );
489
490         /*******************************************/
491         /* NetUserEnum                             */
492         /*******************************************/
493
494         const int FILTER_TEMP_DUPLICATE_ACCOUNT = 0x0001;
495         const int FILTER_NORMAL_ACCOUNT = 0x0002;
496         const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = 0x0008;
497         const int FILTER_WORKSTATION_TRUST_ACCOUNT = 0x0010;
498         const int FILTER_SERVER_TRUST_ACCOUNT = 0x0020;
499
500         [nopush,nopull] NET_API_STATUS NetUserEnum(
501                 [in,unique] string *server_name,
502                 [in] uint32 level,
503                 [in] uint32 filter,
504                 [out,ref] uint8 **buffer,
505                 [in] uint32 prefmaxlen,
506                 [out,ref] uint32 *entries_read,
507                 [out,ref] uint32 *total_entries,
508                 [in,out,ref] uint32 *resume_handle
509                 );
510
511         /*******************************************/
512         /* NetUserChangePassword                   */
513         /*******************************************/
514
515         [nopush,nopull] NET_API_STATUS NetUserChangePassword(
516                 [in] string domain_name,
517                 [in] string user_name,
518                 [in] string old_password,
519                 [in] string new_password
520                 );
521
522         /*******************************************/
523         /* NetUserGetInfo                          */
524         /*******************************************/
525
526         [nopush,nopull] NET_API_STATUS NetUserGetInfo(
527                 [in] string server_name,
528                 [in] string user_name,
529                 [in] uint32 level,
530                 [out] uint8 **buffer
531                 );
532
533         /*******************************************/
534         /* NetUserSetInfo                          */
535         /*******************************************/
536
537         [nopush,nopull] NET_API_STATUS NetUserSetInfo(
538                 [in] string server_name,
539                 [in] string user_name,
540                 [in] uint32 level,
541                 [in] uint8 *buffer,
542                 [out] uint32 *parm_err
543                 );
544
545         /*******************************************/
546         /* NetUserGetGroups                        */
547         /*******************************************/
548
549         [public] typedef struct {
550                 string grui0_name;
551         } GROUP_USERS_INFO_0;
552
553         [public] typedef struct {
554                 string grui1_name;
555                 uint32 grui1_attributes;
556         } GROUP_USERS_INFO_1;
557
558         [nopush,nopull] NET_API_STATUS NetUserGetGroups(
559                 [in] string server_name,
560                 [in] string user_name,
561                 [in] uint32 level,
562                 [out] uint8 **buffer,
563                 [in] uint32 prefmaxlen,
564                 [out,ref] uint32 *entries_read,
565                 [out,ref] uint32 *total_entries
566                 );
567
568         /*******************************************/
569         /* NetUserModalsGet                        */
570         /*******************************************/
571
572         const int TIMEQ_FOREVER = (uint32_t)-1L;
573
574         typedef struct {
575                 uint32 usrmod0_min_passwd_len;
576                 uint32 usrmod0_max_passwd_age;
577                 uint32 usrmod0_min_passwd_age;
578                 uint32 usrmod0_force_logoff;
579                 uint32 usrmod0_password_hist_len;
580         } USER_MODALS_INFO_0;
581
582         typedef struct {
583                 uint32 usrmod1_role;
584                 string usrmod1_primary;
585         } USER_MODALS_INFO_1;
586
587         typedef struct {
588                 string usrmod2_domain_name;
589                 domsid *usrmod2_domain_id;
590         } USER_MODALS_INFO_2;
591
592         typedef struct {
593                 uint32 usrmod3_lockout_duration;
594                 uint32 usrmod3_lockout_observation_window;
595                 uint32 usrmod3_lockout_threshold;
596         } USER_MODALS_INFO_3;
597
598         typedef struct {
599                 uint32 usrmod1001_min_passwd_len;
600         } USER_MODALS_INFO_1001;
601
602         typedef struct {
603                 uint32 usrmod1002_max_passwd_age;
604         } USER_MODALS_INFO_1002;
605
606         typedef struct {
607                 uint32 usrmod1003_min_passwd_age;
608         } USER_MODALS_INFO_1003;
609
610         typedef struct {
611                 uint32 usrmod1004_force_logoff;
612         } USER_MODALS_INFO_1004;
613
614         typedef struct {
615                 uint32 usrmod1005_password_hist_len;
616         } USER_MODALS_INFO_1005;
617
618         typedef struct {
619                 uint32 usrmod1006_role;
620         } USER_MODALS_INFO_1006;
621
622         typedef struct {
623                 string usrmod1007_primary;
624         } USER_MODALS_INFO_1007;
625
626         [nopush,nopull] NET_API_STATUS NetUserModalsGet(
627                 [in] string server_name,
628                 [in] uint32 level,
629                 [out,ref] uint8 **buffer
630                 );
631
632         /*******************************************/
633         /* NetUserModalsSet                        */
634         /*******************************************/
635
636         [nopush,nopull] NET_API_STATUS NetUserModalsSet(
637                 [in] string server_name,
638                 [in] uint32 level,
639                 [in] uint8 *buffer,
640                 [out,ref] uint32 *parm_err
641                 );
642
643         /*******************************************/
644         /* NetQueryDisplayInformation              */
645         /*******************************************/
646
647         [public] typedef struct {
648                 string usri1_name;
649                 string usri1_comment;
650                 uint32 usri1_flags;
651                 string usri1_full_name;
652                 uint32 usri1_user_id;
653                 uint32 usri1_next_index;
654         } NET_DISPLAY_USER;
655
656         [public] typedef struct {
657                 string usri2_name;
658                 string usri2_comment;
659                 uint32 usri2_flags;
660                 uint32 usri2_user_id;
661                 uint32 usri2_next_index;
662         } NET_DISPLAY_MACHINE;
663
664         [public] typedef struct {
665                 string grpi3_name;
666                 string grpi3_comment;
667                 uint32 grpi3_group_id;
668                 uint32 grpi3_attributes;
669                 uint32 grpi3_next_index;
670         } NET_DISPLAY_GROUP;
671
672         [nopush,nopull] NET_API_STATUS NetQueryDisplayInformation(
673                 [in,unique] string *server_name,
674                 [in] uint32 level,
675                 [in] uint32 idx,
676                 [in] uint32 entries_requested,
677                 [in] uint32 prefmaxlen,
678                 [out,ref] uint32 *entries_read,
679                 [out,ref,noprint] void **buffer
680                 );
681
682         /*******************************************/
683         /* NetGroupAdd                             */
684         /*******************************************/
685
686         typedef struct {
687                 string grpi0_name;
688         } GROUP_INFO_0;
689
690         typedef struct {
691                 string grpi1_name;
692                 string grpi1_comment;
693         } GROUP_INFO_1;
694
695         typedef struct {
696                 string grpi2_name;
697                 string grpi2_comment;
698                 uint32 grpi2_group_id;
699                 uint32 grpi2_attributes;
700         } GROUP_INFO_2;
701
702         typedef struct {
703                 string grpi3_name;
704                 string grpi3_comment;
705                 domsid *grpi3_group_sid;
706                 uint32 grpi3_attributes;
707         } GROUP_INFO_3;
708
709         typedef struct {
710                 string grpi1002_comment;
711         } GROUP_INFO_1002;
712
713         typedef struct {
714                 uint32 grpi1005_attributes;
715         } GROUP_INFO_1005;
716
717         [nopush,nopull] NET_API_STATUS NetGroupAdd(
718                 [in] string server_name,
719                 [in] uint32 level,
720                 [in] uint8 *buffer,
721                 [out] uint32 *parm_err
722                 );
723
724         /*******************************************/
725         /* NetGroupDel                             */
726         /*******************************************/
727
728         [nopush,nopull] NET_API_STATUS NetGroupDel(
729                 [in] string server_name,
730                 [in] string group_name
731                 );
732
733         /*******************************************/
734         /* NetGroupEnum                            */
735         /*******************************************/
736
737         [nopush,nopull] NET_API_STATUS NetGroupEnum(
738                 [in] string server_name,
739                 [in] uint32 level,
740                 [out,ref] uint8 **buffer,
741                 [in] uint32 prefmaxlen,
742                 [out,ref] uint32 *entries_read,
743                 [out,ref] uint32 *total_entries,
744                 [in,out,ref] uint32 *resume_handle
745                 );
746
747         /*******************************************/
748         /* NetGroupSetInfo                         */
749         /*******************************************/
750
751         [nopush,nopull] NET_API_STATUS NetGroupSetInfo(
752                 [in] string server_name,
753                 [in] string group_name,
754                 [in] uint32 level,
755                 [in] uint8 *buffer,
756                 [out] uint32 *parm_err
757                 );
758
759         /*******************************************/
760         /* NetGroupGetInfo                         */
761         /*******************************************/
762
763         [nopush,nopull] NET_API_STATUS NetGroupGetInfo(
764                 [in] string server_name,
765                 [in] string group_name,
766                 [in] uint32 level,
767                 [out] uint8 **buffer
768                 );
769
770         /*******************************************/
771         /* NetGroupAddUser                         */
772         /*******************************************/
773
774         [nopush,nopull] NET_API_STATUS NetGroupAddUser(
775                 [in] string server_name,
776                 [in] string group_name,
777                 [in] string user_name
778                 );
779
780         /*******************************************/
781         /* NetGroupDelUser                         */
782         /*******************************************/
783
784         [nopush,nopull] NET_API_STATUS NetGroupDelUser(
785                 [in] string server_name,
786                 [in] string group_name,
787                 [in] string user_name
788                 );
789
790         /*******************************************/
791         /* NetGroupGetUsers                        */
792         /*******************************************/
793
794         [nopush,nopull] NET_API_STATUS NetGroupGetUsers(
795                 [in] string server_name,
796                 [in] string group_name,
797                 [in] uint32 level,
798                 [out] uint8 **buffer,
799                 [in] uint32 prefmaxlen,
800                 [out,ref] uint32 *entries_read,
801                 [out,ref] uint32 *total_entries,
802                 [in,out,ref] uint32 *resume_handle
803                 );
804
805         /*******************************************/
806         /* NetLocalGroupAdd                        */
807         /*******************************************/
808
809         typedef struct {
810                 string lgrpi0_name;
811         } LOCALGROUP_INFO_0;
812
813         typedef struct {
814                 string lgrpi1_name;
815                 string lgrpi1_comment;
816         } LOCALGROUP_INFO_1;
817
818         typedef struct {
819                 string lgrpi1002_comment;
820         } LOCALGROUP_INFO_1002;
821
822         [nopush,nopull] NET_API_STATUS NetLocalGroupAdd(
823                 [in] string server_name,
824                 [in] uint32 level,
825                 [in] uint8 *buffer,
826                 [out,ref] uint32 *parm_err
827                 );
828
829         /*******************************************/
830         /* NetLocalGroupDel                        */
831         /*******************************************/
832
833         [nopush,nopull] NET_API_STATUS NetLocalGroupDel(
834                 [in] string server_name,
835                 [in] string group_name
836                 );
837
838         /*******************************************/
839         /* NetLocalGroupGetInfo                    */
840         /*******************************************/
841
842         [nopush,nopull] NET_API_STATUS NetLocalGroupGetInfo(
843                 [in] string server_name,
844                 [in] string group_name,
845                 [in] uint32 level,
846                 [out,ref] uint8 **buffer
847                 );
848
849         /*******************************************/
850         /* NetLocalGroupSetInfo                    */
851         /*******************************************/
852
853         [nopush,nopull] NET_API_STATUS NetLocalGroupSetInfo(
854                 [in] string server_name,
855                 [in] string group_name,
856                 [in] uint32 level,
857                 [in,ref] uint8 *buffer,
858                 [out,ref] uint32 *parm_err
859                 );
860
861         /*******************************************/
862         /* NetLocalGroupEnum                       */
863         /*******************************************/
864
865         [nopush,nopull] NET_API_STATUS NetLocalGroupEnum(
866                 [in] string server_name,
867                 [in] uint32 level,
868                 [out,ref] uint8 **buffer,
869                 [in] uint32 prefmaxlen,
870                 [out,ref] uint32 *entries_read,
871                 [out,ref] uint32 *total_entries,
872                 [in,out,ref] uint32 *resume_handle
873                 );
874
875         /*******************************************/
876         /* NetLocalGroupAddMembers                 */
877         /*******************************************/
878
879         typedef enum {
880                 SidTypeUser             = 1,
881                 SidTypeGroup            = 2,
882                 SidTypeDomain           = 3,
883                 SidTypeAlias            = 4,
884                 SidTypeWellKnownGroup   = 5,
885                 SidTypeDeletedAccount   = 6,
886                 SidTypeInvalid          = 7,
887                 SidTypeUnknown          = 8,
888                 SidTypeComputer         = 9,
889                 SidTypeLabel            = 10
890         } SID_NAME_USE;
891
892         typedef struct {
893                 domsid *lgrmi0_sid;
894         } LOCALGROUP_MEMBERS_INFO_0;
895
896         typedef struct {
897                 domsid *lgrmi1_sid;
898                 SID_NAME_USE lgrmi1_sidusage;
899                 string lgrmi1_name;
900         } LOCALGROUP_MEMBERS_INFO_1;
901
902         typedef struct {
903                 domsid *lgrmi2_sid;
904                 SID_NAME_USE lgrmi2_sidusage;
905                 string lgrmi2_domainandname;
906         } LOCALGROUP_MEMBERS_INFO_2;
907
908         typedef struct {
909                 string lgrmi3_domainandname;
910         } LOCALGROUP_MEMBERS_INFO_3;
911
912         [nopush,nopull] NET_API_STATUS NetLocalGroupAddMembers(
913                 [in] string server_name,
914                 [in] string group_name,
915                 [in] uint32 level,
916                 [in] uint8 *buffer,
917                 [in] uint32 total_entries
918                 );
919
920         /*******************************************/
921         /* NetLocalGroupDelMembers                 */
922         /*******************************************/
923
924         [nopush,nopull] NET_API_STATUS NetLocalGroupDelMembers(
925                 [in] string server_name,
926                 [in] string group_name,
927                 [in] uint32 level,
928                 [in] uint8 *buffer,
929                 [in] uint32 total_entries
930                 );
931
932         /*******************************************/
933         /* NetLocalGroupGetMembers                 */
934         /*******************************************/
935
936         [nopush,nopull] NET_API_STATUS NetLocalGroupGetMembers(
937                 [in] string server_name,
938                 [in] string local_group_name,
939                 [in] uint32 level,
940                 [out] uint8 **buffer,
941                 [in] uint32 prefmaxlen,
942                 [out] uint32 *entries_read,
943                 [out] uint32 *total_entries,
944                 [in,out] uint32 *resume_handle
945                 );
946
947         /*******************************************/
948         /* NetLocalGroupSetMembers                 */
949         /*******************************************/
950
951         [nopush,nopull] NET_API_STATUS NetLocalGroupSetMembers(
952                 [in] string server_name,
953                 [in] string group_name,
954                 [in] uint32 level,
955                 [in] uint8 *buffer,
956                 [in] uint32 total_entries
957                 );
958
959         /*******************************************/
960         /* NetRemoteTOD                            */
961         /*******************************************/
962
963         typedef struct {
964                 uint32 tod_elapsedt;
965                 uint32 tod_msecs;
966                 uint32 tod_hours;
967                 uint32 tod_mins;
968                 uint32 tod_secs;
969                 uint32 tod_hunds;
970                 int32 tod_timezone;
971                 uint32 tod_tinterval;
972                 uint32 tod_day;
973                 uint32 tod_month;
974                 uint32 tod_year;
975                 uint32 tod_weekday;
976         } TIME_OF_DAY_INFO;
977
978         [nopush,nopull] NET_API_STATUS NetRemoteTOD(
979                 [in] string server_name,
980                 [out,ref] uint8 **buffer
981                 );
982
983         /*******************************************/
984         /* NetShareAdd                             */
985         /*******************************************/
986
987         typedef struct {
988                 string shi2_netname;
989                 uint32 shi2_type;
990                 string shi2_remark;
991                 uint32 shi2_permissions;
992                 uint32 shi2_max_uses;
993                 uint32 shi2_current_uses;
994                 string shi2_path;
995                 string shi2_passwd;
996         } SHARE_INFO_2;
997
998         [nopush,nopull] NET_API_STATUS NetShareAdd(
999                 [in] string server_name,
1000                 [in] uint32 level,
1001                 [in] uint8 *buffer,
1002                 [out] uint32 *parm_err
1003                 );
1004
1005         /*******************************************/
1006         /* NetShareDel                             */
1007         /*******************************************/
1008
1009         [nopush,nopull] NET_API_STATUS NetShareDel(
1010                 [in] string server_name,
1011                 [in] string net_name,
1012                 [in] uint32 reserved
1013                 );
1014 }