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__
23 /****************************************************************
25 ****************************************************************/
27 NET_API_STATUS_SUCCESS = 0
30 #define ERROR_MORE_DATA ( 234L )
32 /****************************************************************
33 ****************************************************************/
40 uint16_t time_hi_and_version;
45 #endif /* _HEADER_misc */
47 #ifndef _HEADER_libnetapi
50 #define MAXSUBAUTHS 15 /* max sub authorities in a SID */
57 uint32_t sub_auths[MAXSUBAUTHS];
60 struct DOMAIN_CONTROLLER_INFO {
61 const char * domain_controller_name;
62 const char * domain_controller_address;
63 uint32_t domain_controller_address_type;
64 struct GUID domain_guid;
65 const char * domain_name;
66 const char * dns_forest_name;
68 const char * dc_site_name;
69 const char * client_site_name;
72 #define FILTER_TEMP_DUPLICATE_ACCOUNT ( 0x0001 )
73 #define FILTER_NORMAL_ACCOUNT ( 0x0002 )
74 #define FILTER_INTERDOMAIN_TRUST_ACCOUNT ( 0x0008 )
75 #define FILTER_WORKSTATION_TRUST_ACCOUNT ( 0x0010 )
76 #define FILTER_SERVER_TRUST_ACCOUNT ( 0x0020 )
78 struct SERVER_INFO_1005 {
79 const char * sv1005_comment;
83 const char * usri0_name;
87 const char * usri1_name;
88 const char * usri1_password;
89 uint32_t usri1_password_age;
91 const char * usri1_home_dir;
92 const char * usri1_comment;
94 const char * usri1_script_path;
98 const char * usri2_name;
99 const char * usri2_password;
100 uint32_t usri2_password_age;
102 const char * usri2_home_dir;
103 const char * usri2_comment;
104 uint32_t usri2_flags;
105 const char * usri2_script_path;
106 uint32_t usri2_auth_flags;
107 const char * usri2_full_name;
108 const char * usri2_usr_comment;
109 const char * usri2_parms;
110 const char * usri2_workstations;
111 uint32_t usri2_last_logon;
112 uint32_t usri2_last_logoff;
113 uint32_t usri2_acct_expires;
114 uint32_t usri2_max_storage;
115 uint32_t usri2_units_per_week;
116 uint8_t *usri2_logon_hours;/* [unique] */
117 uint32_t usri2_bad_pw_count;
118 uint32_t usri2_num_logons;
119 const char * usri2_logon_server;
120 uint32_t usri2_country_code;
121 uint32_t usri2_code_page;
125 const char * usri3_name;
126 uint32_t usri3_password_age;
128 const char * usri3_home_dir;
129 const char * usri3_comment;
130 uint32_t usri3_flags;
131 const char * usri3_script_path;
132 uint32_t usri3_auth_flags;
133 const char * usri3_full_name;
134 const char * usri3_usr_comment;
135 const char * usri3_parms;
136 const char * usri3_workstations;
137 uint32_t usri3_last_logon;
138 uint32_t usri3_last_logoff;
139 uint32_t usri3_acct_expires;
140 uint32_t usri3_max_storage;
141 uint32_t usri3_units_per_week;
142 uint8_t *usri3_logon_hours;/* [unique] */
143 uint32_t usri3_bad_pw_count;
144 uint32_t usri3_num_logons;
145 const char * usri3_logon_server;
146 uint32_t usri3_country_code;
147 uint32_t usri3_code_page;
148 uint32_t usri3_user_id;
149 uint32_t usri3_primary_group_id;
150 const char * usri3_profile;
151 const char * usri3_home_dir_drive;
152 uint32_t usri3_password_expired;
156 const char * usri4_name;
157 const char * usri4_password;
158 uint32_t usri4_password_age;
160 const char * usri4_home_dir;
161 const char * usri4_comment;
162 uint32_t usri4_flags;
163 const char * usri4_script_path;
164 uint32_t usri4_auth_flags;
165 const char * usri4_full_name;
166 const char * usri4_usr_comment;
167 const char * usri4_parms;
168 const char * usri4_workstations;
169 uint32_t usri4_last_logon;
170 uint32_t usri4_last_logoff;
171 uint32_t usri4_acct_expires;
172 uint32_t usri4_max_storage;
173 uint32_t usri4_units_per_week;
174 uint8_t *usri4_logon_hours;/* [unique] */
175 uint32_t usri4_bad_pw_count;
176 uint32_t usri4_num_logons;
177 const char * usri4_logon_server;
178 uint32_t usri4_country_code;
179 uint32_t usri4_code_page;
180 struct dom_sid *usri4_user_sid;/* [unique] */
181 uint32_t usri4_primary_group_id;
182 const char * usri4_profile;
183 const char * usri4_home_dir_drive;
184 uint32_t usri4_password_expired;
187 struct USER_INFO_10 {
188 const char * usri10_name;
189 const char * usri10_comment;
190 const char * usri10_usr_comment;
191 const char * usri10_full_name;
194 struct USER_INFO_11 {
195 const char * usri11_name;
196 const char * usri11_comment;
197 const char * usri11_usr_comment;
198 const char * usri11_full_name;
199 uint32_t usri11_priv;
200 uint32_t usri11_auth_flags;
201 uint32_t usri11_password_age;
202 const char * usri11_home_dir;
203 const char * usri11_parms;
204 uint32_t usri11_last_logon;
205 uint32_t usri11_last_logoff;
206 uint32_t usri11_bad_pw_count;
207 uint32_t usri11_num_logons;
208 const char * usri11_logon_server;
209 uint32_t usri11_country_code;
210 const char * usri11_workstations;
211 uint32_t usri11_max_storage;
212 uint32_t usri11_units_per_week;
213 uint8_t *usri11_logon_hours;/* [unique] */
214 uint32_t usri11_code_page;
217 struct USER_INFO_20 {
218 const char * usri20_name;
219 const char * usri20_full_name;
220 const char * usri20_comment;
221 uint32_t usri20_flags;
222 uint32_t usri20_user_id;
225 struct USER_INFO_23 {
226 const char * usri23_name;
227 const char * usri23_full_name;
228 const char * usri23_comment;
229 uint32_t usri23_flags;
230 struct domsid *usri23_user_sid;/* [unique] */
233 struct USER_INFO_1007 {
234 const char * usri1007_comment;
237 struct NET_DISPLAY_USER {
238 const char * usri1_name;
239 const char * usri1_comment;
240 uint32_t usri1_flags;
241 const char * usri1_full_name;
242 uint32_t usri1_user_id;
243 uint32_t usri1_next_index;
246 struct NET_DISPLAY_MACHINE {
247 const char * usri2_name;
248 const char * usri2_comment;
249 uint32_t usri2_flags;
250 uint32_t usri2_user_id;
251 uint32_t usri2_next_index;
254 struct NET_DISPLAY_GROUP {
255 const char * grpi3_name;
256 const char * grpi3_comment;
257 uint32_t grpi3_group_id;
258 uint32_t grpi3_attributes;
259 uint32_t grpi3_next_index;
262 struct GROUP_INFO_0 {
263 const char * grpi0_name;
266 struct GROUP_INFO_1 {
267 const char * grpi1_name;
268 const char * grpi1_comment;
271 struct GROUP_INFO_2 {
272 const char * grpi2_name;
273 const char * grpi2_comment;
274 uint32_t grpi2_group_id;
275 uint32_t grpi2_attributes;
278 struct GROUP_INFO_3 {
279 const char * grpi3_name;
280 const char * grpi3_comment;
281 struct domsid * grpi3_group_sid;
282 uint32_t grpi3_attributes;
285 struct GROUP_INFO_1002 {
286 const char * grpi1002_comment;
289 struct GROUP_INFO_1005 {
290 uint32_t grpi1005_attributes;
293 struct LOCALGROUP_INFO_0 {
294 const char * lgrpi0_name;
297 struct LOCALGROUP_INFO_1 {
298 const char * lgrpi1_name;
299 const char * lgrpi1_comment;
302 struct LOCALGROUP_INFO_1002 {
303 const char * lgrpi1002_comment;
306 struct TIME_OF_DAY_INFO {
307 uint32_t tod_elapsedt;
313 int32_t tod_timezone;
314 uint32_t tod_tinterval;
318 uint32_t tod_weekday;
321 #endif /* _HEADER_libnetapi */
323 /****************************************************************
324 ****************************************************************/
326 struct libnetapi_ctx {
338 /****************************************************************
339 ****************************************************************/
341 NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx);
343 /****************************************************************
344 ****************************************************************/
346 NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx);
348 /****************************************************************
349 ****************************************************************/
351 NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx);
353 /****************************************************************
354 ****************************************************************/
356 NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx,
357 const char *debuglevel);
359 /****************************************************************
360 ****************************************************************/
362 NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx,
363 const char *username);
365 /****************************************************************
366 ****************************************************************/
368 NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx,
369 const char *password);
371 /****************************************************************
372 ****************************************************************/
374 NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx,
375 const char *workgroup);
377 /****************************************************************
378 ****************************************************************/
380 NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx);
382 /****************************************************************
383 ****************************************************************/
385 const char *libnetapi_errstr(NET_API_STATUS status);
387 /****************************************************************
388 ****************************************************************/
390 const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx,
391 NET_API_STATUS status);
394 /****************************************************************
396 ****************************************************************/
398 NET_API_STATUS NetApiBufferFree(void *buffer);
400 /************************************************************//**
402 * ConvertSidToStringSid
404 * @brief Convert a domain sid into a string
406 * @param[in] sid A pointer to a sid structure
407 * @param[in] sid_string A pointer that holds a pointer to a sid string. Caller
408 * needs to free with free(3)
410 ***************************************************************/
412 int ConvertSidToStringSid(const struct domsid *sid,
415 /************************************************************//**
419 * @brief Join a computer to a domain or workgroup
421 * @param[in] server The server name to connect to
422 * @param[in] domain The domain or workgroup to join
423 * @param[in] account_ou The organizational Unit to create the computer account
425 * @param[in] account The domain account used for joining a domain
426 * @param[in] password The domain account's password used for joining a domain
427 * @param[in] join_flags Bitmask field to define specific join features
428 * @return NET_API_STATUS
430 * example netdomjoin/netdomjoin.c
431 ***************************************************************/
433 NET_API_STATUS NetJoinDomain(const char * server /* [in] */,
434 const char * domain /* [in] [ref] */,
435 const char * account_ou /* [in] */,
436 const char * account /* [in] */,
437 const char * password /* [in] */,
438 uint32_t join_flags /* [in] */);
440 /************************************************************//**
444 * @brief Unjoin a computer from a domain or workgroup
446 * @param[in] server_name The server name to connect to
447 * @param[in] account The domain account used for unjoining a domain
448 * @param[in] password The domain account's password used for unjoining a domain
449 * @param[in] unjoin_flags Bitmask field to define specific unjoin features
450 * @return NET_API_STATUS
452 ***************************************************************/
454 NET_API_STATUS NetUnjoinDomain(const char * server_name /* [in] */,
455 const char * account /* [in] */,
456 const char * password /* [in] */,
457 uint32_t unjoin_flags /* [in] */);
459 /************************************************************//**
461 * NetGetJoinInformation
463 * @brief Unjoin a computer from a domain or workgroup
465 * @param[in] server_name The server name to connect to
466 * @param[out] name_buffer Returns the name of the workgroup or domain
467 * @param[out] name_type Returns the type of that name
468 * @return NET_API_STATUS
470 * example netdomjoin-gui/netdomjoin-gui.c
472 ***************************************************************/
474 NET_API_STATUS NetGetJoinInformation(const char * server_name /* [in] */,
475 const char * *name_buffer /* [out] [ref] */,
476 uint16_t *name_type /* [out] [ref] */);
478 /************************************************************//**
482 * @brief Query for the list of joinable organizational Units that can be used
485 * @param[in] server_name The server name to connect to
486 * @param[in] domain The AD domain to query
487 * @param[in] account The domain account used for the query
488 * @param[in] password The domain account's password used for the query
489 * @param[out] ou_count The number of ous returned
490 * @param[out] ous Returned string array containing the ous
491 * @return NET_API_STATUS
493 * example netdomjoin-gui/netdomjoin-gui.c
495 ***************************************************************/
497 NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] */,
498 const char * domain /* [in] [ref] */,
499 const char * account /* [in] */,
500 const char * password /* [in] */,
501 uint32_t *ou_count /* [out] [ref] */,
502 const char * **ous /* [out] [ref] */);
504 /************************************************************//**
508 * @brief Get Information on a server
510 * @param[in] server_name The server name to connect to
511 * @param[in] level The level to define which information is requested
512 * @param[out] buffer The returned buffer carrying the SERVER_INFO structure
513 * @return NET_API_STATUS
515 ***************************************************************/
517 NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] */,
518 uint32_t level /* [in] */,
519 uint8_t **buffer /* [out] [ref] */);
521 /************************************************************//**
525 * @brief Get Information on a server
527 * @param[in] server_name The server name to connect to
528 * @param[in] level The level to define which information is set
529 * @param[in] buffer The buffer carrying the SERVER_INFO structure
530 * @param[out] parm_error On failure returns the invalid SERVER_INFO member
531 * @return NET_API_STATUS
533 ***************************************************************/
535 NET_API_STATUS NetServerSetInfo(const char * server_name /* [in] */,
536 uint32_t level /* [in] */,
537 uint8_t *buffer /* [in] [ref] */,
538 uint32_t *parm_error /* [out] [ref] */);
540 /************************************************************//**
544 * @brief Query for the PDC for a given domain
546 * @param[in] server_name The server name to connect to
547 * @param[in] domain_name The name of the domain to lookup
548 * @param[out] buffer The name of the domain to lookup
549 * @return NET_API_STATUS
551 * example getdc/getdc.c
552 ***************************************************************/
554 NET_API_STATUS NetGetDCName(const char * server_name /* [in] */,
555 const char * domain_name /* [in] */,
556 uint8_t **buffer /* [out] [ref] */);
558 /************************************************************//**
562 * @brief Query for any DC for a given domain
564 * @param[in] server_name The server name to connect to
565 * @param[in] domain_name The name of the domain to lookup
566 * @param[out] buffer The name of the domain to lookup
567 * @return NET_API_STATUS
569 * example getdc/getdc.c
570 ***************************************************************/
572 NET_API_STATUS NetGetAnyDCName(const char * server_name /* [in] */,
573 const char * domain_name /* [in] */,
574 uint8_t **buffer /* [out] [ref] */);
577 /************************************************************//**
581 * @brief Lookup a DC for a given domain and return information structure
583 * @param[in] server_name The server name to connect to
584 * @param[in] domain_name The name of the domain to lookup (cannot be NULL)
585 * @param[in] domain_guid The GUID of the domain to lookup (optional)
586 * @param[in] site_name The name of the site the DC should reside in
587 * @param[in] flags A bitmask to request specific features supported by the DC
588 * @param[out] dc_info Pointer to a DOMAIN_CONTROLLER_INFO structure
589 * @return NET_API_STATUS
591 * example dsgetdc/dsgetdc.c
592 ***************************************************************/
594 NET_API_STATUS DsGetDcName(const char * server_name /* [in] [unique] */,
595 const char * domain_name /* [in] [ref] */,
596 struct GUID *domain_guid /* [in] [unique] */,
597 const char * site_name /* [in] [unique] */,
598 uint32_t flags /* [in] */,
599 struct DOMAIN_CONTROLLER_INFO **dc_info /* [out] [ref] */);
601 /************************************************************//**
605 * @brief Create a user on a given server
607 * @param[in] server_name The server name to connect to
608 * @param[in] level The level of the USER_INFO structure passed in (Currently
609 * only level 1 is supported)
610 * @param[in] buffer The buffer carrying the USER_INFO structure
611 * @param[out] parm_error In case of error returns the failing member of the
613 * @return NET_API_STATUS
615 * example user/user_add.c
616 ***************************************************************/
618 NET_API_STATUS NetUserAdd(const char * server_name /* [in] */,
619 uint32_t level /* [in] */,
620 uint8_t *buffer /* [in] [ref] */,
621 uint32_t *parm_error /* [out] [ref] */);
623 /************************************************************//**
627 * @brief Delete a user on a given server
629 * @param[in] server_name The server name to connect to
630 * @param[in] user_name The user account to delete
631 * @return NET_API_STATUS
633 * example user/user_del.c
634 ***************************************************************/
636 NET_API_STATUS NetUserDel(const char * server_name /* [in] */,
637 const char * user_name /* [in] */);
639 /************************************************************//**
643 * @brief Enumerate accounts on a server
645 * @param[in] server_name The server name to connect to
646 * @param[in] level The enumeration level used for the query (Currently only
647 * level 0 is supported)
648 * @param[in] filter The account flags filter used for the query
649 * @param[out] buffer The returned enumeration buffer
650 * @param[in] prefmaxlen The requested maximal buffer size
651 * @param[out] entries_read The number of returned entries
652 * @param[out] total_entries The number of total entries
653 * @param[in,out] resume_handle A handle passed in and returned for resuming
655 * @return NET_API_STATUS
657 * example user/user_enum.c
658 ***************************************************************/
660 NET_API_STATUS NetUserEnum(const char * server_name /* [in] */,
661 uint32_t level /* [in] */,
662 uint32_t filter /* [in] */,
663 uint8_t **buffer /* [out] [ref] */,
664 uint32_t prefmaxlen /* [in] */,
665 uint32_t *entries_read /* [out] [ref] */,
666 uint32_t *total_entries /* [out] [ref] */,
667 uint32_t *resume_handle /* [in,out] [ref] */);
669 /************************************************************//**
671 * NetUserChangePassword
673 * @brief Change the password for a user on a given server or in a given domain
675 * @param[in] domain_name The server or domain name to connect to
676 * @param[in] user_name The user account to change the password for
677 * @param[in] old_password The user account's old password
678 * @param[in] new_password The user account's new password
679 * @return NET_API_STATUS
681 * example user/user_chgpwd.c
682 ***************************************************************/
684 NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */,
685 const char * user_name /* [in] */,
686 const char * old_password /* [in] */,
687 const char * new_password /* [in] */);
689 /************************************************************//**
693 * @brief Get User Information
695 * @param[in] server_name The server name to connect to
696 * @param[in] user_name The name of the user that is going to be queried
697 * @param[in] level The level defining the requested USER_INFO_X structure
698 * @param[out] buffer The buffer containing a USER_INFO_X structure
699 * @return NET_API_STATUS
701 * example user/user_getinfo.c
702 ***************************************************************/
704 NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */,
705 const char * user_name /* [in] */,
706 uint32_t level /* [in] */,
707 uint8_t **buffer /* [out] [ref] */);
709 /************************************************************//**
713 * @brief Set User Information
715 * @param[in] server_name The server name to connect to
716 * @param[in] user_name The name of the user that is going to be modified
717 * @param[in] level The level defining the requested USER_INFO_X structure
718 * @param[in] buf The buffer containing a USER_INFO_X structure
719 * @param[out] parm_err The returned parameter error number if any
720 * @return NET_API_STATUS
722 * example user/user_setinfo.c
723 ***************************************************************/
725 NET_API_STATUS NetUserSetInfo(const char * server_name /* [in] */,
726 const char * user_name /* [in] */,
727 uint32_t level /* [in] */,
728 uint8_t *buffer /* [in] [ref] */,
729 uint32_t *parm_err /* [out] [ref] */);
731 /************************************************************//**
733 * NetQueryDisplayInformation
735 * @brief Enumerate accounts on a server
737 * @param[in] server_name The server name to connect to
738 * @param[in] level The enumeration level used for the query
739 * @param[in] idx The index to start the the display enumeration at
740 * @param[in] entries_requested The number of entries requested
741 * @param[in] prefmaxlen The requested maximal buffer size
742 * @param[out] entries_read The number of returned entries
743 * @param[out] buffer The returned display information buffer
744 * @return NET_API_STATUS
746 * example user/user_dispinfo.c
747 ***************************************************************/
749 NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */,
750 uint32_t level /* [in] */,
751 uint32_t idx /* [in] */,
752 uint32_t entries_requested /* [in] */,
753 uint32_t prefmaxlen /* [in] */,
754 uint32_t *entries_read /* [out] [ref] */,
755 void **buffer /* [out] [noprint,ref] */);
757 /************************************************************//**
761 * @brief Create Domain Group
763 * @param[in] server_name The server name to connect to
764 * @param[in] level The level used for the new group creation
765 * @param[in] buf The buffer containing the group structure
766 * @param[out] parm_err The returned parameter error number if any
767 * @return NET_API_STATUS
769 * example group/group_add.c
770 ***************************************************************/
772 NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */,
773 uint32_t level /* [in] */,
774 uint8_t *buf /* [in] [ref] */,
775 uint32_t *parm_err /* [out] [ref] */);
777 /************************************************************//**
781 * @brief Delete Domain Group
783 * @param[in] server_name The server name to connect to
784 * @param[in] group_name The name of the group that is going to be deleted
785 * @return NET_API_STATUS
787 * example group/group_del.c
788 ***************************************************************/
790 NET_API_STATUS NetGroupDel(const char * server_name /* [in] */,
791 const char * group_name /* [in] */);
793 /************************************************************//**
797 * @brief Enumerate groups on a server
799 * @param[in] server_name The server name to connect to
800 * @param[in] level The enumeration level used for the query (Currently only
801 * level 0 is supported)
802 * @param[out] buffer The returned enumeration buffer
803 * @param[in] prefmaxlen The requested maximal buffer size
804 * @param[out] entries_read The number of returned entries
805 * @param[out] total_entries The number of total entries
806 * @param[in,out] resume_handle A handle passed in and returned for resuming
808 * @return NET_API_STATUS
810 * example group/group_enum.c
811 ***************************************************************/
813 NET_API_STATUS NetGroupEnum(const char * server_name /* [in] */,
814 uint32_t level /* [in] */,
815 uint8_t **buffer /* [out] [ref] */,
816 uint32_t prefmaxlen /* [in] */,
817 uint32_t *entries_read /* [out] [ref] */,
818 uint32_t *total_entries /* [out] [ref] */,
819 uint32_t *resume_handle /* [in,out] [ref] */);
821 /************************************************************//**
825 * @brief Set Domain Group Information
827 * @param[in] server_name The server name to connect to
828 * @param[in] group_name The name of the group that is going to be modified
829 * @param[in] level The level defining the structure type in buf
830 * @param[in] buf The buffer containing a GROUP_INFO_X structure
831 * @param[out] parm_err The returned parameter error number if any
832 * @return NET_API_STATUS
834 * example group/group_setinfo.c
835 ***************************************************************/
837 NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */,
838 const char * group_name /* [in] */,
839 uint32_t level /* [in] */,
840 uint8_t *buf /* [in] [ref] */,
841 uint32_t *parm_err /* [out] [ref] */);
843 /************************************************************//**
847 * @brief Get Domain Group Information
849 * @param[in] server_name The server name to connect to
850 * @param[in] group_name The name of the group that is going to be queried
851 * @param[in] level The level defining the requested GROUP_INFO_X structure
852 * @param[out] buf The buffer containing a GROUP_INFO_X structure
853 * @return NET_API_STATUS
855 * example group/group_getinfo.c
856 ***************************************************************/
858 NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */,
859 const char * group_name /* [in] */,
860 uint32_t level /* [in] */,
861 uint8_t **buf /* [out] [ref] */);
863 /************************************************************//**
867 * @brief Add existing User to existing Domain Group
869 * @param[in] server_name The server name to connect to
870 * @param[in] group_name The name of the group that is going to be modified
871 * @param[in] user_name The name of the user that is going to be added to the
873 * @return NET_API_STATUS
875 * example group/group_adduser.c
876 ***************************************************************/
878 NET_API_STATUS NetGroupAddUser(const char * server_name /* [in] */,
879 const char * group_name /* [in] */,
880 const char * user_name /* [in] */);
882 /************************************************************//**
886 * @brief Remove User from Domain Group
888 * @param[in] server_name The server name to connect to
889 * @param[in] group_name The name of the group that is going to be modified
890 * @param[in] user_name The name of the user that is going to be removed from
892 * @return NET_API_STATUS
894 * example group/group_deluser.c
895 ***************************************************************/
897 NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */,
898 const char * group_name /* [in] */,
899 const char * user_name /* [in] */);
901 /************************************************************//**
905 * @brief Create Local Group
907 * @param[in] server_name The server name to connect to
908 * @param[in] level The level used for the new group creation
909 * @param[in] buf The buffer containing the group structure
910 * @param[out] parm_err The returned parameter error number if any
911 * @return NET_API_STATUS
913 * example localgroup/localgroup_add.c
914 ***************************************************************/
916 NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
917 uint32_t level /* [in] */,
918 uint8_t *buf /* [in] [ref] */,
919 uint32_t *parm_err /* [out] [ref] */);
921 /************************************************************//**
925 * @brief Delete Local Group
927 * @param[in] server_name The server name to connect to
928 * @param[in] group_name The name of the group that is going to be deleted
929 * @return NET_API_STATUS
931 * example localgroup/localgroup_del.c
932 ***************************************************************/
935 NET_API_STATUS NetLocalGroupDel(const char * server_name /* [in] */,
936 const char * group_name /* [in] */);
938 /************************************************************//**
940 * NetLocalGroupGetInfo
942 * @brief Get Local Group Information
944 * @param[in] server_name The server name to connect to
945 * @param[in] group_name The name of the group that is going to be queried
946 * @param[in] level The level defining the requested LOCALGROUP_INFO_X structure
947 * @param[out] buf The buffer containing a LOCALGROUP_INFO_X structure
948 * @return NET_API_STATUS
950 * example localgroup/localgroup_getinfo.c
951 ***************************************************************/
953 NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */,
954 const char * group_name /* [in] */,
955 uint32_t level /* [in] */,
956 uint8_t **buf /* [out] [ref] */);
958 /************************************************************//**
960 * NetLocalGroupSetInfo
962 * @brief Set Local Group Information
964 * @param[in] server_name The server name to connect to
965 * @param[in] group_name The name of the group that is going to be modified
966 * @param[in] level The level defining the requested LOCALGROUP_INFO_X structure
967 * @param[in] buf The buffer containing a LOCALGROUP_INFO_X structure
968 * @param[out] parm_err The returned parameter error number if any
969 * @return NET_API_STATUS
971 * example localgroup/localgroup_setinfo.c
972 ***************************************************************/
975 NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
976 const char * group_name /* [in] */,
977 uint32_t level /* [in] */,
978 uint8_t *buf /* [in] [ref] */,
979 uint32_t *parm_err /* [out] [ref] */);
981 /************************************************************//**
985 * @brief Query remote Time of Day
987 * @param[in] server_name The server name to connect to
988 * @param[out] buf The buffer containing a TIME_OF_DAY_INFO structure
989 * @return NET_API_STATUS
991 * example server/remote_tod.c
992 ***************************************************************/
994 NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
995 uint8_t **buf /* [out] [ref] */);