2 * Unix SMB/CIFS implementation.
4 * Copyright (C) Guenther Deschner 2007-2008
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef __LIB_NETAPI_H__
21 #define __LIB_NETAPI_H__
25 #endif /* __cplusplus */
27 /****************************************************************
29 ****************************************************************/
31 NET_API_STATUS_SUCCESS
= 0
34 #define ERROR_MORE_DATA ( 234L )
36 #define ENCRYPTED_PWLEN ( 16 )
38 /****************************************************************
39 ****************************************************************/
46 uint16_t time_hi_and_version
;
51 #endif /* _HEADER_misc */
53 #ifndef _HEADER_libnetapi
56 #define MAXSUBAUTHS 15 /* max sub authorities in a SID */
63 uint32_t sub_auths
[MAXSUBAUTHS
];
66 struct DOMAIN_CONTROLLER_INFO
{
67 const char * domain_controller_name
;
68 const char * domain_controller_address
;
69 uint32_t domain_controller_address_type
;
70 struct GUID domain_guid
;
71 const char * domain_name
;
72 const char * dns_forest_name
;
74 const char * dc_site_name
;
75 const char * client_site_name
;
78 /* bitmap NetJoinFlags */
79 #define NETSETUP_JOIN_DOMAIN ( 0x00000001 )
80 #define NETSETUP_ACCT_CREATE ( 0x00000002 )
81 #define NETSETUP_ACCT_DELETE ( 0x00000004 )
82 #define NETSETUP_WIN9X_UPGRADE ( 0x00000010 )
83 #define NETSETUP_DOMAIN_JOIN_IF_JOINED ( 0x00000020 )
84 #define NETSETUP_JOIN_UNSECURE ( 0x00000040 )
85 #define NETSETUP_MACHINE_PWD_PASSED ( 0x00000080 )
86 #define NETSETUP_DEFER_SPN_SET ( 0x00000100 )
87 #define NETSETUP_JOIN_DC_ACCOUNT ( 0x00000200 )
88 #define NETSETUP_JOIN_WITH_NEW_NAME ( 0x00000400 )
89 #define NETSETUP_INSTALL_INVOCATION ( 0x00040000 )
90 #define NETSETUP_IGNORE_UNSUPPORTED_FLAGS ( 0x10000000 )
92 #define FILTER_TEMP_DUPLICATE_ACCOUNT ( 0x0001 )
93 #define FILTER_NORMAL_ACCOUNT ( 0x0002 )
94 #define FILTER_INTERDOMAIN_TRUST_ACCOUNT ( 0x0008 )
95 #define FILTER_WORKSTATION_TRUST_ACCOUNT ( 0x0010 )
96 #define FILTER_SERVER_TRUST_ACCOUNT ( 0x0020 )
98 #define TIMEQ_FOREVER ( (uint32_t)-1L )
100 enum NETSETUP_JOIN_STATUS
{
101 NetSetupUnknownStatus
=0,
103 NetSetupWorkgroupName
=2,
107 struct SERVER_INFO_100
{
108 uint32_t sv100_platform_id
;
109 const char * sv100_name
;
112 struct SERVER_INFO_101
{
113 uint32_t sv101_platform_id
;
114 const char * sv101_name
;
115 uint32_t sv101_version_major
;
116 uint32_t sv101_version_minor
;
118 const char * sv101_comment
;
121 struct SERVER_INFO_102
{
122 uint32_t sv102_platform_id
;
123 const char * sv102_name
;
124 uint32_t sv102_version_major
;
125 uint32_t sv102_version_minor
;
127 const char * sv102_comment
;
128 uint32_t sv102_users
;
130 uint8_t sv102_hidden
;
131 uint32_t sv102_announce
;
132 uint32_t sv102_anndelta
;
133 uint32_t sv102_licenses
;
134 const char * sv102_userpath
;
138 struct SERVER_INFO_1005
{
139 const char * sv1005_comment
;
143 const char * usri0_name
;
146 #define USER_PRIV_GUEST ( 0 )
147 #define USER_PRIV_USER ( 1 )
148 #define USER_PRIV_ADMIN ( 2 )
151 const char * usri1_name
;
152 const char * usri1_password
;
153 uint32_t usri1_password_age
;
155 const char * usri1_home_dir
;
156 const char * usri1_comment
;
157 uint32_t usri1_flags
;
158 const char * usri1_script_path
;
161 #define AF_OP_PRINT ( 0x1 )
162 #define AF_OP_COMM ( 0x2 )
163 #define AF_OP_SERVER ( 0x4 )
164 #define AF_OP_ACCOUNTS ( 0x8 )
167 const char * usri2_name
;
168 const char * usri2_password
;
169 uint32_t usri2_password_age
;
171 const char * usri2_home_dir
;
172 const char * usri2_comment
;
173 uint32_t usri2_flags
;
174 const char * usri2_script_path
;
175 uint32_t usri2_auth_flags
;
176 const char * usri2_full_name
;
177 const char * usri2_usr_comment
;
178 const char * usri2_parms
;
179 const char * usri2_workstations
;
180 uint32_t usri2_last_logon
;
181 uint32_t usri2_last_logoff
;
182 uint32_t usri2_acct_expires
;
183 uint32_t usri2_max_storage
;
184 uint32_t usri2_units_per_week
;
185 uint8_t *usri2_logon_hours
;/* [unique] */
186 uint32_t usri2_bad_pw_count
;
187 uint32_t usri2_num_logons
;
188 const char * usri2_logon_server
;
189 uint32_t usri2_country_code
;
190 uint32_t usri2_code_page
;
194 const char * usri3_name
;
195 uint32_t usri3_password_age
;
197 const char * usri3_home_dir
;
198 const char * usri3_comment
;
199 uint32_t usri3_flags
;
200 const char * usri3_script_path
;
201 uint32_t usri3_auth_flags
;
202 const char * usri3_full_name
;
203 const char * usri3_usr_comment
;
204 const char * usri3_parms
;
205 const char * usri3_workstations
;
206 uint32_t usri3_last_logon
;
207 uint32_t usri3_last_logoff
;
208 uint32_t usri3_acct_expires
;
209 uint32_t usri3_max_storage
;
210 uint32_t usri3_units_per_week
;
211 uint8_t *usri3_logon_hours
;/* [unique] */
212 uint32_t usri3_bad_pw_count
;
213 uint32_t usri3_num_logons
;
214 const char * usri3_logon_server
;
215 uint32_t usri3_country_code
;
216 uint32_t usri3_code_page
;
217 uint32_t usri3_user_id
;
218 uint32_t usri3_primary_group_id
;
219 const char * usri3_profile
;
220 const char * usri3_home_dir_drive
;
221 uint32_t usri3_password_expired
;
225 const char * usri4_name
;
226 const char * usri4_password
;
227 uint32_t usri4_password_age
;
229 const char * usri4_home_dir
;
230 const char * usri4_comment
;
231 uint32_t usri4_flags
;
232 const char * usri4_script_path
;
233 uint32_t usri4_auth_flags
;
234 const char * usri4_full_name
;
235 const char * usri4_usr_comment
;
236 const char * usri4_parms
;
237 const char * usri4_workstations
;
238 uint32_t usri4_last_logon
;
239 uint32_t usri4_last_logoff
;
240 uint32_t usri4_acct_expires
;
241 uint32_t usri4_max_storage
;
242 uint32_t usri4_units_per_week
;
243 uint8_t *usri4_logon_hours
;/* [unique] */
244 uint32_t usri4_bad_pw_count
;
245 uint32_t usri4_num_logons
;
246 const char * usri4_logon_server
;
247 uint32_t usri4_country_code
;
248 uint32_t usri4_code_page
;
249 struct domsid
*usri4_user_sid
;/* [unique] */
250 uint32_t usri4_primary_group_id
;
251 const char * usri4_profile
;
252 const char * usri4_home_dir_drive
;
253 uint32_t usri4_password_expired
;
256 struct USER_INFO_10
{
257 const char * usri10_name
;
258 const char * usri10_comment
;
259 const char * usri10_usr_comment
;
260 const char * usri10_full_name
;
263 struct USER_INFO_11
{
264 const char * usri11_name
;
265 const char * usri11_comment
;
266 const char * usri11_usr_comment
;
267 const char * usri11_full_name
;
268 uint32_t usri11_priv
;
269 uint32_t usri11_auth_flags
;
270 uint32_t usri11_password_age
;
271 const char * usri11_home_dir
;
272 const char * usri11_parms
;
273 uint32_t usri11_last_logon
;
274 uint32_t usri11_last_logoff
;
275 uint32_t usri11_bad_pw_count
;
276 uint32_t usri11_num_logons
;
277 const char * usri11_logon_server
;
278 uint32_t usri11_country_code
;
279 const char * usri11_workstations
;
280 uint32_t usri11_max_storage
;
281 uint32_t usri11_units_per_week
;
282 uint8_t *usri11_logon_hours
;/* [unique] */
283 uint32_t usri11_code_page
;
286 struct USER_INFO_20
{
287 const char * usri20_name
;
288 const char * usri20_full_name
;
289 const char * usri20_comment
;
290 uint32_t usri20_flags
;
291 uint32_t usri20_user_id
;
294 struct USER_INFO_21
{
295 uint8_t *usri21_password
;
298 struct USER_INFO_22
{
299 const char * usri22_name
;
300 uint8_t *usri22_password
;
301 uint32_t usri22_password_age
;
302 uint32_t usri22_priv
;
303 const char * usri22_home_dir
;
304 const char * usri22_comment
;
305 uint32_t usri22_flags
;
306 uint32_t usri22_script_path
;
307 uint32_t usri22_auth_flags
;
308 const char * usri22_full_name
;
309 const char * usri22_usr_comment
;
310 const char * usri22_parms
;
311 const char * usri22_workstations
;
312 uint32_t usri22_last_logon
;
313 uint32_t usri22_last_logoff
;
314 uint32_t usri22_acct_expires
;
315 uint32_t usri22_max_storage
;
316 uint32_t usri22_units_per_week
;
317 uint8_t *usri22_logon_hours
;/* [unique] */
318 uint32_t usri22_bad_pw_count
;
319 uint32_t usri22_num_logons
;
320 const char * usri22_logon_server
;
321 uint32_t usri22_country_code
;
322 uint32_t usri22_code_page
;
325 struct USER_INFO_23
{
326 const char * usri23_name
;
327 const char * usri23_full_name
;
328 const char * usri23_comment
;
329 uint32_t usri23_flags
;
330 struct domsid
*usri23_user_sid
;/* [unique] */
333 struct USER_INFO_1003
{
334 const char * usri1003_password
;
337 struct USER_INFO_1005
{
338 uint32_t usri1005_priv
;
341 struct USER_INFO_1006
{
342 const char * usri1006_home_dir
;
345 struct USER_INFO_1007
{
346 const char * usri1007_comment
;
349 struct USER_INFO_1008
{
350 uint32_t usri1008_flags
;
353 struct USER_INFO_1009
{
354 const char * usri1009_script_path
;
357 struct USER_INFO_1010
{
358 uint32_t usri1010_auth_flags
;
361 struct USER_INFO_1011
{
362 const char * usri1011_full_name
;
365 struct USER_INFO_1012
{
366 const char * usri1012_usr_comment
;
369 struct USER_INFO_1013
{
370 const char * usri1013_parms
;
373 struct USER_INFO_1014
{
374 const char * usri1014_workstations
;
377 struct USER_INFO_1017
{
378 uint32_t usri1017_acct_expires
;
381 struct USER_INFO_1018
{
382 uint32_t usri1018_max_storage
;
385 struct USER_INFO_1020
{
386 uint32_t usri1020_units_per_week
;
387 uint8_t *usri1020_logon_hours
;/* [unique] */
390 struct USER_INFO_1023
{
391 const char * usri1023_logon_server
;
394 struct USER_INFO_1024
{
395 uint32_t usri1024_country_code
;
398 struct USER_INFO_1025
{
399 uint32_t usri1025_code_page
;
402 struct USER_INFO_1051
{
403 uint32_t usri1051_primary_group_id
;
406 struct USER_INFO_1052
{
407 const char * usri1052_profile
;
410 struct USER_INFO_1053
{
411 const char * usri1053_home_dir_drive
;
414 struct USER_MODALS_INFO_0
{
415 uint32_t usrmod0_min_passwd_len
;
416 uint32_t usrmod0_max_passwd_age
;
417 uint32_t usrmod0_min_passwd_age
;
418 uint32_t usrmod0_force_logoff
;
419 uint32_t usrmod0_password_hist_len
;
422 struct USER_MODALS_INFO_1
{
423 uint32_t usrmod1_role
;
424 const char * usrmod1_primary
;
427 struct USER_MODALS_INFO_2
{
428 const char * usrmod2_domain_name
;
429 struct domsid
*usrmod2_domain_id
;/* [unique] */
432 struct USER_MODALS_INFO_3
{
433 uint32_t usrmod3_lockout_duration
;
434 uint32_t usrmod3_lockout_observation_window
;
435 uint32_t usrmod3_lockout_threshold
;
438 struct USER_MODALS_INFO_1001
{
439 uint32_t usrmod1001_min_passwd_len
;
442 struct USER_MODALS_INFO_1002
{
443 uint32_t usrmod1002_max_passwd_age
;
446 struct USER_MODALS_INFO_1003
{
447 uint32_t usrmod1003_min_passwd_age
;
450 struct USER_MODALS_INFO_1004
{
451 uint32_t usrmod1004_force_logoff
;
454 struct USER_MODALS_INFO_1005
{
455 uint32_t usrmod1005_password_hist_len
;
458 struct USER_MODALS_INFO_1006
{
459 uint32_t usrmod1006_role
;
462 struct USER_MODALS_INFO_1007
{
463 const char * usrmod1007_primary
;
466 struct NET_DISPLAY_USER
{
467 const char * usri1_name
;
468 const char * usri1_comment
;
469 uint32_t usri1_flags
;
470 const char * usri1_full_name
;
471 uint32_t usri1_user_id
;
472 uint32_t usri1_next_index
;
475 struct NET_DISPLAY_MACHINE
{
476 const char * usri2_name
;
477 const char * usri2_comment
;
478 uint32_t usri2_flags
;
479 uint32_t usri2_user_id
;
480 uint32_t usri2_next_index
;
483 struct NET_DISPLAY_GROUP
{
484 const char * grpi3_name
;
485 const char * grpi3_comment
;
486 uint32_t grpi3_group_id
;
487 uint32_t grpi3_attributes
;
488 uint32_t grpi3_next_index
;
491 struct GROUP_INFO_0
{
492 const char * grpi0_name
;
495 struct GROUP_INFO_1
{
496 const char * grpi1_name
;
497 const char * grpi1_comment
;
500 struct GROUP_INFO_2
{
501 const char * grpi2_name
;
502 const char * grpi2_comment
;
503 uint32_t grpi2_group_id
;
504 uint32_t grpi2_attributes
;
507 struct GROUP_INFO_3
{
508 const char * grpi3_name
;
509 const char * grpi3_comment
;
510 struct domsid
* grpi3_group_sid
;
511 uint32_t grpi3_attributes
;
514 struct GROUP_INFO_1002
{
515 const char * grpi1002_comment
;
518 struct GROUP_INFO_1005
{
519 uint32_t grpi1005_attributes
;
522 struct GROUP_USERS_INFO_0
{
523 const char * grui0_name
;
526 struct GROUP_USERS_INFO_1
{
527 const char * grui1_name
;
528 uint32_t grui1_attributes
;
531 struct LOCALGROUP_INFO_0
{
532 const char * lgrpi0_name
;
535 struct LOCALGROUP_INFO_1
{
536 const char * lgrpi1_name
;
537 const char * lgrpi1_comment
;
540 struct LOCALGROUP_INFO_1002
{
541 const char * lgrpi1002_comment
;
549 SidTypeWellKnownGroup
=5,
550 SidTypeDeletedAccount
=6,
557 struct LOCALGROUP_MEMBERS_INFO_0
{
558 struct domsid
*lgrmi0_sid
;/* [unique] */
561 struct LOCALGROUP_MEMBERS_INFO_1
{
562 struct domsid
*lgrmi1_sid
;/* [unique] */
563 enum SID_NAME_USE lgrmi1_sidusage
;
564 const char * lgrmi1_name
;
567 struct LOCALGROUP_MEMBERS_INFO_2
{
568 struct domsid
*lgrmi2_sid
;/* [unique] */
569 enum SID_NAME_USE lgrmi2_sidusage
;
570 const char * lgrmi2_domainandname
;
573 struct LOCALGROUP_MEMBERS_INFO_3
{
574 const char * lgrmi3_domainandname
;
577 struct TIME_OF_DAY_INFO
{
578 uint32_t tod_elapsedt
;
584 int32_t tod_timezone
;
585 uint32_t tod_tinterval
;
589 uint32_t tod_weekday
;
592 struct SHARE_INFO_0
{
593 const char * shi0_netname
;
596 struct SHARE_INFO_1
{
597 const char * shi1_netname
;
599 const char * shi1_remark
;
602 struct SHARE_INFO_2
{
603 const char * shi2_netname
;
605 const char * shi2_remark
;
606 uint32_t shi2_permissions
;
607 uint32_t shi2_max_uses
;
608 uint32_t shi2_current_uses
;
609 const char * shi2_path
;
610 const char * shi2_passwd
;
613 struct SHARE_INFO_501
{
614 const char * shi501_netname
;
615 uint32_t shi501_type
;
616 const char * shi501_remark
;
617 uint32_t shi501_flags
;
620 struct SHARE_INFO_1004
{
621 const char * shi1004_remark
;
624 struct SHARE_INFO_1005
{
625 uint32_t shi1005_flags
;
628 struct SHARE_INFO_1006
{
629 uint32_t shi1006_max_uses
;
632 #endif /* _HEADER_libnetapi */
634 /****************************************************************
635 ****************************************************************/
637 struct libnetapi_ctx
{
645 int disable_policy_handle_cache
;
650 /****************************************************************
651 ****************************************************************/
653 NET_API_STATUS
libnetapi_init(struct libnetapi_ctx
**ctx
);
655 /****************************************************************
656 ****************************************************************/
658 NET_API_STATUS
libnetapi_free(struct libnetapi_ctx
*ctx
);
660 /****************************************************************
661 ****************************************************************/
663 NET_API_STATUS
libnetapi_getctx(struct libnetapi_ctx
**ctx
);
665 /****************************************************************
666 ****************************************************************/
668 NET_API_STATUS
libnetapi_set_debuglevel(struct libnetapi_ctx
*ctx
,
669 const char *debuglevel
);
671 /****************************************************************
672 ****************************************************************/
674 NET_API_STATUS
libnetapi_set_username(struct libnetapi_ctx
*ctx
,
675 const char *username
);
677 /****************************************************************
678 ****************************************************************/
680 NET_API_STATUS
libnetapi_set_password(struct libnetapi_ctx
*ctx
,
681 const char *password
);
683 /****************************************************************
684 ****************************************************************/
686 NET_API_STATUS
libnetapi_set_workgroup(struct libnetapi_ctx
*ctx
,
687 const char *workgroup
);
689 /****************************************************************
690 ****************************************************************/
692 NET_API_STATUS
libnetapi_set_use_kerberos(struct libnetapi_ctx
*ctx
);
694 /****************************************************************
695 ****************************************************************/
697 const char *libnetapi_errstr(NET_API_STATUS status
);
699 /****************************************************************
700 ****************************************************************/
702 const char *libnetapi_get_error_string(struct libnetapi_ctx
*ctx
,
703 NET_API_STATUS status
);
705 /****************************************************************
707 ****************************************************************/
709 NET_API_STATUS
NetApiBufferAllocate(uint32_t byte_count
,
712 /****************************************************************
714 ****************************************************************/
716 NET_API_STATUS
NetApiBufferFree(void *buffer
);
718 /************************************************************//**
720 * ConvertSidToStringSid
722 * @brief Convert a domain sid into a string
724 * @param[in] sid A pointer to a sid structure
725 * @param[in,out] sid_string A pointer that holds a pointer to a sid string. Caller
726 * needs to free with free(3)
728 ***************************************************************/
730 int ConvertSidToStringSid(const struct domsid
*sid
,
733 /************************************************************//**
735 * ConvertStringSidToSid
737 * @brief Convert a string into a domain sid
739 * @param[in] sid_string A pointer to a sid string.
740 * @param[in,out] sid A pointer that holds a pointer to a sid structure.
741 * Caller needs to free with free(3)
743 ***************************************************************/
745 int ConvertStringSidToSid(const char *sid_string
,
746 struct domsid
**sid
);
748 /************************************************************//**
752 * @brief Join a computer to a domain or workgroup
754 * @param[in] server The server name to connect to
755 * @param[in] domain The domain or workgroup to join
756 * @param[in] account_ou The organizational Unit to create the computer account
758 * @param[in] account The domain account used for joining a domain
759 * @param[in] password The domain account's password used for joining a domain
760 * @param[in] join_flags Bitmask field to define specific join features
761 * @return NET_API_STATUS
763 * example netdomjoin/netdomjoin.c
764 ***************************************************************/
766 NET_API_STATUS
NetJoinDomain(const char * server
/* [in] */,
767 const char * domain
/* [in] [ref] */,
768 const char * account_ou
/* [in] */,
769 const char * account
/* [in] */,
770 const char * password
/* [in] */,
771 uint32_t join_flags
/* [in] */);
773 /************************************************************//**
777 * @brief Unjoin a computer from a domain or workgroup
779 * @param[in] server_name The server name to connect to
780 * @param[in] account The domain account used for unjoining a domain
781 * @param[in] password The domain account's password used for unjoining a domain
782 * @param[in] unjoin_flags Bitmask field to define specific unjoin features
783 * @return NET_API_STATUS
785 ***************************************************************/
787 NET_API_STATUS
NetUnjoinDomain(const char * server_name
/* [in] */,
788 const char * account
/* [in] */,
789 const char * password
/* [in] */,
790 uint32_t unjoin_flags
/* [in] */);
792 /************************************************************//**
794 * NetGetJoinInformation
796 * @brief Unjoin a computer from a domain or workgroup
798 * @param[in] server_name The server name to connect to
799 * @param[out] name_buffer Returns the name of the workgroup or domain
800 * @param[out] name_type Returns the type of that name
801 * @return NET_API_STATUS
803 * example netdomjoin-gui/netdomjoin-gui.c
805 ***************************************************************/
807 NET_API_STATUS
NetGetJoinInformation(const char * server_name
/* [in] */,
808 const char * *name_buffer
/* [out] [ref] */,
809 uint16_t *name_type
/* [out] [ref] */);
811 /************************************************************//**
815 * @brief Query for the list of joinable organizational Units that can be used
818 * @param[in] server_name The server name to connect to
819 * @param[in] domain The AD domain to query
820 * @param[in] account The domain account used for the query
821 * @param[in] password The domain account's password used for the query
822 * @param[out] ou_count The number of ous returned
823 * @param[out] ous Returned string array containing the ous
824 * @return NET_API_STATUS
826 * example netdomjoin-gui/netdomjoin-gui.c
828 ***************************************************************/
830 NET_API_STATUS
NetGetJoinableOUs(const char * server_name
/* [in] */,
831 const char * domain
/* [in] [ref] */,
832 const char * account
/* [in] */,
833 const char * password
/* [in] */,
834 uint32_t *ou_count
/* [out] [ref] */,
835 const char * **ous
/* [out] [ref] */);
837 /************************************************************//**
839 * NetRenameMachineInDomain
841 * @brief Rename a machine in a domain
843 * @param[in] server_name The server name to connect to
844 * @param[in] new_machine_name The new machine name
845 * @param[in] account The domain account used for the query
846 * @param[in] password The domain account's password used for the query
847 * @param[in] rename_options Options used for the rename operation
848 * @return NET_API_STATUS
850 * example join/rename_machine.c
852 ***************************************************************/
854 NET_API_STATUS
NetRenameMachineInDomain(const char * server_name
/* [in] */,
855 const char * new_machine_name
/* [in] */,
856 const char * account
/* [in] */,
857 const char * password
/* [in] */,
858 uint32_t rename_options
/* [in] */);
860 /************************************************************//**
864 * @brief Get Information on a server
866 * @param[in] server_name The server name to connect to
867 * @param[in] level The level to define which information is requested
868 * @param[out] buffer The returned buffer carrying the SERVER_INFO structure
869 * @return NET_API_STATUS
871 ***************************************************************/
873 NET_API_STATUS
NetServerGetInfo(const char * server_name
/* [in] */,
874 uint32_t level
/* [in] */,
875 uint8_t **buffer
/* [out] [ref] */);
877 /************************************************************//**
881 * @brief Get Information on a server
883 * @param[in] server_name The server name to connect to
884 * @param[in] level The level to define which information is set
885 * @param[in] buffer The buffer carrying the SERVER_INFO structure
886 * @param[out] parm_error On failure returns the invalid SERVER_INFO member
887 * @return NET_API_STATUS
889 ***************************************************************/
891 NET_API_STATUS
NetServerSetInfo(const char * server_name
/* [in] */,
892 uint32_t level
/* [in] */,
893 uint8_t *buffer
/* [in] [ref] */,
894 uint32_t *parm_error
/* [out] [ref] */);
896 /************************************************************//**
900 * @brief Query for the PDC for a given domain
902 * @param[in] server_name The server name to connect to
903 * @param[in] domain_name The name of the domain to lookup
904 * @param[out] buffer The name of the domain to lookup
905 * @return NET_API_STATUS
907 * example getdc/getdc.c
908 ***************************************************************/
910 NET_API_STATUS
NetGetDCName(const char * server_name
/* [in] */,
911 const char * domain_name
/* [in] */,
912 uint8_t **buffer
/* [out] [ref] */);
914 /************************************************************//**
918 * @brief Query for any DC for a given domain
920 * @param[in] server_name The server name to connect to
921 * @param[in] domain_name The name of the domain to lookup
922 * @param[out] buffer The name of the domain to lookup
923 * @return NET_API_STATUS
925 * example getdc/getdc.c
926 ***************************************************************/
928 NET_API_STATUS
NetGetAnyDCName(const char * server_name
/* [in] */,
929 const char * domain_name
/* [in] */,
930 uint8_t **buffer
/* [out] [ref] */);
933 /************************************************************//**
937 * @brief Lookup a DC for a given domain and return information structure
939 * @param[in] server_name The server name to connect to
940 * @param[in] domain_name The name of the domain to lookup (cannot be NULL)
941 * @param[in] domain_guid The GUID of the domain to lookup (optional)
942 * @param[in] site_name The name of the site the DC should reside in
943 * @param[in] flags A bitmask to request specific features supported by the DC
944 * @param[out] dc_info Pointer to a DOMAIN_CONTROLLER_INFO structure
945 * @return NET_API_STATUS
947 * example dsgetdc/dsgetdc.c
948 ***************************************************************/
950 NET_API_STATUS
DsGetDcName(const char * server_name
/* [in] [unique] */,
951 const char * domain_name
/* [in] [ref] */,
952 struct GUID
*domain_guid
/* [in] [unique] */,
953 const char * site_name
/* [in] [unique] */,
954 uint32_t flags
/* [in] */,
955 struct DOMAIN_CONTROLLER_INFO
**dc_info
/* [out] [ref] */);
957 /************************************************************//**
961 * @brief Create a user on a given server
963 * @param[in] server_name The server name to connect to
964 * @param[in] level The level of the USER_INFO structure passed in (Currently
965 * only level 1 is supported)
966 * @param[in] buffer The buffer carrying the USER_INFO structure
967 * @param[out] parm_error In case of error returns the failing member of the
969 * @return NET_API_STATUS
971 * example user/user_add.c
972 ***************************************************************/
974 NET_API_STATUS
NetUserAdd(const char * server_name
/* [in] */,
975 uint32_t level
/* [in] */,
976 uint8_t *buffer
/* [in] [ref] */,
977 uint32_t *parm_error
/* [out] [ref] */);
979 /************************************************************//**
983 * @brief Delete a user on a given server
985 * @param[in] server_name The server name to connect to
986 * @param[in] user_name The user account to delete
987 * @return NET_API_STATUS
989 * example user/user_del.c
990 ***************************************************************/
992 NET_API_STATUS
NetUserDel(const char * server_name
/* [in] */,
993 const char * user_name
/* [in] */);
995 /************************************************************//**
999 * @brief Enumerate accounts on a server
1001 * @param[in] server_name The server name to connect to
1002 * @param[in] level The enumeration level used for the query (Currently only
1003 * level 0 is supported)
1004 * @param[in] filter The account flags filter used for the query
1005 * @param[out] buffer The returned enumeration buffer
1006 * @param[in] prefmaxlen The requested maximal buffer size
1007 * @param[out] entries_read The number of returned entries
1008 * @param[out] total_entries The number of total entries
1009 * @param[in,out] resume_handle A handle passed in and returned for resuming
1011 * @return NET_API_STATUS
1013 * example user/user_enum.c
1014 ***************************************************************/
1016 NET_API_STATUS
NetUserEnum(const char * server_name
/* [in] */,
1017 uint32_t level
/* [in] */,
1018 uint32_t filter
/* [in] */,
1019 uint8_t **buffer
/* [out] [ref] */,
1020 uint32_t prefmaxlen
/* [in] */,
1021 uint32_t *entries_read
/* [out] [ref] */,
1022 uint32_t *total_entries
/* [out] [ref] */,
1023 uint32_t *resume_handle
/* [in,out] [ref] */);
1025 /************************************************************//**
1027 * NetUserChangePassword
1029 * @brief Change the password for a user on a given server or in a given domain
1031 * @param[in] domain_name The server or domain name to connect to
1032 * @param[in] user_name The user account to change the password for
1033 * @param[in] old_password The user account's old password
1034 * @param[in] new_password The user account's new password
1035 * @return NET_API_STATUS
1037 * example user/user_chgpwd.c
1038 ***************************************************************/
1040 NET_API_STATUS
NetUserChangePassword(const char * domain_name
/* [in] */,
1041 const char * user_name
/* [in] */,
1042 const char * old_password
/* [in] */,
1043 const char * new_password
/* [in] */);
1045 /************************************************************//**
1049 * @brief Get User Information
1051 * @param[in] server_name The server name to connect to
1052 * @param[in] user_name The name of the user that is going to be queried
1053 * @param[in] level The level defining the requested USER_INFO_X structure
1054 * @param[out] buffer The buffer containing a USER_INFO_X structure
1055 * @return NET_API_STATUS
1057 * example user/user_getinfo.c
1058 ***************************************************************/
1060 NET_API_STATUS
NetUserGetInfo(const char * server_name
/* [in] */,
1061 const char * user_name
/* [in] */,
1062 uint32_t level
/* [in] */,
1063 uint8_t **buffer
/* [out] [ref] */);
1065 /************************************************************//**
1069 * @brief Set User Information
1071 * @param[in] server_name The server name to connect to
1072 * @param[in] user_name The name of the user that is going to be modified
1073 * @param[in] level The level defining the requested USER_INFO_X structure
1074 * @param[in] buffer The buffer containing a USER_INFO_X structure
1075 * @param[out] parm_err The returned parameter error number if any
1076 * @return NET_API_STATUS
1078 * example user/user_setinfo.c
1079 ***************************************************************/
1081 NET_API_STATUS
NetUserSetInfo(const char * server_name
/* [in] */,
1082 const char * user_name
/* [in] */,
1083 uint32_t level
/* [in] */,
1084 uint8_t *buffer
/* [in] [ref] */,
1085 uint32_t *parm_err
/* [out] [ref] */);
1087 /************************************************************//**
1091 * @brief Get SAM domain and password information
1093 * @param[in] server_name The server name to connect to
1094 * @param[in] level The level defining which USER_MODALS_INFO_X buffer to query
1095 * @param[out] buffer The returned USER_MODALS_INFO_X buffer
1096 * @return NET_API_STATUS
1098 * example user/user_modalsget.c
1099 ***************************************************************/
1101 NET_API_STATUS
NetUserModalsGet(const char * server_name
/* [in] */,
1102 uint32_t level
/* [in] */,
1103 uint8_t **buffer
/* [out] [ref] */);
1105 /************************************************************//**
1109 * @brief Set SAM domain and password information
1111 * @param[in] server_name The server name to connect to
1112 * @param[in] level The level defining which USER_MODALS_INFO_X buffer to query
1113 * @param[out] buffer The buffer conntaing a USER_MODALS_INFO_X structure
1114 * @param[out] parm_err The returned parameter error number if any
1115 * @return NET_API_STATUS
1117 * example user/user_modalsset.c
1118 ***************************************************************/
1120 NET_API_STATUS
NetUserModalsSet(const char * server_name
/* [in] */,
1121 uint32_t level
/* [in] */,
1122 uint8_t *buffer
/* [in] [ref] */,
1123 uint32_t *parm_err
/* [out] [ref] */);
1125 /************************************************************//**
1129 * @brief Enumerate grouplist of a user on a server
1131 * @param[in] server_name The server name to connect to
1132 * @param[in] user_name The user name to query
1133 * @param[in] level The enumeration level used for the query (Currently only
1134 * level 0 is supported)
1135 * @param[out] buffer The returned enumeration buffer
1136 * @param[in] prefmaxlen The requested maximal buffer size
1137 * @param[out] entries_read The number of returned entries
1138 * @param[out] total_entries The number of total entries
1139 * @return NET_API_STATUS
1141 * example user/user_getgroups.c
1142 ***************************************************************/
1144 NET_API_STATUS
NetUserGetGroups(const char * server_name
/* [in] */,
1145 const char * user_name
/* [in] */,
1146 uint32_t level
/* [in] */,
1147 uint8_t **buffer
/* [out] [ref] */,
1148 uint32_t prefmaxlen
/* [in] */,
1149 uint32_t *entries_read
/* [out] [ref] */,
1150 uint32_t *total_entries
/* [out] [ref] */);
1152 /************************************************************//**
1156 * @brief Set grouplist of a user on a server
1158 * @param[in] server_name The server name to connect to
1159 * @param[in] user_name The user name to query
1160 * @param[in] level The level defining the GROUP_USERS_INFO_X structures in the buffer
1161 * @param[in] buffer The buffer containing GROUP_USERS_INFO_X structures
1162 * @param[in] num_entries The number of X structures in the buffer
1163 * @return NET_API_STATUS
1165 * example user/user_setgroups.c
1166 ***************************************************************/
1168 NET_API_STATUS
NetUserSetGroups(const char * server_name
/* [in] */,
1169 const char * user_name
/* [in] */,
1170 uint32_t level
/* [in] */,
1171 uint8_t *buffer
/* [in] [ref] */,
1172 uint32_t num_entries
/* [in] */);
1174 /************************************************************//**
1176 * NetQueryDisplayInformation
1178 * @brief Enumerate accounts on a server
1180 * @param[in] server_name The server name to connect to
1181 * @param[in] level The enumeration level used for the query
1182 * @param[in] idx The index to start the the display enumeration at
1183 * @param[in] entries_requested The number of entries requested
1184 * @param[in] prefmaxlen The requested maximal buffer size
1185 * @param[out] entries_read The number of returned entries
1186 * @param[out] buffer The returned display information buffer
1187 * @return NET_API_STATUS
1189 * example user/user_dispinfo.c
1190 ***************************************************************/
1192 NET_API_STATUS
NetQueryDisplayInformation(const char * server_name
/* [in] [unique] */,
1193 uint32_t level
/* [in] */,
1194 uint32_t idx
/* [in] */,
1195 uint32_t entries_requested
/* [in] */,
1196 uint32_t prefmaxlen
/* [in] */,
1197 uint32_t *entries_read
/* [out] [ref] */,
1198 void **buffer
/* [out] [noprint,ref] */);
1200 /************************************************************//**
1204 * @brief Create Domain Group
1206 * @param[in] server_name The server name to connect to
1207 * @param[in] level The level used for the new group creation
1208 * @param[in] buf The buffer containing the group structure
1209 * @param[out] parm_err The returned parameter error number if any
1210 * @return NET_API_STATUS
1212 * example group/group_add.c
1213 ***************************************************************/
1215 NET_API_STATUS
NetGroupAdd(const char * server_name
/* [in] */,
1216 uint32_t level
/* [in] */,
1217 uint8_t *buf
/* [in] [ref] */,
1218 uint32_t *parm_err
/* [out] [ref] */);
1220 /************************************************************//**
1224 * @brief Delete Domain Group
1226 * @param[in] server_name The server name to connect to
1227 * @param[in] group_name The name of the group that is going to be deleted
1228 * @return NET_API_STATUS
1230 * example group/group_del.c
1231 ***************************************************************/
1233 NET_API_STATUS
NetGroupDel(const char * server_name
/* [in] */,
1234 const char * group_name
/* [in] */);
1236 /************************************************************//**
1240 * @brief Enumerate groups on a server
1242 * @param[in] server_name The server name to connect to
1243 * @param[in] level The enumeration level used for the query (Currently only
1244 * level 0 is supported)
1245 * @param[out] buffer The returned enumeration buffer
1246 * @param[in] prefmaxlen The requested maximal buffer size
1247 * @param[out] entries_read The number of returned entries
1248 * @param[out] total_entries The number of total entries
1249 * @param[in,out] resume_handle A handle passed in and returned for resuming
1251 * @return NET_API_STATUS
1253 * example group/group_enum.c
1254 ***************************************************************/
1256 NET_API_STATUS
NetGroupEnum(const char * server_name
/* [in] */,
1257 uint32_t level
/* [in] */,
1258 uint8_t **buffer
/* [out] [ref] */,
1259 uint32_t prefmaxlen
/* [in] */,
1260 uint32_t *entries_read
/* [out] [ref] */,
1261 uint32_t *total_entries
/* [out] [ref] */,
1262 uint32_t *resume_handle
/* [in,out] [ref] */);
1264 /************************************************************//**
1268 * @brief Set Domain Group Information
1270 * @param[in] server_name The server name to connect to
1271 * @param[in] group_name The name of the group that is going to be modified
1272 * @param[in] level The level defining the structure type in buf
1273 * @param[in] buf The buffer containing a GROUP_INFO_X structure
1274 * @param[out] parm_err The returned parameter error number if any
1275 * @return NET_API_STATUS
1277 * example group/group_setinfo.c
1278 ***************************************************************/
1280 NET_API_STATUS
NetGroupSetInfo(const char * server_name
/* [in] */,
1281 const char * group_name
/* [in] */,
1282 uint32_t level
/* [in] */,
1283 uint8_t *buf
/* [in] [ref] */,
1284 uint32_t *parm_err
/* [out] [ref] */);
1286 /************************************************************//**
1290 * @brief Get Domain Group Information
1292 * @param[in] server_name The server name to connect to
1293 * @param[in] group_name The name of the group that is going to be queried
1294 * @param[in] level The level defining the requested GROUP_INFO_X structure
1295 * @param[out] buf The buffer containing a GROUP_INFO_X structure
1296 * @return NET_API_STATUS
1298 * example group/group_getinfo.c
1299 ***************************************************************/
1301 NET_API_STATUS
NetGroupGetInfo(const char * server_name
/* [in] */,
1302 const char * group_name
/* [in] */,
1303 uint32_t level
/* [in] */,
1304 uint8_t **buf
/* [out] [ref] */);
1306 /************************************************************//**
1310 * @brief Add existing User to existing Domain Group
1312 * @param[in] server_name The server name to connect to
1313 * @param[in] group_name The name of the group that is going to be modified
1314 * @param[in] user_name The name of the user that is going to be added to the
1316 * @return NET_API_STATUS
1318 * example group/group_adduser.c
1319 ***************************************************************/
1321 NET_API_STATUS
NetGroupAddUser(const char * server_name
/* [in] */,
1322 const char * group_name
/* [in] */,
1323 const char * user_name
/* [in] */);
1325 /************************************************************//**
1329 * @brief Remove User from Domain Group
1331 * @param[in] server_name The server name to connect to
1332 * @param[in] group_name The name of the group that is going to be modified
1333 * @param[in] user_name The name of the user that is going to be removed from
1335 * @return NET_API_STATUS
1337 * example group/group_deluser.c
1338 ***************************************************************/
1340 NET_API_STATUS
NetGroupDelUser(const char * server_name
/* [in] */,
1341 const char * group_name
/* [in] */,
1342 const char * user_name
/* [in] */);
1344 /************************************************************//**
1348 * @brief Get Users for a group on a server
1350 * @param[in] server_name The server name to connect to
1351 * @param[in] group_name The group name to enumerate users for
1352 * @param[in] level The enumeration level used for the query
1353 * @param[out] buffer The returned enumeration buffer
1354 * @param[in] prefmaxlen The requested maximal buffer size
1355 * @param[out] entries_read The number of returned entries
1356 * @param[out] total_entries The number of total entries
1357 * @param[in,out] resume_handle A handle passed in and returned for resuming
1359 * @return NET_API_STATUS
1361 * example group/group_getusers.c
1362 ***************************************************************/
1364 NET_API_STATUS
NetGroupGetUsers(const char * server_name
/* [in] */,
1365 const char * group_name
/* [in] */,
1366 uint32_t level
/* [in] */,
1367 uint8_t **buffer
/* [out] [ref] */,
1368 uint32_t prefmaxlen
/* [in] */,
1369 uint32_t *entries_read
/* [out] [ref] */,
1370 uint32_t *total_entries
/* [out] [ref] */,
1371 uint32_t *resume_handle
/* [in,out] [ref] */);
1373 /************************************************************//**
1377 * @brief Create Local Group
1379 * @param[in] server_name The server name to connect to
1380 * @param[in] level The level used for the new group creation
1381 * @param[in] buf The buffer containing the group structure
1382 * @param[out] parm_err The returned parameter error number if any
1383 * @return NET_API_STATUS
1385 * example localgroup/localgroup_add.c
1386 ***************************************************************/
1388 NET_API_STATUS
NetLocalGroupAdd(const char * server_name
/* [in] */,
1389 uint32_t level
/* [in] */,
1390 uint8_t *buf
/* [in] [ref] */,
1391 uint32_t *parm_err
/* [out] [ref] */);
1393 /************************************************************//**
1397 * @brief Delete Local Group
1399 * @param[in] server_name The server name to connect to
1400 * @param[in] group_name The name of the group that is going to be deleted
1401 * @return NET_API_STATUS
1403 * example localgroup/localgroup_del.c
1404 ***************************************************************/
1407 NET_API_STATUS
NetLocalGroupDel(const char * server_name
/* [in] */,
1408 const char * group_name
/* [in] */);
1410 /************************************************************//**
1412 * NetLocalGroupGetInfo
1414 * @brief Get Local Group Information
1416 * @param[in] server_name The server name to connect to
1417 * @param[in] group_name The name of the group that is going to be queried
1418 * @param[in] level The level defining the requested LOCALGROUP_INFO_X structure
1419 * @param[out] buf The buffer containing a LOCALGROUP_INFO_X structure
1420 * @return NET_API_STATUS
1422 * example localgroup/localgroup_getinfo.c
1423 ***************************************************************/
1425 NET_API_STATUS
NetLocalGroupGetInfo(const char * server_name
/* [in] */,
1426 const char * group_name
/* [in] */,
1427 uint32_t level
/* [in] */,
1428 uint8_t **buf
/* [out] [ref] */);
1430 /************************************************************//**
1432 * NetLocalGroupSetInfo
1434 * @brief Set Local Group Information
1436 * @param[in] server_name The server name to connect to
1437 * @param[in] group_name The name of the group that is going to be modified
1438 * @param[in] level The level defining the requested LOCALGROUP_INFO_X structure
1439 * @param[in] buf The buffer containing a LOCALGROUP_INFO_X structure
1440 * @param[out] parm_err The returned parameter error number if any
1441 * @return NET_API_STATUS
1443 * example localgroup/localgroup_setinfo.c
1444 ***************************************************************/
1447 NET_API_STATUS
NetLocalGroupSetInfo(const char * server_name
/* [in] */,
1448 const char * group_name
/* [in] */,
1449 uint32_t level
/* [in] */,
1450 uint8_t *buf
/* [in] [ref] */,
1451 uint32_t *parm_err
/* [out] [ref] */);
1453 /************************************************************//**
1457 * @brief Enumerate local groups on a server
1459 * @param[in] server_name The server name to connect to
1460 * @param[in] level The enumeration level used for the query (Currently only
1461 * level 0 is supported)
1462 * @param[out] buffer The returned enumeration buffer
1463 * @param[in] prefmaxlen The requested maximal buffer size
1464 * @param[out] entries_read The number of returned entries
1465 * @param[out] total_entries The number of total entries
1466 * @param[in,out] resume_handle A handle passed in and returned for resuming
1468 * @return NET_API_STATUS
1470 * example localgroup/localgroup_enum.c
1471 ***************************************************************/
1473 NET_API_STATUS
NetLocalGroupEnum(const char * server_name
/* [in] */,
1474 uint32_t level
/* [in] */,
1475 uint8_t **buffer
/* [out] [ref] */,
1476 uint32_t prefmaxlen
/* [in] */,
1477 uint32_t *entries_read
/* [out] [ref] */,
1478 uint32_t *total_entries
/* [out] [ref] */,
1479 uint32_t *resume_handle
/* [in,out] [ref] */);
1481 /************************************************************//**
1483 * NetLocalGroupAddMembers
1485 * @brief Add Members to a Local Group
1487 * @param[in] server_name The server name to connect to
1488 * @param[in] group_name The name of the group that is going to modified
1489 * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
1490 * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
1491 * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
1493 * @return NET_API_STATUS
1495 * example localgroup/localgroup_addmembers.c
1496 ***************************************************************/
1498 NET_API_STATUS
NetLocalGroupAddMembers(const char * server_name
/* [in] */,
1499 const char * group_name
/* [in] */,
1500 uint32_t level
/* [in] */,
1501 uint8_t *buffer
/* [in] [ref] */,
1502 uint32_t total_entries
/* [in] */);
1504 /************************************************************//**
1506 * NetLocalGroupDelMembers
1508 * @brief Delete Members from a Local Group
1510 * @param[in] server_name The server name to connect to
1511 * @param[in] group_name The name of the group that is going to modified
1512 * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
1513 * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
1514 * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
1516 * @return NET_API_STATUS
1518 * example localgroup/localgroup_delmembers.c
1519 ***************************************************************/
1521 NET_API_STATUS
NetLocalGroupDelMembers(const char * server_name
/* [in] */,
1522 const char * group_name
/* [in] */,
1523 uint32_t level
/* [in] */,
1524 uint8_t *buffer
/* [in] [ref] */,
1525 uint32_t total_entries
/* [in] */);
1527 /************************************************************//**
1529 * NetLocalGroupGetMembers
1531 * @brief Enumerate Members in a local group
1533 * @param[in] server_name The server name to connect to
1534 * @param[in] local_group_name The localgroup that is going to be queried
1535 * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
1536 * @param[out] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X
1538 * @param[in] prefmaxlen The requested maximal buffer size
1539 * @param[out] entries_read The number of LOCALGROUP_MEMBERS_INFO_X entries in the buffer
1540 * @param[out] total_entries The total number of LOCALGROUP_MEMBERS_INFO_X entries for that group
1541 * @param[in,out] resume_handle A handle passed in and returned for resuming
1543 * @return NET_API_STATUS
1545 * example localgroup/localgroup_getmembers.c
1546 ***************************************************************/
1548 NET_API_STATUS
NetLocalGroupGetMembers(const char * server_name
/* [in] */,
1549 const char * local_group_name
/* [in] */,
1550 uint32_t level
/* [in] */,
1551 uint8_t **buffer
/* [out] [ref] */,
1552 uint32_t prefmaxlen
/* [in] */,
1553 uint32_t *entries_read
/* [out] [ref] */,
1554 uint32_t *total_entries
/* [out] [ref] */,
1555 uint32_t *resume_handle
/* [in,out] [ref] */);
1557 /************************************************************//**
1559 * NetLocalGroupSetMembers
1561 * @brief Set Members in a Local Group
1563 * @param[in] server_name The server name to connect to
1564 * @param[in] group_name The name of the group that is going to modified
1565 * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
1566 * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
1567 * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
1569 * @return NET_API_STATUS
1571 * example localgroup/localgroup_setmembers.c
1572 ***************************************************************/
1574 NET_API_STATUS
NetLocalGroupSetMembers(const char * server_name
/* [in] */,
1575 const char * group_name
/* [in] */,
1576 uint32_t level
/* [in] */,
1577 uint8_t *buffer
/* [in] [ref] */,
1578 uint32_t total_entries
/* [in] */);
1580 /************************************************************//**
1584 * @brief Query remote Time of Day
1586 * @param[in] server_name The server name to connect to
1587 * @param[out] buf The buffer containing a TIME_OF_DAY_INFO structure
1588 * @return NET_API_STATUS
1590 * example server/remote_tod.c
1591 ***************************************************************/
1593 NET_API_STATUS
NetRemoteTOD(const char * server_name
/* [in] */,
1594 uint8_t **buf
/* [out] [ref] */);
1596 /************************************************************//**
1602 * @param[in] server_name The server name to connect to
1603 * @param[in] level The level defining the requested SHARE_INFO_X structure
1604 * @param[in] buffer The buffer containing a SHARE_INFO_X structure
1605 * @param[out] parm_err The returned parameter error number if any
1606 * @return NET_API_STATUS
1608 * example share/share_add.c
1609 ***************************************************************/
1611 NET_API_STATUS
NetShareAdd(const char * server_name
/* [in] */,
1612 uint32_t level
/* [in] */,
1613 uint8_t *buffer
/* [in] [ref] */,
1614 uint32_t *parm_err
/* [out] [ref] */);
1616 /************************************************************//**
1620 * @brief Delete Share
1622 * @param[in] server_name The server name to connect to
1623 * @param[in] net_name The name of the share to delete
1624 * @param[in] reserved
1625 * @return NET_API_STATUS
1627 * example share/share_del.c
1628 ***************************************************************/
1630 NET_API_STATUS
NetShareDel(const char * server_name
/* [in] */,
1631 const char * net_name
/* [in] */,
1632 uint32_t reserved
/* [in] */);
1634 /************************************************************//**
1638 * @brief Enumerate Shares
1640 * @param[in] server_name The server name to connect to
1641 * @param[in] level The level defining the SHARE_INFO_X structure
1642 * @param[out] buffer The buffer containing a SHARE_INFO_X structure
1643 * @param[in] prefmaxlen The requested maximal buffer size
1644 * @param[out] entries_read The number of SHARE_INFO_X entries in the buffer
1645 * @param[out] total_entries The total number of SHARE_INFO_X entries
1646 * @param[in,out] resume_handle A handle passed in and returned for resuming
1648 * @return NET_API_STATUS
1650 * example share/share_enum.c
1651 ***************************************************************/
1653 NET_API_STATUS
NetShareEnum(const char * server_name
/* [in] */,
1654 uint32_t level
/* [in] */,
1655 uint8_t **buffer
/* [out] [ref] */,
1656 uint32_t prefmaxlen
/* [in] */,
1657 uint32_t *entries_read
/* [out] [ref] */,
1658 uint32_t *total_entries
/* [out] [ref] */,
1659 uint32_t *resume_handle
/* [in,out] [ref] */);
1661 /************************************************************//**
1665 * @brief Get Share Info
1667 * @param[in] server_name The server name to connect to
1668 * @param[in] net_name The name of the share to query
1669 * @param[in] level The level defining the SHARE_INFO_X structure
1670 * @param[out] buffer The buffer containing a SHARE_INFO_X structure
1671 * @return NET_API_STATUS
1673 * example share/share_getinfo.c
1674 ***************************************************************/
1676 NET_API_STATUS
NetShareGetInfo(const char * server_name
/* [in] */,
1677 const char * net_name
/* [in] */,
1678 uint32_t level
/* [in] */,
1679 uint8_t **buffer
/* [out] [ref] */);
1681 /************************************************************//**
1685 * @brief Set Share Info
1687 * @param[in] server_name The server name to connect to
1688 * @param[in] net_name The name of the share to query
1689 * @param[in] level The level defining the SHARE_INFO_X structure
1690 * @param[in] buffer The buffer containing a SHARE_INFO_X structure
1691 * @param[out] parm_err The returned parameter error number if any
1692 * @return NET_API_STATUS
1694 * example share/share_setinfo.c
1695 ***************************************************************/
1697 NET_API_STATUS
NetShareSetInfo(const char * server_name
/* [in] */,
1698 const char * net_name
/* [in] */,
1699 uint32_t level
/* [in] */,
1700 uint8_t *buffer
/* [in] [ref] */,
1701 uint32_t *parm_err
/* [out] [ref] */);
1705 #endif /* __cplusplus */
1707 #endif /* __LIB_NETAPI_H__ */