netapi: add USER_PRIV_* constants to public header.
[mat/samba.git] / source3 / lib / netapi / netapi.h
1 /*
2  *  Unix SMB/CIFS implementation.
3  *  NetApi Support
4  *  Copyright (C) Guenther Deschner 2007-2008
5  *
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.
10  *
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.
15  *
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/>.
18  */
19
20 #ifndef __LIB_NETAPI_H__
21 #define __LIB_NETAPI_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26
27 /****************************************************************
28  NET_API_STATUS
29 ****************************************************************/
30 typedef enum {
31         NET_API_STATUS_SUCCESS = 0
32 } NET_API_STATUS;
33
34 #define ERROR_MORE_DATA ( 234L )
35
36 #define ENCRYPTED_PWLEN ( 16 )
37
38 /****************************************************************
39 ****************************************************************/
40
41 #ifndef _HEADER_misc
42
43 struct GUID {
44         uint32_t time_low;
45         uint16_t time_mid;
46         uint16_t time_hi_and_version;
47         uint8_t clock_seq[2];
48         uint8_t node[6];
49 };
50
51 #endif /* _HEADER_misc */
52
53 #ifndef _HEADER_libnetapi
54
55 #ifndef MAXSUBAUTHS
56 #define MAXSUBAUTHS 15 /* max sub authorities in a SID */
57 #endif
58
59 struct domsid {
60         uint8_t   sid_rev_num;
61         uint8_t   num_auths;
62         uint8_t   id_auth[6];
63         uint32_t  sub_auths[MAXSUBAUTHS];
64 };
65
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;
73         uint32_t flags;
74         const char * dc_site_name;
75         const char * client_site_name;
76 };
77
78 #define FILTER_TEMP_DUPLICATE_ACCOUNT   ( 0x0001 )
79 #define FILTER_NORMAL_ACCOUNT   ( 0x0002 )
80 #define FILTER_INTERDOMAIN_TRUST_ACCOUNT        ( 0x0008 )
81 #define FILTER_WORKSTATION_TRUST_ACCOUNT        ( 0x0010 )
82 #define FILTER_SERVER_TRUST_ACCOUNT     ( 0x0020 )
83
84 #define TIMEQ_FOREVER  ( (uint32_t)-1L )
85
86 struct SERVER_INFO_1005 {
87         const char * sv1005_comment;
88 };
89
90 struct USER_INFO_0 {
91         const char * usri0_name;
92 };
93
94 #define USER_PRIV_GUEST ( 0 )
95 #define USER_PRIV_USER  ( 1 )
96 #define USER_PRIV_ADMIN ( 2 )
97
98 struct USER_INFO_1 {
99         const char * usri1_name;
100         const char * usri1_password;
101         uint32_t usri1_password_age;
102         uint32_t usri1_priv;
103         const char * usri1_home_dir;
104         const char * usri1_comment;
105         uint32_t usri1_flags;
106         const char * usri1_script_path;
107 };
108
109 struct USER_INFO_2 {
110         const char * usri2_name;
111         const char * usri2_password;
112         uint32_t usri2_password_age;
113         uint32_t usri2_priv;
114         const char * usri2_home_dir;
115         const char * usri2_comment;
116         uint32_t usri2_flags;
117         const char * usri2_script_path;
118         uint32_t usri2_auth_flags;
119         const char * usri2_full_name;
120         const char * usri2_usr_comment;
121         const char * usri2_parms;
122         const char * usri2_workstations;
123         uint32_t usri2_last_logon;
124         uint32_t usri2_last_logoff;
125         uint32_t usri2_acct_expires;
126         uint32_t usri2_max_storage;
127         uint32_t usri2_units_per_week;
128         uint8_t *usri2_logon_hours;/* [unique] */
129         uint32_t usri2_bad_pw_count;
130         uint32_t usri2_num_logons;
131         const char * usri2_logon_server;
132         uint32_t usri2_country_code;
133         uint32_t usri2_code_page;
134 };
135
136 struct USER_INFO_3 {
137         const char * usri3_name;
138         uint32_t usri3_password_age;
139         uint32_t usri3_priv;
140         const char * usri3_home_dir;
141         const char * usri3_comment;
142         uint32_t usri3_flags;
143         const char * usri3_script_path;
144         uint32_t usri3_auth_flags;
145         const char * usri3_full_name;
146         const char * usri3_usr_comment;
147         const char * usri3_parms;
148         const char * usri3_workstations;
149         uint32_t usri3_last_logon;
150         uint32_t usri3_last_logoff;
151         uint32_t usri3_acct_expires;
152         uint32_t usri3_max_storage;
153         uint32_t usri3_units_per_week;
154         uint8_t *usri3_logon_hours;/* [unique] */
155         uint32_t usri3_bad_pw_count;
156         uint32_t usri3_num_logons;
157         const char * usri3_logon_server;
158         uint32_t usri3_country_code;
159         uint32_t usri3_code_page;
160         uint32_t usri3_user_id;
161         uint32_t usri3_primary_group_id;
162         const char * usri3_profile;
163         const char * usri3_home_dir_drive;
164         uint32_t usri3_password_expired;
165 };
166
167 struct USER_INFO_4 {
168         const char * usri4_name;
169         const char * usri4_password;
170         uint32_t usri4_password_age;
171         uint32_t usri4_priv;
172         const char * usri4_home_dir;
173         const char * usri4_comment;
174         uint32_t usri4_flags;
175         const char * usri4_script_path;
176         uint32_t usri4_auth_flags;
177         const char * usri4_full_name;
178         const char * usri4_usr_comment;
179         const char * usri4_parms;
180         const char * usri4_workstations;
181         uint32_t usri4_last_logon;
182         uint32_t usri4_last_logoff;
183         uint32_t usri4_acct_expires;
184         uint32_t usri4_max_storage;
185         uint32_t usri4_units_per_week;
186         uint8_t *usri4_logon_hours;/* [unique] */
187         uint32_t usri4_bad_pw_count;
188         uint32_t usri4_num_logons;
189         const char * usri4_logon_server;
190         uint32_t usri4_country_code;
191         uint32_t usri4_code_page;
192         struct domsid *usri4_user_sid;/* [unique] */
193         uint32_t usri4_primary_group_id;
194         const char * usri4_profile;
195         const char * usri4_home_dir_drive;
196         uint32_t usri4_password_expired;
197 };
198
199 struct USER_INFO_10 {
200         const char * usri10_name;
201         const char * usri10_comment;
202         const char * usri10_usr_comment;
203         const char * usri10_full_name;
204 };
205
206 struct USER_INFO_11 {
207         const char * usri11_name;
208         const char * usri11_comment;
209         const char * usri11_usr_comment;
210         const char * usri11_full_name;
211         uint32_t usri11_priv;
212         uint32_t usri11_auth_flags;
213         uint32_t usri11_password_age;
214         const char * usri11_home_dir;
215         const char * usri11_parms;
216         uint32_t usri11_last_logon;
217         uint32_t usri11_last_logoff;
218         uint32_t usri11_bad_pw_count;
219         uint32_t usri11_num_logons;
220         const char * usri11_logon_server;
221         uint32_t usri11_country_code;
222         const char * usri11_workstations;
223         uint32_t usri11_max_storage;
224         uint32_t usri11_units_per_week;
225         uint8_t *usri11_logon_hours;/* [unique] */
226         uint32_t usri11_code_page;
227 };
228
229 struct USER_INFO_20 {
230         const char * usri20_name;
231         const char * usri20_full_name;
232         const char * usri20_comment;
233         uint32_t usri20_flags;
234         uint32_t usri20_user_id;
235 };
236
237 struct USER_INFO_21 {
238         uint8_t *usri21_password;
239 };
240
241 struct USER_INFO_22 {
242         const char * usri22_name;
243         uint8_t *usri22_password;
244         uint32_t usri22_password_age;
245         uint32_t usri22_priv;
246         const char * usri22_home_dir;
247         const char * usri22_comment;
248         uint32_t usri22_flags;
249         uint32_t usri22_script_path;
250         uint32_t usri22_auth_flags;
251         const char * usri22_full_name;
252         const char * usri22_usr_comment;
253         const char * usri22_parms;
254         const char * usri22_workstations;
255         uint32_t usri22_last_logon;
256         uint32_t usri22_last_logoff;
257         uint32_t usri22_acct_expires;
258         uint32_t usri22_max_storage;
259         uint32_t usri22_units_per_week;
260         uint8_t *usri22_logon_hours;/* [unique] */
261         uint32_t usri22_bad_pw_count;
262         uint32_t usri22_num_logons;
263         const char * usri22_logon_server;
264         uint32_t usri22_country_code;
265         uint32_t usri22_code_page;
266 };
267
268 struct USER_INFO_23 {
269         const char * usri23_name;
270         const char * usri23_full_name;
271         const char * usri23_comment;
272         uint32_t usri23_flags;
273         struct domsid *usri23_user_sid;/* [unique] */
274 };
275
276 struct USER_INFO_1003 {
277         const char * usri1003_password;
278 };
279
280 struct USER_INFO_1005 {
281         uint32_t usri1005_priv;
282 };
283
284 struct USER_INFO_1006 {
285         const char * usri1006_home_dir;
286 };
287
288 struct USER_INFO_1007 {
289         const char * usri1007_comment;
290 };
291
292 struct USER_INFO_1008 {
293         uint32_t usri1008_flags;
294 };
295
296 struct USER_INFO_1009 {
297         const char * usri1009_script_path;
298 };
299
300 struct USER_INFO_1010 {
301         uint32_t usri1010_auth_flags;
302 };
303
304 struct USER_INFO_1011 {
305         const char * usri1011_full_name;
306 };
307
308 struct USER_INFO_1012 {
309         const char * usri1012_usr_comment;
310 };
311
312 struct USER_INFO_1013 {
313         const char * usri1013_parms;
314 };
315
316 struct USER_INFO_1014 {
317         const char * usri1014_workstations;
318 };
319
320 struct USER_INFO_1017 {
321         uint32_t usri1017_acct_expires;
322 };
323
324 struct USER_INFO_1018 {
325         uint32_t usri1018_max_storage;
326 };
327
328 struct USER_INFO_1020 {
329         uint32_t usri1020_units_per_week;
330         uint8_t *usri1020_logon_hours;/* [unique] */
331 };
332
333 struct USER_INFO_1023 {
334         const char * usri1023_logon_server;
335 };
336
337 struct USER_INFO_1024 {
338         uint32_t usri1024_country_code;
339 };
340
341 struct USER_INFO_1025 {
342         uint32_t usri1025_code_page;
343 };
344
345 struct USER_INFO_1051 {
346         uint32_t usri1051_primary_group_id;
347 };
348
349 struct USER_INFO_1052 {
350         const char * usri1052_profile;
351 };
352
353 struct USER_INFO_1053 {
354         const char * usri1053_home_dir_drive;
355 };
356
357 struct USER_MODALS_INFO_0 {
358         uint32_t usrmod0_min_passwd_len;
359         uint32_t usrmod0_max_passwd_age;
360         uint32_t usrmod0_min_passwd_age;
361         uint32_t usrmod0_force_logoff;
362         uint32_t usrmod0_password_hist_len;
363 };
364
365 struct USER_MODALS_INFO_1 {
366         uint32_t usrmod1_role;
367         const char * usrmod1_primary;
368 };
369
370 struct USER_MODALS_INFO_2 {
371         const char * usrmod2_domain_name;
372         struct domsid *usrmod2_domain_id;/* [unique] */
373 };
374
375 struct USER_MODALS_INFO_3 {
376         uint32_t usrmod3_lockout_duration;
377         uint32_t usrmod3_lockout_observation_window;
378         uint32_t usrmod3_lockout_threshold;
379 };
380
381 struct USER_MODALS_INFO_1001 {
382         uint32_t usrmod1001_min_passwd_len;
383 };
384
385 struct USER_MODALS_INFO_1002 {
386         uint32_t usrmod1002_max_passwd_age;
387 };
388
389 struct USER_MODALS_INFO_1003 {
390         uint32_t usrmod1003_min_passwd_age;
391 };
392
393 struct USER_MODALS_INFO_1004 {
394         uint32_t usrmod1004_force_logoff;
395 };
396
397 struct USER_MODALS_INFO_1005 {
398         uint32_t usrmod1005_password_hist_len;
399 };
400
401 struct USER_MODALS_INFO_1006 {
402         uint32_t usrmod1006_role;
403 };
404
405 struct USER_MODALS_INFO_1007 {
406         const char * usrmod1007_primary;
407 };
408
409 struct NET_DISPLAY_USER {
410         const char * usri1_name;
411         const char * usri1_comment;
412         uint32_t usri1_flags;
413         const char * usri1_full_name;
414         uint32_t usri1_user_id;
415         uint32_t usri1_next_index;
416 };
417
418 struct NET_DISPLAY_MACHINE {
419         const char * usri2_name;
420         const char * usri2_comment;
421         uint32_t usri2_flags;
422         uint32_t usri2_user_id;
423         uint32_t usri2_next_index;
424 };
425
426 struct NET_DISPLAY_GROUP {
427         const char * grpi3_name;
428         const char * grpi3_comment;
429         uint32_t grpi3_group_id;
430         uint32_t grpi3_attributes;
431         uint32_t grpi3_next_index;
432 };
433
434 struct GROUP_INFO_0 {
435         const char * grpi0_name;
436 };
437
438 struct GROUP_INFO_1 {
439         const char * grpi1_name;
440         const char * grpi1_comment;
441 };
442
443 struct GROUP_INFO_2 {
444         const char * grpi2_name;
445         const char * grpi2_comment;
446         uint32_t grpi2_group_id;
447         uint32_t grpi2_attributes;
448 };
449
450 struct GROUP_INFO_3 {
451         const char * grpi3_name;
452         const char * grpi3_comment;
453         struct domsid * grpi3_group_sid;
454         uint32_t grpi3_attributes;
455 };
456
457 struct GROUP_INFO_1002 {
458         const char * grpi1002_comment;
459 };
460
461 struct GROUP_INFO_1005 {
462         uint32_t grpi1005_attributes;
463 };
464
465 struct GROUP_USERS_INFO_0 {
466         const char * grui0_name;
467 };
468
469 struct GROUP_USERS_INFO_1 {
470         const char * grui1_name;
471         uint32_t grui1_attributes;
472 };
473
474 struct LOCALGROUP_INFO_0 {
475         const char * lgrpi0_name;
476 };
477
478 struct LOCALGROUP_INFO_1 {
479         const char * lgrpi1_name;
480         const char * lgrpi1_comment;
481 };
482
483 struct LOCALGROUP_INFO_1002 {
484         const char * lgrpi1002_comment;
485 };
486
487 enum SID_NAME_USE {
488         SidTypeUser=1,
489         SidTypeGroup=2,
490         SidTypeDomain=3,
491         SidTypeAlias=4,
492         SidTypeWellKnownGroup=5,
493         SidTypeDeletedAccount=6,
494         SidTypeInvalid=7,
495         SidTypeUnknown=8,
496         SidTypeComputer=9,
497         SidTypeLabel=10
498 };
499
500 struct LOCALGROUP_MEMBERS_INFO_0 {
501         struct domsid *lgrmi0_sid;/* [unique] */
502 };
503
504 struct LOCALGROUP_MEMBERS_INFO_1 {
505         struct domsid *lgrmi1_sid;/* [unique] */
506         enum SID_NAME_USE lgrmi1_sidusage;
507         const char * lgrmi1_name;
508 };
509
510 struct LOCALGROUP_MEMBERS_INFO_2 {
511         struct domsid *lgrmi2_sid;/* [unique] */
512         enum SID_NAME_USE lgrmi2_sidusage;
513         const char * lgrmi2_domainandname;
514 };
515
516 struct LOCALGROUP_MEMBERS_INFO_3 {
517         const char * lgrmi3_domainandname;
518 };
519
520 struct TIME_OF_DAY_INFO {
521         uint32_t tod_elapsedt;
522         uint32_t tod_msecs;
523         uint32_t tod_hours;
524         uint32_t tod_mins;
525         uint32_t tod_secs;
526         uint32_t tod_hunds;
527         int32_t tod_timezone;
528         uint32_t tod_tinterval;
529         uint32_t tod_day;
530         uint32_t tod_month;
531         uint32_t tod_year;
532         uint32_t tod_weekday;
533 };
534
535 #endif /* _HEADER_libnetapi */
536
537 /****************************************************************
538 ****************************************************************/
539
540 struct libnetapi_ctx {
541         char *debuglevel;
542         char *error_string;
543         char *username;
544         char *workgroup;
545         char *password;
546         char *krb5_cc_env;
547         int use_kerberos;
548         int disable_policy_handle_cache;
549
550         void *private_data;
551 };
552
553 /****************************************************************
554 ****************************************************************/
555
556 NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx);
557
558 /****************************************************************
559 ****************************************************************/
560
561 NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx);
562
563 /****************************************************************
564 ****************************************************************/
565
566 NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx);
567
568 /****************************************************************
569 ****************************************************************/
570
571 NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx,
572                                         const char *debuglevel);
573
574 /****************************************************************
575 ****************************************************************/
576
577 NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx,
578                                       const char *username);
579
580 /****************************************************************
581 ****************************************************************/
582
583 NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx,
584                                       const char *password);
585
586 /****************************************************************
587 ****************************************************************/
588
589 NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx,
590                                        const char *workgroup);
591
592 /****************************************************************
593 ****************************************************************/
594
595 NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx);
596
597 /****************************************************************
598 ****************************************************************/
599
600 const char *libnetapi_errstr(NET_API_STATUS status);
601
602 /****************************************************************
603 ****************************************************************/
604
605 const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx,
606                                        NET_API_STATUS status);
607
608 /****************************************************************
609  NetApiBufferAllocate
610 ****************************************************************/
611
612 NET_API_STATUS NetApiBufferAllocate(uint32_t byte_count,
613                                     void **buffer);
614
615 /****************************************************************
616  NetApiBufferFree
617 ****************************************************************/
618
619 NET_API_STATUS NetApiBufferFree(void *buffer);
620
621 /************************************************************//**
622  *
623  * ConvertSidToStringSid
624  *
625  * @brief Convert a domain sid into a string
626  *
627  * @param[in] sid A pointer to a sid structure
628  * @param[in,out] sid_string A pointer that holds a pointer to a sid string. Caller
629  * needs to free with free(3)
630  * @return bool
631  ***************************************************************/
632
633 int  ConvertSidToStringSid(const struct domsid *sid,
634                            char **sid_string);
635
636 /************************************************************//**
637  *
638  * ConvertStringSidToSid
639  *
640  * @brief Convert a string into a domain sid
641  *
642  * @param[in] sid_string A pointer to a sid string.
643  * @param[in,out] sid A pointer that holds a pointer to a sid structure.
644  * Caller needs to free with free(3)
645  * @return bool
646  ***************************************************************/
647
648 int ConvertStringSidToSid(const char *sid_string,
649                           struct domsid **sid);
650
651 /************************************************************//**
652  *
653  * NetJoinDomain
654  *
655  * @brief Join a computer to a domain or workgroup
656  *
657  * @param[in] server The server name to connect to
658  * @param[in] domain The domain or workgroup to join
659  * @param[in] account_ou The organizational Unit to create the computer account
660  * in (AD only)
661  * @param[in] account The domain account used for joining a domain
662  * @param[in] password The domain account's password used for joining a domain
663  * @param[in] join_flags Bitmask field to define specific join features
664  * @return NET_API_STATUS
665  *
666  * example netdomjoin/netdomjoin.c
667  ***************************************************************/
668
669 NET_API_STATUS NetJoinDomain(const char * server /* [in] */,
670                              const char * domain /* [in] [ref] */,
671                              const char * account_ou /* [in] */,
672                              const char * account /* [in] */,
673                              const char * password /* [in] */,
674                              uint32_t join_flags /* [in] */);
675
676 /************************************************************//**
677  *
678  * NetUnjoinDomain
679  *
680  * @brief Unjoin a computer from a domain or workgroup
681  *
682  * @param[in] server_name The server name to connect to
683  * @param[in] account The domain account used for unjoining a domain
684  * @param[in] password The domain account's password used for unjoining a domain
685  * @param[in] unjoin_flags Bitmask field to define specific unjoin features
686  * @return NET_API_STATUS
687  *
688  ***************************************************************/
689
690 NET_API_STATUS NetUnjoinDomain(const char * server_name /* [in] */,
691                                const char * account /* [in] */,
692                                const char * password /* [in] */,
693                                uint32_t unjoin_flags /* [in] */);
694
695 /************************************************************//**
696  *
697  * NetGetJoinInformation
698  *
699  * @brief Unjoin a computer from a domain or workgroup
700  *
701  * @param[in] server_name The server name to connect to
702  * @param[out] name_buffer Returns the name of the workgroup or domain
703  * @param[out] name_type  Returns the type of that name
704  * @return NET_API_STATUS
705  *
706  * example netdomjoin-gui/netdomjoin-gui.c
707  *
708  ***************************************************************/
709
710 NET_API_STATUS NetGetJoinInformation(const char * server_name /* [in] */,
711                                      const char * *name_buffer /* [out] [ref] */,
712                                      uint16_t *name_type /* [out] [ref] */);
713
714 /************************************************************//**
715  *
716  * NetGetJoinableOUs
717  *
718  * @brief Query for the list of joinable organizational Units that can be used
719  * for joining AD
720  *
721  * @param[in] server_name The server name to connect to
722  * @param[in] domain The AD domain to query
723  * @param[in] account The domain account used for the query
724  * @param[in] password The domain account's password used for the query
725  * @param[out] ou_count The number of ous returned
726  * @param[out] ous Returned string array containing the ous
727  * @return NET_API_STATUS
728  *
729  * example netdomjoin-gui/netdomjoin-gui.c
730  *
731  ***************************************************************/
732
733 NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] */,
734                                  const char * domain /* [in] [ref] */,
735                                  const char * account /* [in] */,
736                                  const char * password /* [in] */,
737                                  uint32_t *ou_count /* [out] [ref] */,
738                                  const char * **ous /* [out] [ref] */);
739
740 /************************************************************//**
741  *
742  * NetServerGetInfo
743  *
744  * @brief Get Information on a server
745  *
746  * @param[in] server_name The server name to connect to
747  * @param[in] level The level to define which information is requested
748  * @param[out] buffer The returned buffer carrying the SERVER_INFO structure
749  * @return NET_API_STATUS
750  *
751  ***************************************************************/
752
753 NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] */,
754                                 uint32_t level /* [in] */,
755                                 uint8_t **buffer /* [out] [ref] */);
756
757 /************************************************************//**
758  *
759  * NetServerSetInfo
760  *
761  * @brief Get Information on a server
762  *
763  * @param[in] server_name The server name to connect to
764  * @param[in] level The level to define which information is set
765  * @param[in] buffer The buffer carrying the SERVER_INFO structure
766  * @param[out] parm_error On failure returns the invalid SERVER_INFO member
767  * @return NET_API_STATUS
768  *
769  ***************************************************************/
770
771 NET_API_STATUS NetServerSetInfo(const char * server_name /* [in] */,
772                                 uint32_t level /* [in] */,
773                                 uint8_t *buffer /* [in] [ref] */,
774                                 uint32_t *parm_error /* [out] [ref] */);
775
776 /************************************************************//**
777  *
778  * NetGetDCName
779  *
780  * @brief Query for the PDC for a given domain
781  *
782  * @param[in] server_name The server name to connect to
783  * @param[in] domain_name The name of the domain to lookup
784  * @param[out] buffer The name of the domain to lookup
785  * @return NET_API_STATUS
786  *
787  * example getdc/getdc.c
788  ***************************************************************/
789
790 NET_API_STATUS NetGetDCName(const char * server_name /* [in] */,
791                             const char * domain_name /* [in] */,
792                             uint8_t **buffer /* [out] [ref] */);
793
794 /************************************************************//**
795  *
796  * NetGetAnyDCName
797  *
798  * @brief Query for any DC for a given domain
799  *
800  * @param[in] server_name The server name to connect to
801  * @param[in] domain_name The name of the domain to lookup
802  * @param[out] buffer The name of the domain to lookup
803  * @return NET_API_STATUS
804  *
805  * example getdc/getdc.c
806  ***************************************************************/
807
808 NET_API_STATUS NetGetAnyDCName(const char * server_name /* [in] */,
809                                const char * domain_name /* [in] */,
810                                uint8_t **buffer /* [out] [ref] */);
811
812
813 /************************************************************//**
814  *
815  * DsGetDcName
816  *
817  * @brief Lookup a DC for a given domain and return information structure
818  *
819  * @param[in] server_name The server name to connect to
820  * @param[in] domain_name The name of the domain to lookup (cannot be NULL)
821  * @param[in] domain_guid The GUID of the domain to lookup (optional)
822  * @param[in] site_name The name of the site the DC should reside in
823  * @param[in] flags A bitmask to request specific features supported by the DC
824  * @param[out] dc_info Pointer to a DOMAIN_CONTROLLER_INFO structure
825  * @return NET_API_STATUS
826  *
827  * example dsgetdc/dsgetdc.c
828  ***************************************************************/
829
830 NET_API_STATUS DsGetDcName(const char * server_name /* [in] [unique] */,
831                            const char * domain_name /* [in] [ref] */,
832                            struct GUID *domain_guid /* [in] [unique] */,
833                            const char * site_name /* [in] [unique] */,
834                            uint32_t flags /* [in] */,
835                            struct DOMAIN_CONTROLLER_INFO **dc_info /* [out] [ref] */);
836
837 /************************************************************//**
838  *
839  * NetUserAdd
840  *
841  * @brief Create a user on a given server
842  *
843  * @param[in] server_name The server name to connect to
844  * @param[in] level The level of the USER_INFO structure passed in (Currently
845  * only level 1 is supported)
846  * @param[in] buffer The buffer carrying the USER_INFO structure
847  * @param[out] parm_error In case of error returns the failing member of the
848  * structure
849  * @return NET_API_STATUS
850  *
851  * example user/user_add.c
852  ***************************************************************/
853
854 NET_API_STATUS NetUserAdd(const char * server_name /* [in] */,
855                           uint32_t level /* [in] */,
856                           uint8_t *buffer /* [in] [ref] */,
857                           uint32_t *parm_error /* [out] [ref] */);
858
859 /************************************************************//**
860  *
861  * NetUserDel
862  *
863  * @brief Delete a user on a given server
864  *
865  * @param[in] server_name The server name to connect to
866  * @param[in] user_name The user account to delete
867  * @return NET_API_STATUS
868  *
869  * example user/user_del.c
870  ***************************************************************/
871
872 NET_API_STATUS NetUserDel(const char * server_name /* [in] */,
873                           const char * user_name /* [in] */);
874
875 /************************************************************//**
876  *
877  * NetUserEnum
878  *
879  * @brief Enumerate accounts on a server
880  *
881  * @param[in] server_name The server name to connect to
882  * @param[in] level The enumeration level used for the query (Currently only
883  * level 0 is supported)
884  * @param[in] filter The account flags filter used for the query
885  * @param[out] buffer The returned enumeration buffer
886  * @param[in] prefmaxlen The requested maximal buffer size
887  * @param[out] entries_read The number of returned entries
888  * @param[out] total_entries The number of total entries
889  * @param[in,out] resume_handle A handle passed in and returned for resuming
890  * operations
891  * @return NET_API_STATUS
892  *
893  * example user/user_enum.c
894  ***************************************************************/
895
896 NET_API_STATUS NetUserEnum(const char * server_name /* [in] */,
897                            uint32_t level /* [in] */,
898                            uint32_t filter /* [in] */,
899                            uint8_t **buffer /* [out] [ref] */,
900                            uint32_t prefmaxlen /* [in] */,
901                            uint32_t *entries_read /* [out] [ref] */,
902                            uint32_t *total_entries /* [out] [ref] */,
903                            uint32_t *resume_handle /* [in,out] [ref] */);
904
905 /************************************************************//**
906  *
907  * NetUserChangePassword
908  *
909  * @brief Change the password for a user on a given server or in a given domain
910  *
911  * @param[in] domain_name The server or domain name to connect to
912  * @param[in] user_name The user account to change the password for
913  * @param[in] old_password The user account's old password
914  * @param[in] new_password The user account's new password
915  * @return NET_API_STATUS
916  *
917  * example user/user_chgpwd.c
918  ***************************************************************/
919
920 NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */,
921                                      const char * user_name /* [in] */,
922                                      const char * old_password /* [in] */,
923                                      const char * new_password /* [in] */);
924
925 /************************************************************//**
926  *
927  * NetUserGetInfo
928  *
929  * @brief Get User Information
930  *
931  * @param[in] server_name The server name to connect to
932  * @param[in] user_name The name of the user that is going to be queried
933  * @param[in] level The level defining the requested USER_INFO_X structure
934  * @param[out] buffer The buffer containing a USER_INFO_X structure
935  * @return NET_API_STATUS
936  *
937  * example user/user_getinfo.c
938  ***************************************************************/
939
940 NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */,
941                               const char * user_name /* [in] */,
942                               uint32_t level /* [in] */,
943                               uint8_t **buffer /* [out] [ref] */);
944
945 /************************************************************//**
946  *
947  * NetUserSetInfo
948  *
949  * @brief Set User Information
950  *
951  * @param[in] server_name The server name to connect to
952  * @param[in] user_name The name of the user that is going to be modified
953  * @param[in] level The level defining the requested USER_INFO_X structure
954  * @param[in] buffer The buffer containing a USER_INFO_X structure
955  * @param[out] parm_err The returned parameter error number if any
956  * @return NET_API_STATUS
957  *
958  * example user/user_setinfo.c
959  ***************************************************************/
960
961 NET_API_STATUS NetUserSetInfo(const char * server_name /* [in] */,
962                               const char * user_name /* [in] */,
963                               uint32_t level /* [in] */,
964                               uint8_t *buffer /* [in] [ref] */,
965                               uint32_t *parm_err /* [out] [ref] */);
966
967 /************************************************************//**
968  *
969  * NetUserModalsGet
970  *
971  * @brief Get SAM domain and password information
972  *
973  * @param[in] server_name The server name to connect to
974  * @param[in] level The level defining which USER_MODALS_INFO_X buffer to query
975  * @param[out] buffer The returned USER_MODALS_INFO_X buffer
976  * @return NET_API_STATUS
977  *
978  * example user/user_modalsget.c
979  ***************************************************************/
980
981 NET_API_STATUS NetUserModalsGet(const char * server_name /* [in] */,
982                                 uint32_t level /* [in] */,
983                                 uint8_t **buffer /* [out] [ref] */);
984
985 /************************************************************//**
986  *
987  * NetUserModalsSet
988  *
989  * @brief Set SAM domain and password information
990  *
991  * @param[in] server_name The server name to connect to
992  * @param[in] level The level defining which USER_MODALS_INFO_X buffer to query
993  * @param[out] buffer The buffer conntaing a USER_MODALS_INFO_X structure
994  * @param[out] parm_err The returned parameter error number if any
995  * @return NET_API_STATUS
996  *
997  * example user/user_modalsset.c
998  ***************************************************************/
999
1000 NET_API_STATUS NetUserModalsSet(const char * server_name /* [in] */,
1001                                 uint32_t level /* [in] */,
1002                                 uint8_t *buffer /* [in] [ref] */,
1003                                 uint32_t *parm_err /* [out] [ref] */);
1004
1005 /************************************************************//**
1006  *
1007  * NetUserGetGroups
1008  *
1009  * @brief Enumerate grouplist of a user on a server
1010  *
1011  * @param[in] server_name The server name to connect to
1012  * @param[in] user_name The user name to query
1013  * @param[in] level The enumeration level used for the query (Currently only
1014  * level 0 is supported)
1015  * @param[out] buffer The returned enumeration buffer
1016  * @param[in] prefmaxlen The requested maximal buffer size
1017  * @param[out] entries_read The number of returned entries
1018  * @param[out] total_entries The number of total entries
1019  * @return NET_API_STATUS
1020  *
1021  * example user/user_getgroups.c
1022  ***************************************************************/
1023
1024 NET_API_STATUS NetUserGetGroups(const char * server_name /* [in] */,
1025                                 const char * user_name /* [in] */,
1026                                 uint32_t level /* [in] */,
1027                                 uint8_t **buffer /* [out] [ref] */,
1028                                 uint32_t prefmaxlen /* [in] */,
1029                                 uint32_t *entries_read /* [out] [ref] */,
1030                                 uint32_t *total_entries /* [out] [ref] */);
1031
1032 /************************************************************//**
1033  *
1034  * NetQueryDisplayInformation
1035  *
1036  * @brief Enumerate accounts on a server
1037  *
1038  * @param[in] server_name The server name to connect to
1039  * @param[in] level The enumeration level used for the query
1040  * @param[in] idx The index to start the the display enumeration at
1041  * @param[in] entries_requested The number of entries requested
1042  * @param[in] prefmaxlen The requested maximal buffer size
1043  * @param[out] entries_read The number of returned entries
1044  * @param[out] buffer The returned display information buffer
1045  * @return NET_API_STATUS
1046  *
1047  * example user/user_dispinfo.c
1048  ***************************************************************/
1049
1050 NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */,
1051                                           uint32_t level /* [in] */,
1052                                           uint32_t idx /* [in] */,
1053                                           uint32_t entries_requested /* [in] */,
1054                                           uint32_t prefmaxlen /* [in] */,
1055                                           uint32_t *entries_read /* [out] [ref] */,
1056                                           void **buffer /* [out] [noprint,ref] */);
1057
1058 /************************************************************//**
1059  *
1060  * NetGroupAdd
1061  *
1062  * @brief Create Domain Group
1063  *
1064  * @param[in] server_name The server name to connect to
1065  * @param[in] level The level used for the new group creation
1066  * @param[in] buf The buffer containing the group structure
1067  * @param[out] parm_err The returned parameter error number if any
1068  * @return NET_API_STATUS
1069  *
1070  * example group/group_add.c
1071  ***************************************************************/
1072
1073 NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */,
1074                            uint32_t level /* [in] */,
1075                            uint8_t *buf /* [in] [ref] */,
1076                            uint32_t *parm_err /* [out] [ref] */);
1077
1078 /************************************************************//**
1079  *
1080  * NetGroupDel
1081  *
1082  * @brief Delete Domain Group
1083  *
1084  * @param[in] server_name The server name to connect to
1085  * @param[in] group_name The name of the group that is going to be deleted
1086  * @return NET_API_STATUS
1087  *
1088  * example group/group_del.c
1089  ***************************************************************/
1090
1091 NET_API_STATUS NetGroupDel(const char * server_name /* [in] */,
1092                            const char * group_name /* [in] */);
1093
1094 /************************************************************//**
1095  *
1096  * NetGroupEnum
1097  *
1098  * @brief Enumerate groups on a server
1099  *
1100  * @param[in] server_name The server name to connect to
1101  * @param[in] level The enumeration level used for the query (Currently only
1102  * level 0 is supported)
1103  * @param[out] buffer The returned enumeration buffer
1104  * @param[in] prefmaxlen The requested maximal buffer size
1105  * @param[out] entries_read The number of returned entries
1106  * @param[out] total_entries The number of total entries
1107  * @param[in,out] resume_handle A handle passed in and returned for resuming
1108  * operations
1109  * @return NET_API_STATUS
1110  *
1111  * example group/group_enum.c
1112  ***************************************************************/
1113
1114 NET_API_STATUS NetGroupEnum(const char * server_name /* [in] */,
1115                             uint32_t level /* [in] */,
1116                             uint8_t **buffer /* [out] [ref] */,
1117                             uint32_t prefmaxlen /* [in] */,
1118                             uint32_t *entries_read /* [out] [ref] */,
1119                             uint32_t *total_entries /* [out] [ref] */,
1120                             uint32_t *resume_handle /* [in,out] [ref] */);
1121
1122 /************************************************************//**
1123  *
1124  * NetGroupSetInfo
1125  *
1126  * @brief Set Domain Group Information
1127  *
1128  * @param[in] server_name The server name to connect to
1129  * @param[in] group_name The name of the group that is going to be modified
1130  * @param[in] level The level defining the structure type in buf
1131  * @param[in] buf The buffer containing a GROUP_INFO_X structure
1132  * @param[out] parm_err The returned parameter error number if any
1133  * @return NET_API_STATUS
1134  *
1135  * example group/group_setinfo.c
1136  ***************************************************************/
1137
1138 NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */,
1139                                const char * group_name /* [in] */,
1140                                uint32_t level /* [in] */,
1141                                uint8_t *buf /* [in] [ref] */,
1142                                uint32_t *parm_err /* [out] [ref] */);
1143
1144 /************************************************************//**
1145  *
1146  * NetGroupGetInfo
1147  *
1148  * @brief Get Domain Group Information
1149  *
1150  * @param[in] server_name The server name to connect to
1151  * @param[in] group_name The name of the group that is going to be queried
1152  * @param[in] level The level defining the requested GROUP_INFO_X structure
1153  * @param[out] buf The buffer containing a GROUP_INFO_X structure
1154  * @return NET_API_STATUS
1155  *
1156  * example group/group_getinfo.c
1157  ***************************************************************/
1158
1159 NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */,
1160                                const char * group_name /* [in] */,
1161                                uint32_t level /* [in] */,
1162                                uint8_t **buf /* [out] [ref] */);
1163
1164 /************************************************************//**
1165  *
1166  * NetGroupAddUser
1167  *
1168  * @brief Add existing User to existing Domain Group
1169  *
1170  * @param[in] server_name The server name to connect to
1171  * @param[in] group_name The name of the group that is going to be modified
1172  * @param[in] user_name The name of the user that is going to be added to the
1173  * group
1174  * @return NET_API_STATUS
1175  *
1176  * example group/group_adduser.c
1177  ***************************************************************/
1178
1179 NET_API_STATUS NetGroupAddUser(const char * server_name /* [in] */,
1180                                const char * group_name /* [in] */,
1181                                const char * user_name /* [in] */);
1182
1183 /************************************************************//**
1184  *
1185  * NetGroupDelUser
1186  *
1187  * @brief Remove User from Domain Group
1188  *
1189  * @param[in] server_name The server name to connect to
1190  * @param[in] group_name The name of the group that is going to be modified
1191  * @param[in] user_name The name of the user that is going to be removed from
1192  * the group
1193  * @return NET_API_STATUS
1194  *
1195  * example group/group_deluser.c
1196  ***************************************************************/
1197
1198 NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */,
1199                                const char * group_name /* [in] */,
1200                                const char * user_name /* [in] */);
1201
1202 /************************************************************//**
1203  *
1204  * NetGroupGetUsers
1205  *
1206  * @brief Get Users for a group on a server
1207  *
1208  * @param[in] server_name The server name to connect to
1209  * @param[in] group_name The group name to enumerate users for
1210  * @param[in] level The enumeration level used for the query
1211  * @param[out] buffer The returned enumeration buffer
1212  * @param[in] prefmaxlen The requested maximal buffer size
1213  * @param[out] entries_read The number of returned entries
1214  * @param[out] total_entries The number of total entries
1215  * @param[in,out] resume_handle A handle passed in and returned for resuming
1216  * operations
1217  * @return NET_API_STATUS
1218  *
1219  * example group/group_getusers.c
1220  ***************************************************************/
1221
1222 NET_API_STATUS NetGroupGetUsers(const char * server_name /* [in] */,
1223                                 const char * group_name /* [in] */,
1224                                 uint32_t level /* [in] */,
1225                                 uint8_t **buffer /* [out] [ref] */,
1226                                 uint32_t prefmaxlen /* [in] */,
1227                                 uint32_t *entries_read /* [out] [ref] */,
1228                                 uint32_t *total_entries /* [out] [ref] */,
1229                                 uint32_t *resume_handle /* [in,out] [ref] */);
1230
1231 /************************************************************//**
1232  *
1233  * NetLocalGroupAdd
1234  *
1235  * @brief Create Local Group
1236  *
1237  * @param[in] server_name The server name to connect to
1238  * @param[in] level The level used for the new group creation
1239  * @param[in] buf The buffer containing the group structure
1240  * @param[out] parm_err The returned parameter error number if any
1241  * @return NET_API_STATUS
1242  *
1243  * example localgroup/localgroup_add.c
1244  ***************************************************************/
1245
1246 NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
1247                                 uint32_t level /* [in] */,
1248                                 uint8_t *buf /* [in] [ref] */,
1249                                 uint32_t *parm_err /* [out] [ref] */);
1250
1251 /************************************************************//**
1252  *
1253  * NetLocalGroupDel
1254  *
1255  * @brief Delete Local Group
1256  *
1257  * @param[in] server_name The server name to connect to
1258  * @param[in] group_name The name of the group that is going to be deleted
1259  * @return NET_API_STATUS
1260  *
1261  * example localgroup/localgroup_del.c
1262  ***************************************************************/
1263
1264
1265 NET_API_STATUS NetLocalGroupDel(const char * server_name /* [in] */,
1266                                 const char * group_name /* [in] */);
1267
1268 /************************************************************//**
1269  *
1270  * NetLocalGroupGetInfo
1271  *
1272  * @brief Get Local Group Information
1273  *
1274  * @param[in] server_name The server name to connect to
1275  * @param[in] group_name The name of the group that is going to be queried
1276  * @param[in] level The level defining the requested LOCALGROUP_INFO_X structure
1277  * @param[out] buf The buffer containing a LOCALGROUP_INFO_X structure
1278  * @return NET_API_STATUS
1279  *
1280  * example localgroup/localgroup_getinfo.c
1281  ***************************************************************/
1282
1283 NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */,
1284                                     const char * group_name /* [in] */,
1285                                     uint32_t level /* [in] */,
1286                                     uint8_t **buf /* [out] [ref] */);
1287
1288 /************************************************************//**
1289  *
1290  * NetLocalGroupSetInfo
1291  *
1292  * @brief Set Local Group Information
1293  *
1294  * @param[in] server_name The server name to connect to
1295  * @param[in] group_name The name of the group that is going to be modified
1296  * @param[in] level The level defining the requested LOCALGROUP_INFO_X structure
1297  * @param[in] buf The buffer containing a LOCALGROUP_INFO_X structure
1298  * @param[out] parm_err The returned parameter error number if any
1299  * @return NET_API_STATUS
1300  *
1301  * example localgroup/localgroup_setinfo.c
1302  ***************************************************************/
1303
1304
1305 NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
1306                                     const char * group_name /* [in] */,
1307                                     uint32_t level /* [in] */,
1308                                     uint8_t *buf /* [in] [ref] */,
1309                                     uint32_t *parm_err /* [out] [ref] */);
1310
1311 /************************************************************//**
1312  *
1313  * NetLocalGroupEnum
1314  *
1315  * @brief Enumerate local groups on a server
1316  *
1317  * @param[in] server_name The server name to connect to
1318  * @param[in] level The enumeration level used for the query (Currently only
1319  * level 0 is supported)
1320  * @param[out] buffer The returned enumeration buffer
1321  * @param[in] prefmaxlen The requested maximal buffer size
1322  * @param[out] entries_read The number of returned entries
1323  * @param[out] total_entries The number of total entries
1324  * @param[in,out] resume_handle A handle passed in and returned for resuming
1325  * operations
1326  * @return NET_API_STATUS
1327  *
1328  * example localgroup/localgroup_enum.c
1329  ***************************************************************/
1330
1331 NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */,
1332                                  uint32_t level /* [in] */,
1333                                  uint8_t **buffer /* [out] [ref] */,
1334                                  uint32_t prefmaxlen /* [in] */,
1335                                  uint32_t *entries_read /* [out] [ref] */,
1336                                  uint32_t *total_entries /* [out] [ref] */,
1337                                  uint32_t *resume_handle /* [in,out] [ref] */);
1338
1339 /************************************************************//**
1340  *
1341  * NetLocalGroupAddMembers
1342  *
1343  * @brief Add Members to a Local Group
1344  *
1345  * @param[in] server_name The server name to connect to
1346  * @param[in] group_name The name of the group that is going to modified
1347  * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
1348  * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
1349  * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
1350  * the buffer
1351  * @return NET_API_STATUS
1352  *
1353  * example localgroup/localgroup_addmembers.c
1354  ***************************************************************/
1355
1356 NET_API_STATUS NetLocalGroupAddMembers(const char * server_name /* [in] */,
1357                                        const char * group_name /* [in] */,
1358                                        uint32_t level /* [in] */,
1359                                        uint8_t *buffer /* [in] [ref] */,
1360                                        uint32_t total_entries /* [in] */);
1361
1362 /************************************************************//**
1363  *
1364  * NetLocalGroupDelMembers
1365  *
1366  * @brief Delete Members from a Local Group
1367  *
1368  * @param[in] server_name The server name to connect to
1369  * @param[in] group_name The name of the group that is going to modified
1370  * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
1371  * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
1372  * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
1373  * the buffer
1374  * @return NET_API_STATUS
1375  *
1376  * example localgroup/localgroup_delmembers.c
1377  ***************************************************************/
1378
1379 NET_API_STATUS NetLocalGroupDelMembers(const char * server_name /* [in] */,
1380                                        const char * group_name /* [in] */,
1381                                        uint32_t level /* [in] */,
1382                                        uint8_t *buffer /* [in] [ref] */,
1383                                        uint32_t total_entries /* [in] */);
1384
1385 /************************************************************//**
1386  *
1387  * NetLocalGroupGetMembers
1388  *
1389  * @brief Enumerate Members in a local group
1390  *
1391  * @param[in] server_name The server name to connect to
1392  * @param[in] local_group_name The localgroup that is going to be queried
1393  * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
1394  * @param[out] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X
1395  * structure
1396  * @param[in] prefmaxlen The requested maximal buffer size
1397  * @param[out] entries_read The number of LOCALGROUP_MEMBERS_INFO_X entries in the buffer
1398  * @param[out] total_entries The total number of LOCALGROUP_MEMBERS_INFO_X entries for that group
1399  * @param[in,out] resume_handle A handle passed in and returned for resuming
1400  * operations
1401  * @return NET_API_STATUS
1402  *
1403  * example localgroup/localgroup_getmembers.c
1404  ***************************************************************/
1405
1406 NET_API_STATUS NetLocalGroupGetMembers(const char * server_name /* [in] */,
1407                                        const char * local_group_name /* [in] */,
1408                                        uint32_t level /* [in] */,
1409                                        uint8_t **buffer /* [out] [ref] */,
1410                                        uint32_t prefmaxlen /* [in] */,
1411                                        uint32_t *entries_read /* [out] [ref] */,
1412                                        uint32_t *total_entries /* [out] [ref] */,
1413                                        uint32_t *resume_handle /* [in,out] [ref] */);
1414
1415 /************************************************************//**
1416  *
1417  * NetLocalGroupSetMembers
1418  *
1419  * @brief Set Members in a Local Group
1420  *
1421  * @param[in] server_name The server name to connect to
1422  * @param[in] group_name The name of the group that is going to modified
1423  * @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
1424  * @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
1425  * @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
1426  * the buffer
1427  * @return NET_API_STATUS
1428  *
1429  * example localgroup/localgroup_setmembers.c
1430  ***************************************************************/
1431
1432 NET_API_STATUS NetLocalGroupSetMembers(const char * server_name /* [in] */,
1433                                        const char * group_name /* [in] */,
1434                                        uint32_t level /* [in] */,
1435                                        uint8_t *buffer /* [in] [ref] */,
1436                                        uint32_t total_entries /* [in] */);
1437
1438 /************************************************************//**
1439  *
1440  * NetRemoteTOD
1441  *
1442  * @brief Query remote Time of Day
1443  *
1444  * @param[in] server_name The server name to connect to
1445  * @param[out] buf The buffer containing a TIME_OF_DAY_INFO structure
1446  * @return NET_API_STATUS
1447  *
1448  * example server/remote_tod.c
1449  ***************************************************************/
1450
1451 NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
1452                             uint8_t **buf /* [out] [ref] */);
1453 #ifdef __cplusplus
1454 }
1455 #endif /* __cplusplus */
1456
1457 #endif /* __LIB_NETAPI_H__ */