netapi: add NetFileEnum to IDL.
[Samba/gbeck.git] / source / librpc / idl / libnetapi.idl
blob039dcf4152b6b51e038abf937477013b57c732bf
1 /*
2 libnetapi interface definition
3 */
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")
11 pointer_default(unique)
13 interface libnetapi
15 const int ERROR_MORE_DATA = 234L;
17 [public] typedef [v1_enum] enum {
18 NERR_Success=0
19 } NET_API_STATUS;
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;
28 /*******************************************/
29 /* NetJoinDomain */
30 /*******************************************/
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;
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
56 /*******************************************/
57 /* NetUnjoinDomain */
58 /*******************************************/
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
67 /*******************************************/
68 /* NetGetJoinInformation */
69 /*******************************************/
71 typedef enum {
72 NetSetupUnknownStatus = 0,
73 NetSetupUnjoined = 1,
74 NetSetupWorkgroupName = 2,
75 NetSetupDomainName = 3
76 } NETSETUP_JOIN_STATUS;
78 [nopush,nopull] NET_API_STATUS NetGetJoinInformation(
79 [in,unique] string *server_name,
80 [out] string **name_buffer,
81 [out] uint16 *name_type
84 /*******************************************/
85 /* NetGetJoinableOUs */
86 /*******************************************/
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
97 /*******************************************/
98 /* NetRenameMachineInDomain */
99 /*******************************************/
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
109 /*******************************************/
110 /* NetServerGetInfo */
111 /*******************************************/
113 [public] typedef struct {
114 uint32 sv100_platform_id;
115 string sv100_name;
116 } SERVER_INFO_100;
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;
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;
143 [public] typedef struct {
144 string sv1005_comment;
145 } SERVER_INFO_1005;
147 [nopush,nopull] NET_API_STATUS NetServerGetInfo(
148 [in,unique] string *server_name,
149 [in] uint32 level,
150 [out] uint8 **buffer
153 /*******************************************/
154 /* NetServerSetInfo */
155 /*******************************************/
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
164 /*******************************************/
165 /* NetGetDCName */
166 /*******************************************/
168 [nopush,nopull] NET_API_STATUS NetGetDCName(
169 [in,unique] string *server_name,
170 [in,unique] string *domain_name,
171 [out] uint8 **buffer
174 /*******************************************/
175 /* NetGetAnyDCName */
176 /*******************************************/
178 [nopush,nopull] NET_API_STATUS NetGetAnyDCName(
179 [in,unique] string *server_name,
180 [in,unique] string *domain_name,
181 [out] uint8 **buffer
184 /*******************************************/
185 /* DsGetDcName */
186 /*******************************************/
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;
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
209 /*******************************************/
210 /* NetUserAdd */
211 /*******************************************/
213 [public] typedef struct {
214 string usri0_name;
215 } USER_INFO_0;
217 /* priv */
218 const int USER_PRIV_GUEST = 0;
219 const int USER_PRIV_USER = 1;
220 const int USER_PRIV_ADMIN = 2;
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;
233 /* auth_flags in USER_INFO_2 */
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);
241 const int USER_MAXSTORAGE_UNLIMITED = (uint32_t)-1L;
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;
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;
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;
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;
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;
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;
371 const int ENCRYPTED_PWLEN = 16;
373 [public] typedef struct {
374 uint8 usri21_password[ENCRYPTED_PWLEN];
375 } USER_INFO_21;
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;
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;
412 [public] typedef struct {
413 string usri1003_password;
414 } USER_INFO_1003;
416 [public] typedef struct {
417 uint32 usri1005_priv;
418 } USER_INFO_1005;
420 [public] typedef struct {
421 string usri1006_home_dir;
422 } USER_INFO_1006;
424 [public] typedef struct {
425 string usri1007_comment;
426 } USER_INFO_1007;
428 [public] typedef struct {
429 uint32 usri1008_flags;
430 } USER_INFO_1008;
432 [public] typedef struct {
433 string usri1009_script_path;
434 } USER_INFO_1009;
436 [public] typedef struct {
437 uint32 usri1010_auth_flags;
438 } USER_INFO_1010;
440 [public] typedef struct {
441 string usri1011_full_name;
442 } USER_INFO_1011;
444 [public] typedef struct {
445 string usri1012_usr_comment;
446 } USER_INFO_1012;
448 [public] typedef struct {
449 string usri1013_parms;
450 } USER_INFO_1013;
452 [public] typedef struct {
453 string usri1014_workstations;
454 } USER_INFO_1014;
456 [public] typedef struct {
457 uint32 usri1017_acct_expires;
458 } USER_INFO_1017;
460 [public] typedef struct {
461 uint32 usri1018_max_storage;
462 } USER_INFO_1018;
464 [public] typedef struct {
465 uint32 usri1020_units_per_week;
466 uint8 *usri1020_logon_hours;
467 } USER_INFO_1020;
469 [public] typedef struct {
470 string usri1023_logon_server;
471 } USER_INFO_1023;
473 [public] typedef struct {
474 uint32 usri1024_country_code;
475 } USER_INFO_1024;
477 [public] typedef struct {
478 uint32 usri1025_code_page;
479 } USER_INFO_1025;
481 [public] typedef struct {
482 uint32 usri1051_primary_group_id;
483 } USER_INFO_1051;
485 [public] typedef struct {
486 string usri1052_profile;
487 } USER_INFO_1052;
489 [public] typedef struct {
490 string usri1053_home_dir_drive;
491 } USER_INFO_1053;
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_primary_group_id;
521 } USER_INFO_X;
523 [nopush,nopull] NET_API_STATUS NetUserAdd(
524 [in,unique] string *server_name,
525 [in] uint32 level,
526 [in,ref] uint8 *buffer,
527 [out,ref] uint32 *parm_error
530 /*******************************************/
531 /* NetUserDel */
532 /*******************************************/
534 [nopush,nopull] NET_API_STATUS NetUserDel(
535 [in,unique] string *server_name,
536 [in,ref] string *user_name
539 /*******************************************/
540 /* NetUserEnum */
541 /*******************************************/
543 const int FILTER_TEMP_DUPLICATE_ACCOUNT = 0x0001;
544 const int FILTER_NORMAL_ACCOUNT = 0x0002;
545 const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = 0x0008;
546 const int FILTER_WORKSTATION_TRUST_ACCOUNT = 0x0010;
547 const int FILTER_SERVER_TRUST_ACCOUNT = 0x0020;
549 [nopush,nopull] NET_API_STATUS NetUserEnum(
550 [in,unique] string *server_name,
551 [in] uint32 level,
552 [in] uint32 filter,
553 [out,ref] uint8 **buffer,
554 [in] uint32 prefmaxlen,
555 [out,ref] uint32 *entries_read,
556 [out,ref] uint32 *total_entries,
557 [in,out,ref] uint32 *resume_handle
560 /*******************************************/
561 /* NetUserChangePassword */
562 /*******************************************/
564 [nopush,nopull] NET_API_STATUS NetUserChangePassword(
565 [in] string domain_name,
566 [in] string user_name,
567 [in] string old_password,
568 [in] string new_password
571 /*******************************************/
572 /* NetUserGetInfo */
573 /*******************************************/
575 [nopush,nopull] NET_API_STATUS NetUserGetInfo(
576 [in] string server_name,
577 [in] string user_name,
578 [in] uint32 level,
579 [out] uint8 **buffer
582 /*******************************************/
583 /* NetUserSetInfo */
584 /*******************************************/
586 [nopush,nopull] NET_API_STATUS NetUserSetInfo(
587 [in] string server_name,
588 [in] string user_name,
589 [in] uint32 level,
590 [in] uint8 *buffer,
591 [out] uint32 *parm_err
594 /*******************************************/
595 /* NetUserGetGroups */
596 /*******************************************/
598 [public] typedef struct {
599 string grui0_name;
600 } GROUP_USERS_INFO_0;
602 [public] typedef struct {
603 string grui1_name;
604 uint32 grui1_attributes;
605 } GROUP_USERS_INFO_1;
607 [nopush,nopull] NET_API_STATUS NetUserGetGroups(
608 [in] string server_name,
609 [in] string user_name,
610 [in] uint32 level,
611 [out] uint8 **buffer,
612 [in] uint32 prefmaxlen,
613 [out,ref] uint32 *entries_read,
614 [out,ref] uint32 *total_entries
617 /*******************************************/
618 /* NetUserSetGroups */
619 /*******************************************/
621 [nopush,nopull] NET_API_STATUS NetUserSetGroups(
622 [in] string server_name,
623 [in] string user_name,
624 [in] uint32 level,
625 [in] uint8 *buffer,
626 [in] uint32 num_entries
629 /*******************************************/
630 /* NetUserGetLocalGroups */
631 /*******************************************/
633 const int LG_INCLUDE_INDIRECT = 0x0001;
635 typedef struct {
636 string lgrui0_name;
637 } LOCALGROUP_USERS_INFO_0;
639 [nopush,nopull] NET_API_STATUS NetUserGetLocalGroups(
640 [in] string server_name,
641 [in] string user_name,
642 [in] uint32 level,
643 [in] uint32 flags,
644 [out] uint8 **buffer,
645 [in] uint32 prefmaxlen,
646 [out,ref] uint32 *entries_read,
647 [out,ref] uint32 *total_entries
650 /*******************************************/
651 /* NetUserModalsGet */
652 /*******************************************/
654 const int TIMEQ_FOREVER = (uint32_t)-1L;
656 typedef struct {
657 uint32 usrmod0_min_passwd_len;
658 uint32 usrmod0_max_passwd_age;
659 uint32 usrmod0_min_passwd_age;
660 uint32 usrmod0_force_logoff;
661 uint32 usrmod0_password_hist_len;
662 } USER_MODALS_INFO_0;
664 typedef struct {
665 uint32 usrmod1_role;
666 string usrmod1_primary;
667 } USER_MODALS_INFO_1;
669 typedef struct {
670 string usrmod2_domain_name;
671 domsid *usrmod2_domain_id;
672 } USER_MODALS_INFO_2;
674 typedef struct {
675 uint32 usrmod3_lockout_duration;
676 uint32 usrmod3_lockout_observation_window;
677 uint32 usrmod3_lockout_threshold;
678 } USER_MODALS_INFO_3;
680 typedef struct {
681 uint32 usrmod1001_min_passwd_len;
682 } USER_MODALS_INFO_1001;
684 typedef struct {
685 uint32 usrmod1002_max_passwd_age;
686 } USER_MODALS_INFO_1002;
688 typedef struct {
689 uint32 usrmod1003_min_passwd_age;
690 } USER_MODALS_INFO_1003;
692 typedef struct {
693 uint32 usrmod1004_force_logoff;
694 } USER_MODALS_INFO_1004;
696 typedef struct {
697 uint32 usrmod1005_password_hist_len;
698 } USER_MODALS_INFO_1005;
700 typedef struct {
701 uint32 usrmod1006_role;
702 } USER_MODALS_INFO_1006;
704 typedef struct {
705 string usrmod1007_primary;
706 } USER_MODALS_INFO_1007;
708 [nopush,nopull] NET_API_STATUS NetUserModalsGet(
709 [in] string server_name,
710 [in] uint32 level,
711 [out,ref] uint8 **buffer
714 /*******************************************/
715 /* NetUserModalsSet */
716 /*******************************************/
718 [nopush,nopull] NET_API_STATUS NetUserModalsSet(
719 [in] string server_name,
720 [in] uint32 level,
721 [in] uint8 *buffer,
722 [out,ref] uint32 *parm_err
725 /*******************************************/
726 /* NetQueryDisplayInformation */
727 /*******************************************/
729 [public] typedef struct {
730 string usri1_name;
731 string usri1_comment;
732 uint32 usri1_flags;
733 string usri1_full_name;
734 uint32 usri1_user_id;
735 uint32 usri1_next_index;
736 } NET_DISPLAY_USER;
738 [public] typedef struct {
739 string usri2_name;
740 string usri2_comment;
741 uint32 usri2_flags;
742 uint32 usri2_user_id;
743 uint32 usri2_next_index;
744 } NET_DISPLAY_MACHINE;
746 [public] typedef struct {
747 string grpi3_name;
748 string grpi3_comment;
749 uint32 grpi3_group_id;
750 uint32 grpi3_attributes;
751 uint32 grpi3_next_index;
752 } NET_DISPLAY_GROUP;
754 [nopush,nopull] NET_API_STATUS NetQueryDisplayInformation(
755 [in,unique] string *server_name,
756 [in] uint32 level,
757 [in] uint32 idx,
758 [in] uint32 entries_requested,
759 [in] uint32 prefmaxlen,
760 [out,ref] uint32 *entries_read,
761 [out,ref,noprint] void **buffer
764 /*******************************************/
765 /* NetGroupAdd */
766 /*******************************************/
768 typedef struct {
769 string grpi0_name;
770 } GROUP_INFO_0;
772 typedef struct {
773 string grpi1_name;
774 string grpi1_comment;
775 } GROUP_INFO_1;
777 typedef struct {
778 string grpi2_name;
779 string grpi2_comment;
780 uint32 grpi2_group_id;
781 uint32 grpi2_attributes;
782 } GROUP_INFO_2;
784 typedef struct {
785 string grpi3_name;
786 string grpi3_comment;
787 domsid *grpi3_group_sid;
788 uint32 grpi3_attributes;
789 } GROUP_INFO_3;
791 typedef struct {
792 string grpi1002_comment;
793 } GROUP_INFO_1002;
795 typedef struct {
796 uint32 grpi1005_attributes;
797 } GROUP_INFO_1005;
799 [nopush,nopull] NET_API_STATUS NetGroupAdd(
800 [in] string server_name,
801 [in] uint32 level,
802 [in] uint8 *buffer,
803 [out] uint32 *parm_err
806 /*******************************************/
807 /* NetGroupDel */
808 /*******************************************/
810 [nopush,nopull] NET_API_STATUS NetGroupDel(
811 [in] string server_name,
812 [in] string group_name
815 /*******************************************/
816 /* NetGroupEnum */
817 /*******************************************/
819 [nopush,nopull] NET_API_STATUS NetGroupEnum(
820 [in] string server_name,
821 [in] uint32 level,
822 [out,ref] uint8 **buffer,
823 [in] uint32 prefmaxlen,
824 [out,ref] uint32 *entries_read,
825 [out,ref] uint32 *total_entries,
826 [in,out,ref] uint32 *resume_handle
829 /*******************************************/
830 /* NetGroupSetInfo */
831 /*******************************************/
833 [nopush,nopull] NET_API_STATUS NetGroupSetInfo(
834 [in] string server_name,
835 [in] string group_name,
836 [in] uint32 level,
837 [in] uint8 *buffer,
838 [out] uint32 *parm_err
841 /*******************************************/
842 /* NetGroupGetInfo */
843 /*******************************************/
845 [nopush,nopull] NET_API_STATUS NetGroupGetInfo(
846 [in] string server_name,
847 [in] string group_name,
848 [in] uint32 level,
849 [out] uint8 **buffer
852 /*******************************************/
853 /* NetGroupAddUser */
854 /*******************************************/
856 [nopush,nopull] NET_API_STATUS NetGroupAddUser(
857 [in] string server_name,
858 [in] string group_name,
859 [in] string user_name
862 /*******************************************/
863 /* NetGroupDelUser */
864 /*******************************************/
866 [nopush,nopull] NET_API_STATUS NetGroupDelUser(
867 [in] string server_name,
868 [in] string group_name,
869 [in] string user_name
872 /*******************************************/
873 /* NetGroupGetUsers */
874 /*******************************************/
876 [nopush,nopull] NET_API_STATUS NetGroupGetUsers(
877 [in] string server_name,
878 [in] string group_name,
879 [in] uint32 level,
880 [out] uint8 **buffer,
881 [in] uint32 prefmaxlen,
882 [out,ref] uint32 *entries_read,
883 [out,ref] uint32 *total_entries,
884 [in,out,ref] uint32 *resume_handle
887 /*******************************************/
888 /* NetGroupSetUsers */
889 /*******************************************/
891 [nopush,nopull] NET_API_STATUS NetGroupSetUsers(
892 [in] string server_name,
893 [in] string group_name,
894 [in] uint32 level,
895 [in] uint8 *buffer,
896 [in] uint32 num_entries
899 /*******************************************/
900 /* NetLocalGroupAdd */
901 /*******************************************/
903 typedef struct {
904 string lgrpi0_name;
905 } LOCALGROUP_INFO_0;
907 typedef struct {
908 string lgrpi1_name;
909 string lgrpi1_comment;
910 } LOCALGROUP_INFO_1;
912 typedef struct {
913 string lgrpi1002_comment;
914 } LOCALGROUP_INFO_1002;
916 [nopush,nopull] NET_API_STATUS NetLocalGroupAdd(
917 [in] string server_name,
918 [in] uint32 level,
919 [in] uint8 *buffer,
920 [out,ref] uint32 *parm_err
923 /*******************************************/
924 /* NetLocalGroupDel */
925 /*******************************************/
927 [nopush,nopull] NET_API_STATUS NetLocalGroupDel(
928 [in] string server_name,
929 [in] string group_name
932 /*******************************************/
933 /* NetLocalGroupGetInfo */
934 /*******************************************/
936 [nopush,nopull] NET_API_STATUS NetLocalGroupGetInfo(
937 [in] string server_name,
938 [in] string group_name,
939 [in] uint32 level,
940 [out,ref] uint8 **buffer
943 /*******************************************/
944 /* NetLocalGroupSetInfo */
945 /*******************************************/
947 [nopush,nopull] NET_API_STATUS NetLocalGroupSetInfo(
948 [in] string server_name,
949 [in] string group_name,
950 [in] uint32 level,
951 [in,ref] uint8 *buffer,
952 [out,ref] uint32 *parm_err
955 /*******************************************/
956 /* NetLocalGroupEnum */
957 /*******************************************/
959 [nopush,nopull] NET_API_STATUS NetLocalGroupEnum(
960 [in] string server_name,
961 [in] uint32 level,
962 [out,ref] uint8 **buffer,
963 [in] uint32 prefmaxlen,
964 [out,ref] uint32 *entries_read,
965 [out,ref] uint32 *total_entries,
966 [in,out,ref] uint32 *resume_handle
969 /*******************************************/
970 /* NetLocalGroupAddMembers */
971 /*******************************************/
973 typedef enum {
974 SidTypeUser = 1,
975 SidTypeGroup = 2,
976 SidTypeDomain = 3,
977 SidTypeAlias = 4,
978 SidTypeWellKnownGroup = 5,
979 SidTypeDeletedAccount = 6,
980 SidTypeInvalid = 7,
981 SidTypeUnknown = 8,
982 SidTypeComputer = 9,
983 SidTypeLabel = 10
984 } SID_NAME_USE;
986 typedef struct {
987 domsid *lgrmi0_sid;
988 } LOCALGROUP_MEMBERS_INFO_0;
990 typedef struct {
991 domsid *lgrmi1_sid;
992 SID_NAME_USE lgrmi1_sidusage;
993 string lgrmi1_name;
994 } LOCALGROUP_MEMBERS_INFO_1;
996 typedef struct {
997 domsid *lgrmi2_sid;
998 SID_NAME_USE lgrmi2_sidusage;
999 string lgrmi2_domainandname;
1000 } LOCALGROUP_MEMBERS_INFO_2;
1002 typedef struct {
1003 string lgrmi3_domainandname;
1004 } LOCALGROUP_MEMBERS_INFO_3;
1006 [nopush,nopull] NET_API_STATUS NetLocalGroupAddMembers(
1007 [in] string server_name,
1008 [in] string group_name,
1009 [in] uint32 level,
1010 [in] uint8 *buffer,
1011 [in] uint32 total_entries
1014 /*******************************************/
1015 /* NetLocalGroupDelMembers */
1016 /*******************************************/
1018 [nopush,nopull] NET_API_STATUS NetLocalGroupDelMembers(
1019 [in] string server_name,
1020 [in] string group_name,
1021 [in] uint32 level,
1022 [in] uint8 *buffer,
1023 [in] uint32 total_entries
1026 /*******************************************/
1027 /* NetLocalGroupGetMembers */
1028 /*******************************************/
1030 [nopush,nopull] NET_API_STATUS NetLocalGroupGetMembers(
1031 [in] string server_name,
1032 [in] string local_group_name,
1033 [in] uint32 level,
1034 [out] uint8 **buffer,
1035 [in] uint32 prefmaxlen,
1036 [out] uint32 *entries_read,
1037 [out] uint32 *total_entries,
1038 [in,out] uint32 *resume_handle
1041 /*******************************************/
1042 /* NetLocalGroupSetMembers */
1043 /*******************************************/
1045 [nopush,nopull] NET_API_STATUS NetLocalGroupSetMembers(
1046 [in] string server_name,
1047 [in] string group_name,
1048 [in] uint32 level,
1049 [in] uint8 *buffer,
1050 [in] uint32 total_entries
1053 /*******************************************/
1054 /* NetRemoteTOD */
1055 /*******************************************/
1057 typedef struct {
1058 uint32 tod_elapsedt;
1059 uint32 tod_msecs;
1060 uint32 tod_hours;
1061 uint32 tod_mins;
1062 uint32 tod_secs;
1063 uint32 tod_hunds;
1064 int32 tod_timezone;
1065 uint32 tod_tinterval;
1066 uint32 tod_day;
1067 uint32 tod_month;
1068 uint32 tod_year;
1069 uint32 tod_weekday;
1070 } TIME_OF_DAY_INFO;
1072 [nopush,nopull] NET_API_STATUS NetRemoteTOD(
1073 [in] string server_name,
1074 [out,ref] uint8 **buffer
1077 /*******************************************/
1078 /* NetShareAdd */
1079 /*******************************************/
1081 typedef struct {
1082 string shi0_netname;
1083 } SHARE_INFO_0;
1085 typedef struct {
1086 string shi1_netname;
1087 uint32 shi1_type;
1088 string shi1_remark;
1089 } SHARE_INFO_1;
1091 typedef struct {
1092 string shi2_netname;
1093 uint32 shi2_type;
1094 string shi2_remark;
1095 uint32 shi2_permissions;
1096 uint32 shi2_max_uses;
1097 uint32 shi2_current_uses;
1098 string shi2_path;
1099 string shi2_passwd;
1100 } SHARE_INFO_2;
1102 typedef struct {
1103 string shi501_netname;
1104 uint32 shi501_type;
1105 string shi501_remark;
1106 uint32 shi501_flags;
1107 } SHARE_INFO_501;
1109 typedef struct {
1110 string shi1004_remark;
1111 } SHARE_INFO_1004;
1113 const int CSC_MASK = 0x30;
1115 typedef [public,bitmap32bit] bitmap {
1116 SHI1005_FLAGS_DFS = 0x01,
1117 SHI1005_FLAGS_DFS_ROOT = 0x02,
1118 CSC_CACHE_MANUAL_REINT = 0x00,
1119 CSC_CACHE_AUTO_REINT = 0x10,
1120 CSC_CACHE_VDO = 0x20,
1121 CSC_CACHE_NONE = 0x30,
1122 SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS = 0x0100,
1123 SHI1005_FLAGS_FORCE_SHARED_DELETE = 0x0200,
1124 SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING = 0x0400,
1125 SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM = 0x0800
1126 } SHARE_INFO_1005_FLAGS;
1128 typedef struct {
1129 SHARE_INFO_1005_FLAGS shi1005_flags;
1130 } SHARE_INFO_1005;
1132 typedef struct {
1133 uint32 shi1006_max_uses;
1134 } SHARE_INFO_1006;
1136 [nopush,nopull] NET_API_STATUS NetShareAdd(
1137 [in] string server_name,
1138 [in] uint32 level,
1139 [in] uint8 *buffer,
1140 [out] uint32 *parm_err
1143 /*******************************************/
1144 /* NetShareDel */
1145 /*******************************************/
1147 [nopush,nopull] NET_API_STATUS NetShareDel(
1148 [in] string server_name,
1149 [in] string net_name,
1150 [in] uint32 reserved
1153 /*******************************************/
1154 /* NetShareEnum */
1155 /*******************************************/
1157 [nopush,nopull] NET_API_STATUS NetShareEnum(
1158 [in] string server_name,
1159 [in] uint32 level,
1160 [out] uint8 **buffer,
1161 [in] uint32 prefmaxlen,
1162 [out] uint32 *entries_read,
1163 [out] uint32 *total_entries,
1164 [in,out] uint32 *resume_handle
1167 /*******************************************/
1168 /* NetShareGetInfo */
1169 /*******************************************/
1171 [nopush,nopull] NET_API_STATUS NetShareGetInfo(
1172 [in] string server_name,
1173 [in] string net_name,
1174 [in] uint32 level,
1175 [out] uint8 **buffer
1178 /*******************************************/
1179 /* NetShareSetInfo */
1180 /*******************************************/
1182 [nopush,nopull] NET_API_STATUS NetShareSetInfo(
1183 [in] string server_name,
1184 [in] string net_name,
1185 [in] uint32 level,
1186 [in] uint8 *buffer,
1187 [out] uint32 *parm_err
1190 /*******************************************/
1191 /* NetFileClose */
1192 /*******************************************/
1194 [nopush,nopull] NET_API_STATUS NetFileClose(
1195 [in] string server_name,
1196 [in] uint32 fileid
1199 /*******************************************/
1200 /* NetFileGetInfo */
1201 /*******************************************/
1203 typedef struct {
1204 uint32 fi2_id;
1205 } FILE_INFO_2;
1207 typedef struct {
1208 uint32 fi3_id;
1209 uint32 fi3_permissions;
1210 uint32 fi3_num_locks;
1211 string fi3_pathname;
1212 string fi3_username;
1213 } FILE_INFO_3;
1215 [nopush,nopull] NET_API_STATUS NetFileGetInfo(
1216 [in] string server_name,
1217 [in] uint32 fileid,
1218 [in] uint32 level,
1219 [out] uint8 **buffer
1222 /*******************************************/
1223 /* NetFileEnum */
1224 /*******************************************/
1226 [nopush,nopull] NET_API_STATUS NetFileEnum(
1227 [in] string server_name,
1228 [in] string base_path,
1229 [in] string user_name,
1230 [in] uint32 level,
1231 [out] uint8 **buffer,
1232 [in] uint32 prefmaxlen,
1233 [out] uint32 *entries_read,
1234 [out] uint32 *total_entries,
1235 [in,out] uint32 *resume_handle