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;
137
struct SERVER_INFO_402 {
138
uint32_t sv402_ulist_mtime;
139
uint32_t sv402_glist_mtime;
140
uint32_t sv402_alist_mtime;
141
const char * sv402_alerts;
142
uint32_t sv402_security;
143
uint32_t sv402_numadmin;
144
uint32_t sv402_lanmask;
145
const char * sv402_guestacct;
146
uint32_t sv402_chdevs;
147
uint32_t sv402_chdevq;
148
uint32_t sv402_chdevjobs;
149
uint32_t sv402_connections;
150
uint32_t sv402_shares;
151
uint32_t sv402_openfiles;
152
uint32_t sv402_sessopens;
153
uint32_t sv402_sessvcs;
154
uint32_t sv402_sessreqs;
155
uint32_t sv402_opensearch;
156
uint32_t sv402_activelocks;
157
uint32_t sv402_numreqbuf;
158
uint32_t sv402_sizreqbuf;
159
uint32_t sv402_numbigbuf;
160
uint32_t sv402_numfiletasks;
161
uint32_t sv402_alertsched;
162
uint32_t sv402_erroralert;
163
uint32_t sv402_logonalert;
164
uint32_t sv402_accessalert;
165
uint32_t sv402_diskalert;
166
uint32_t sv402_netioalert;
167
uint32_t sv402_maxauditsz;
168
const char * sv402_srvheuristics;
171
struct SERVER_INFO_403 {
172
uint32_t sv403_ulist_mtime;
173
uint32_t sv403_glist_mtime;
174
uint32_t sv403_alist_mtime;
175
const char * sv403_alerts;
176
uint32_t sv403_security;
177
uint32_t sv403_numadmin;
178
uint32_t sv403_lanmask;
179
const char * sv403_guestacct;
180
uint32_t sv403_chdevs;
181
uint32_t sv403_chdevq;
182
uint32_t sv403_chdevjobs;
183
uint32_t sv403_connections;
184
uint32_t sv403_shares;
185
uint32_t sv403_openfiles;
186
uint32_t sv403_sessopens;
187
uint32_t sv403_sessvcs;
188
uint32_t sv403_sessreqs;
189
uint32_t sv403_opensearch;
190
uint32_t sv403_activelocks;
191
uint32_t sv403_numreqbuf;
192
uint32_t sv403_sizreqbuf;
193
uint32_t sv403_numbigbuf;
194
uint32_t sv403_numfiletasks;
195
uint32_t sv403_alertsched;
196
uint32_t sv403_erroralert;
197
uint32_t sv403_logonalert;
198
uint32_t sv403_accessalert;
199
uint32_t sv403_diskalert;
200
uint32_t sv403_netioalert;
201
uint32_t sv403_maxauditsz;
202
const char * sv403_srvheuristics;
203
uint32_t sv403_auditedevents;
204
uint32_t sv403_autoprofile;
205
const char * sv403_autopath;
208
struct SERVER_INFO_502 {
209
uint32_t sv502_sessopens;
210
uint32_t sv502_sessvcs;
211
uint32_t sv502_opensearch;
212
uint32_t sv502_sizreqbuf;
213
uint32_t sv502_initworkitems;
214
uint32_t sv502_maxworkitems;
215
uint32_t sv502_rawworkitems;
216
uint32_t sv502_irpstacksize;
217
uint32_t sv502_maxrawbuflen;
218
uint32_t sv502_sessusers;
219
uint32_t sv502_sessconns;
220
uint32_t sv502_maxpagedmemoryusage;
221
uint32_t sv502_maxnonpagedmemoryusage;
222
uint8_t sv502_enablesoftcompat;
223
uint8_t sv502_enableforcedlogoff;
224
uint8_t sv502_timesource;
225
uint8_t sv502_acceptdownlevelapis;
226
uint8_t sv502_lmannounce;
229
struct SERVER_INFO_503 {
230
uint32_t sv503_sessopens;
231
uint32_t sv503_sessvcs;
232
uint32_t sv503_opensearch;
233
uint32_t sv503_sizreqbuf;
234
uint32_t sv503_initworkitems;
235
uint32_t sv503_maxworkitems;
236
uint32_t sv503_rawworkitems;
237
uint32_t sv503_irpstacksize;
238
uint32_t sv503_maxrawbuflen;
239
uint32_t sv503_sessusers;
240
uint32_t sv503_sessconns;
241
uint32_t sv503_maxpagedmemoryusage;
242
uint32_t sv503_maxnonpagedmemoryusage;
243
uint8_t sv503_enablesoftcompat;
244
uint8_t sv503_enableforcedlogoff;
245
uint8_t sv503_timesource;
246
uint8_t sv503_acceptdownlevelapis;
247
uint8_t sv503_lmannounce;
248
const char * sv503_domain;
249
uint32_t sv503_maxcopyreadlen;
250
uint32_t sv503_maxcopywritelen;
251
uint32_t sv503_minkeepsearch;
252
uint32_t sv503_maxkeepsearch;
253
uint32_t sv503_minkeepcomplsearch;
254
uint32_t sv503_maxkeepcomplsearch;
255
uint32_t sv503_threadcountadd;
256
uint32_t sv503_numblockthreads;
257
uint32_t sv503_scavtimeout;
258
uint32_t sv503_minrcvqueue;
259
uint32_t sv503_minfreeworkitems;
260
uint32_t sv503_xactmemsize;
261
uint32_t sv503_threadpriority;
262
uint32_t sv503_maxmpxct;
263
uint32_t sv503_oplockbreakwait;
264
uint32_t sv503_oplockbreakresponsewait;
265
uint8_t sv503_enableoplocks;
266
uint8_t sv503_enableoplockforceclose;
267
uint8_t sv503_enablefcbopens;
268
uint8_t sv503_enableraw;
269
uint8_t sv503_enablesharednetdrives;
270
uint32_t sv503_minfreeconnections;
271
uint32_t sv503_maxfreeconnections;
274
struct SERVER_INFO_599 {
275
uint32_t sv599_sessopens;
276
uint32_t sv599_sessvcs;
277
uint32_t sv599_opensearch;
278
uint32_t sv599_sizreqbuf;
279
uint32_t sv599_initworkitems;
280
uint32_t sv599_maxworkitems;
281
uint32_t sv599_rawworkitems;
282
uint32_t sv599_irpstacksize;
283
uint32_t sv599_maxrawbuflen;
284
uint32_t sv599_sessusers;
285
uint32_t sv599_sessconns;
286
uint32_t sv599_maxpagedmemoryusage;
287
uint32_t sv599_maxnonpagedmemoryusage;
288
uint8_t sv599_enablesoftcompat;
289
uint8_t sv599_enableforcedlogoff;
290
uint8_t sv599_timesource;
291
uint8_t sv599_acceptdownlevelapis;
292
uint8_t sv599_lmannounce;
293
const char * sv599_domain;
294
uint32_t sv599_maxcopyreadlen;
295
uint32_t sv599_maxcopywritelen;
296
uint32_t sv599_minkeepsearch;
297
uint32_t sv599_maxkeepsearch;
298
uint32_t sv599_minkeepcomplsearch;
299
uint32_t sv599_maxkeepcomplsearch;
300
uint32_t sv599_threadcountadd;
301
uint32_t sv599_numblockthreads;
302
uint32_t sv599_scavtimeout;
303
uint32_t sv599_minrcvqueue;
304
uint32_t sv599_minfreeworkitems;
305
uint32_t sv599_xactmemsize;
306
uint32_t sv599_threadpriority;
307
uint32_t sv599_maxmpxct;
308
uint32_t sv599_oplockbreakwait;
309
uint32_t sv599_oplockbreakresponsewait;
310
uint8_t sv599_enableoplocks;
311
uint8_t sv599_enableoplockforceclose;
312
uint8_t sv599_enablefcbopens;
313
uint8_t sv599_enableraw;
314
uint8_t sv599_enablesharednetdrives;
315
uint32_t sv599_minfreeconnections;
316
uint32_t sv599_maxfreeconnections;
317
uint32_t sv599_initsesstable;
318
uint32_t sv599_initconntable;
319
uint32_t sv599_initfiletable;
320
uint32_t sv599_initsearchtable;
321
uint32_t sv599_alertschedule;
322
uint32_t sv599_errorthreshold;
323
uint32_t sv599_networkerrorthreshold;
324
uint32_t sv599_diskspacethreshold;
325
uint32_t sv599_reserved;
326
uint32_t sv599_maxlinkdelay;
327
uint32_t sv599_minlinkthroughput;
328
uint32_t sv599_linkinfovalidtime;
329
uint32_t sv599_scavqosinfoupdatetime;
330
uint32_t sv599_maxworkitemidletime;
333
struct SERVER_INFO_598 {
334
uint32_t sv598_maxrawworkitems;
335
uint32_t sv598_maxthreadsperqueue;
336
uint32_t sv598_producttype;
337
uint32_t sv598_serversize;
338
uint32_t sv598_connectionlessautodisc;
339
uint32_t sv598_sharingviolationretries;
340
uint32_t sv598_sharingviolationdelay;
341
uint32_t sv598_maxglobalopensearch;
342
uint32_t sv598_removeduplicatesearches;
343
uint32_t sv598_lockviolationoffset;
344
uint32_t sv598_lockviolationdelay;
345
uint32_t sv598_mdlreadswitchover;
346
uint32_t sv598_cachedopenlimit;
347
uint32_t sv598_otherqueueaffinity;
348
uint8_t sv598_restrictnullsessaccess;
349
uint8_t sv598_enablewfw311directipx;
350
uint32_t sv598_queuesamplesecs;
351
uint32_t sv598_balancecount;
352
uint32_t sv598_preferredaffinity;
353
uint32_t sv598_maxfreerfcbs;
354
uint32_t sv598_maxfreemfcbs;
355
uint32_t sv598_maxfreelfcbs;
356
uint32_t sv598_maxfreepagedpoolchunks;
357
uint32_t sv598_minpagedpoolchunksize;
358
uint32_t sv598_maxpagedpoolchunksize;
359
uint8_t sv598_sendsfrompreferredprocessor;
360
uint32_t sv598_cacheddirectorylimit;
361
uint32_t sv598_maxcopylength;
362
uint8_t sv598_enablecompression;
363
uint8_t sv598_autosharewks;
364
uint8_t sv598_autoshareserver;
365
uint8_t sv598_enablesecuritysignature;
366
uint8_t sv598_requiresecuritysignature;
367
uint32_t sv598_minclientbuffersize;
368
struct GUID sv598_serverguid;
369
uint32_t sv598_ConnectionNoSessionsTimeout;
370
uint32_t sv598_IdleThreadTimeOut;
371
uint8_t sv598_enableW9xsecuritysignature;
372
uint8_t sv598_enforcekerberosreauthentication;
373
uint8_t sv598_disabledos;
374
uint32_t sv598_lowdiskspaceminimum;
375
uint8_t sv598_disablestrictnamechecking;
378
struct SERVER_INFO_1005 {
379
const char * sv1005_comment;
382
struct SERVER_INFO_1107 {
383
uint32_t sv1107_users;
386
struct SERVER_INFO_1010 {
390
struct SERVER_INFO_1016 {
391
uint8_t sv1016_hidden;
394
struct SERVER_INFO_1017 {
395
uint32_t sv1017_announce;
398
struct SERVER_INFO_1018 {
399
uint32_t sv1018_anndelta;
402
struct SERVER_INFO_1501 {
403
uint32_t sv1501_sessopens;
406
struct SERVER_INFO_1502 {
407
uint32_t sv1502_sessvcs;
410
struct SERVER_INFO_1503 {
411
uint32_t sv1503_opensearch;
414
struct SERVER_INFO_1506 {
415
uint32_t sv1506_maxworkitems;
418
struct SERVER_INFO_1509 {
419
uint32_t sv1509_maxrawbuflen;
422
struct SERVER_INFO_1510 {
423
uint32_t sv1510_sessusers;
426
struct SERVER_INFO_1511 {
427
uint32_t sv1511_sessconns;
430
struct SERVER_INFO_1512 {
431
uint32_t sv1512_maxnonpagedmemoryusage;
434
struct SERVER_INFO_1513 {
435
uint32_t sv1513_maxpagedmemoryusage;
438
struct SERVER_INFO_1514 {
439
uint8_t sv1514_enablesoftcompat;
442
struct SERVER_INFO_1515 {
443
uint8_t sv1515_enableforcedlogoff;
446
struct SERVER_INFO_1516 {
447
uint8_t sv1516_timesource;
450
struct SERVER_INFO_1518 {
451
uint8_t sv1518_lmannounce;
454
struct SERVER_INFO_1520 {
455
uint32_t sv1520_maxcopyreadlen;
458
struct SERVER_INFO_1521 {
459
uint32_t sv1521_maxcopywritelen;
462
struct SERVER_INFO_1522 {
463
uint32_t sv1522_minkeepsearch;
466
struct SERVER_INFO_1523 {
467
uint32_t sv1523_maxkeepsearch;
470
struct SERVER_INFO_1524 {
471
uint32_t sv1524_minkeepcomplsearch;
474
struct SERVER_INFO_1525 {
475
uint32_t sv1525_maxkeepcomplsearch;
478
struct SERVER_INFO_1528 {
479
uint32_t sv1528_scavtimeout;
482
struct SERVER_INFO_1529 {
483
uint32_t sv1529_minrcvqueue;
486
struct SERVER_INFO_1530 {
487
uint32_t sv1530_minfreeworkitems;
490
struct SERVER_INFO_1533 {
491
uint32_t sv1533_maxmpxct;
494
struct SERVER_INFO_1534 {
495
uint32_t sv1534_oplockbreakwait;
498
struct SERVER_INFO_1535 {
499
uint32_t sv1535_oplockbreakresponsewait;
502
struct SERVER_INFO_1536 {
503
uint8_t sv1536_enableoplocks;
506
struct SERVER_INFO_1537 {
507
uint8_t sv1537_enableoplockforceclose;
510
struct SERVER_INFO_1538 {
511
uint8_t sv1538_enablefcbopens;
514
struct SERVER_INFO_1539 {
515
uint8_t sv1539_enableraw;
518
struct SERVER_INFO_1540 {
519
uint8_t sv1540_enablesharednetdrives;
522
struct SERVER_INFO_1541 {
523
uint8_t sv1541_minfreeconnections;
526
struct SERVER_INFO_1542 {
527
uint8_t sv1542_maxfreeconnections;
530
struct SERVER_INFO_1543 {
531
uint32_t sv1543_initsesstable;
534
struct SERVER_INFO_1544 {
535
uint32_t sv1544_initconntable;
538
struct SERVER_INFO_1545 {
539
uint32_t sv1545_initfiletable;
542
struct SERVER_INFO_1546 {
543
uint32_t sv1546_initsearchtable;
546
struct SERVER_INFO_1547 {
547
uint32_t sv1547_alertschedule;
550
struct SERVER_INFO_1548 {
551
uint32_t sv1548_errorthreshold;
554
struct SERVER_INFO_1549 {
555
uint32_t sv1549_networkerrorthreshold;
558
struct SERVER_INFO_1550 {
559
uint32_t sv1550_diskspacethreshold;
562
struct SERVER_INFO_1552 {
563
uint32_t sv1552_maxlinkdelay;
566
struct SERVER_INFO_1553 {
567
uint32_t sv1553_minlinkthroughput;
570
struct SERVER_INFO_1554 {
571
uint32_t sv1554_linkinfovalidtime;
574
struct SERVER_INFO_1555 {
575
uint32_t sv1555_scavqosinfoupdatetime;
578
struct SERVER_INFO_1556 {
579
uint32_t sv1556_maxworkitemidletime;
582
struct SERVER_INFO_1557 {
583
uint32_t sv1557_maxrawworkitems;
586
struct SERVER_INFO_1560 {
587
uint32_t sv1560_producttype;
590
struct SERVER_INFO_1561 {
591
uint32_t sv1561_serversize;
594
struct SERVER_INFO_1562 {
595
uint32_t sv1562_connectionlessautodisc;
598
struct SERVER_INFO_1563 {
599
uint32_t sv1563_sharingviolationretries;
602
struct SERVER_INFO_1564 {
603
uint32_t sv1564_sharingviolationdelay;
606
struct SERVER_INFO_1565 {
607
uint32_t sv1565_maxglobalopensearch;
610
struct SERVER_INFO_1566 {
611
uint8_t sv1566_removeduplicatesearches;
614
struct SERVER_INFO_1567 {
615
uint32_t sv1567_lockviolationretries;
618
struct SERVER_INFO_1568 {
619
uint32_t sv1568_lockviolationoffset;
622
struct SERVER_INFO_1569 {
623
uint32_t sv1569_lockviolationdelay;
626
struct SERVER_INFO_1570 {
627
uint32_t sv1570_mdlreadswitchover;
630
struct SERVER_INFO_1571 {
631
uint32_t sv1571_cachedopenlimit;
634
struct SERVER_INFO_1572 {
635
uint32_t sv1572_criticalthreads;
638
struct SERVER_INFO_1573 {
639
uint32_t sv1573_restrictnullsessaccess;
642
struct SERVER_INFO_1574 {
643
uint32_t sv1574_enablewfw311directipx;
646
struct SERVER_INFO_1575 {
647
uint32_t sv1575_otherqueueaffinity;
650
struct SERVER_INFO_1576 {
651
uint32_t sv1576_queuesamplesecs;
654
struct SERVER_INFO_1577 {
655
uint32_t sv1577_balancecount;
658
struct SERVER_INFO_1578 {
659
uint32_t sv1578_preferredaffinity;
662
struct SERVER_INFO_1579 {
663
uint32_t sv1579_maxfreerfcbs;
666
struct SERVER_INFO_1580 {
667
uint32_t sv1580_maxfreemfcbs;
670
struct SERVER_INFO_1581 {
671
uint32_t sv1581_maxfreemlcbs;
674
struct SERVER_INFO_1582 {
675
uint32_t sv1582_maxfreepagedpoolchunks;
678
struct SERVER_INFO_1583 {
679
uint32_t sv1583_minpagedpoolchunksize;
682
struct SERVER_INFO_1584 {
683
uint32_t sv1584_maxpagedpoolchunksize;
686
struct SERVER_INFO_1585 {
687
uint8_t sv1585_sendsfrompreferredprocessor;
690
struct SERVER_INFO_1586 {
691
uint32_t sv1586_maxthreadsperqueue;
694
struct SERVER_INFO_1587 {
695
uint32_t sv1587_cacheddirectorylimit;
698
struct SERVER_INFO_1588 {
699
uint32_t sv1588_maxcopylength;
702
struct SERVER_INFO_1590 {
703
uint32_t sv1590_enablecompression;
706
struct SERVER_INFO_1591 {
707
uint32_t sv1591_autosharewks;
710
struct SERVER_INFO_1592 {
711
uint32_t sv1592_autosharewks;
714
struct SERVER_INFO_1593 {
715
uint32_t sv1593_enablesecuritysignature;
718
struct SERVER_INFO_1594 {
719
uint32_t sv1594_requiresecuritysignature;
722
struct SERVER_INFO_1595 {
723
uint32_t sv1595_minclientbuffersize;
726
struct SERVER_INFO_1596 {
727
uint32_t sv1596_ConnectionNoSessionsTimeout;
730
struct SERVER_INFO_1597 {
731
uint32_t sv1597_IdleThreadTimeOut;
734
struct SERVER_INFO_1598 {
735
uint32_t sv1598_enableW9xsecuritysignature;
738
struct SERVER_INFO_1599 {
739
uint8_t sv1598_enforcekerberosreauthentication;
742
struct SERVER_INFO_1600 {
743
uint8_t sv1598_disabledos;
746
struct SERVER_INFO_1601 {
747
uint32_t sv1598_lowdiskspaceminimum;
750
struct SERVER_INFO_1602 {
751
uint8_t sv_1598_disablestrictnamechecking;
755
const char * usri0_name;
758
#define USER_PRIV_GUEST ( 0 )
759
#define USER_PRIV_USER ( 1 )
760
#define USER_PRIV_ADMIN ( 2 )
763
const char * usri1_name;
764
const char * usri1_password;
765
uint32_t usri1_password_age;
767
const char * usri1_home_dir;
768
const char * usri1_comment;
769
uint32_t usri1_flags;
770
const char * usri1_script_path;
773
#define AF_OP_PRINT ( 0x1 )
774
#define AF_OP_COMM ( 0x2 )
775
#define AF_OP_SERVER ( 0x4 )
776
#define AF_OP_ACCOUNTS ( 0x8 )
779
const char * usri2_name;
780
const char * usri2_password;
781
uint32_t usri2_password_age;
783
const char * usri2_home_dir;
784
const char * usri2_comment;
785
uint32_t usri2_flags;
786
const char * usri2_script_path;
787
uint32_t usri2_auth_flags;
788
const char * usri2_full_name;
789
const char * usri2_usr_comment;
790
const char * usri2_parms;
791
const char * usri2_workstations;
792
uint32_t usri2_last_logon;
793
uint32_t usri2_last_logoff;
794
uint32_t usri2_acct_expires;
795
uint32_t usri2_max_storage;
796
uint32_t usri2_units_per_week;
797
uint8_t *usri2_logon_hours;/* [unique] */
798
uint32_t usri2_bad_pw_count;
799
uint32_t usri2_num_logons;
800
const char * usri2_logon_server;
801
uint32_t usri2_country_code;
802
uint32_t usri2_code_page;
806
const char * usri3_name;
807
uint32_t usri3_password_age;
809
const char * usri3_home_dir;
810
const char * usri3_comment;
811
uint32_t usri3_flags;
812
const char * usri3_script_path;
813
uint32_t usri3_auth_flags;
814
const char * usri3_full_name;
815
const char * usri3_usr_comment;
816
const char * usri3_parms;
817
const char * usri3_workstations;
818
uint32_t usri3_last_logon;
819
uint32_t usri3_last_logoff;
820
uint32_t usri3_acct_expires;
821
uint32_t usri3_max_storage;
822
uint32_t usri3_units_per_week;
823
uint8_t *usri3_logon_hours;/* [unique] */
824
uint32_t usri3_bad_pw_count;
825
uint32_t usri3_num_logons;
826
const char * usri3_logon_server;
827
uint32_t usri3_country_code;
828
uint32_t usri3_code_page;
829
uint32_t usri3_user_id;
830
uint32_t usri3_primary_group_id;
831
const char * usri3_profile;
832
const char * usri3_home_dir_drive;
833
uint32_t usri3_password_expired;
837
const char * usri4_name;
838
const char * usri4_password;
839
uint32_t usri4_password_age;
841
const char * usri4_home_dir;
842
const char * usri4_comment;
843
uint32_t usri4_flags;
844
const char * usri4_script_path;
845
uint32_t usri4_auth_flags;
846
const char * usri4_full_name;
847
const char * usri4_usr_comment;
848
const char * usri4_parms;
849
const char * usri4_workstations;
850
uint32_t usri4_last_logon;
851
uint32_t usri4_last_logoff;
852
uint32_t usri4_acct_expires;
853
uint32_t usri4_max_storage;
854
uint32_t usri4_units_per_week;
855
uint8_t *usri4_logon_hours;/* [unique] */
856
uint32_t usri4_bad_pw_count;
857
uint32_t usri4_num_logons;
858
const char * usri4_logon_server;
859
uint32_t usri4_country_code;
860
uint32_t usri4_code_page;
861
struct domsid *usri4_user_sid;/* [unique] */
862
uint32_t usri4_primary_group_id;
863
const char * usri4_profile;
864
const char * usri4_home_dir_drive;
865
uint32_t usri4_password_expired;
868
struct USER_INFO_10 {
869
const char * usri10_name;
870
const char * usri10_comment;
871
const char * usri10_usr_comment;
872
const char * usri10_full_name;
875
struct USER_INFO_11 {
876
const char * usri11_name;
877
const char * usri11_comment;
878
const char * usri11_usr_comment;
879
const char * usri11_full_name;
880
uint32_t usri11_priv;
881
uint32_t usri11_auth_flags;
882
uint32_t usri11_password_age;
883
const char * usri11_home_dir;
884
const char * usri11_parms;
885
uint32_t usri11_last_logon;
886
uint32_t usri11_last_logoff;
887
uint32_t usri11_bad_pw_count;
888
uint32_t usri11_num_logons;
889
const char * usri11_logon_server;
890
uint32_t usri11_country_code;
891
const char * usri11_workstations;
892
uint32_t usri11_max_storage;
893
uint32_t usri11_units_per_week;
894
uint8_t *usri11_logon_hours;/* [unique] */
895
uint32_t usri11_code_page;
898
struct USER_INFO_20 {
899
const char * usri20_name;
900
const char * usri20_full_name;
901
const char * usri20_comment;
902
uint32_t usri20_flags;
903
uint32_t usri20_user_id;
906
struct USER_INFO_21 {
907
uint8_t *usri21_password;
910
struct USER_INFO_22 {
911
const char * usri22_name;
912
uint8_t *usri22_password;
913
uint32_t usri22_password_age;
914
uint32_t usri22_priv;
915
const char * usri22_home_dir;
916
const char * usri22_comment;
917
uint32_t usri22_flags;
918
uint32_t usri22_script_path;
919
uint32_t usri22_auth_flags;
920
const char * usri22_full_name;
921
const char * usri22_usr_comment;
922
const char * usri22_parms;
923
const char * usri22_workstations;
924
uint32_t usri22_last_logon;
925
uint32_t usri22_last_logoff;
926
uint32_t usri22_acct_expires;
927
uint32_t usri22_max_storage;
928
uint32_t usri22_units_per_week;
929
uint8_t *usri22_logon_hours;/* [unique] */
930
uint32_t usri22_bad_pw_count;
931
uint32_t usri22_num_logons;
932
const char * usri22_logon_server;
933
uint32_t usri22_country_code;
934
uint32_t usri22_code_page;
937
struct USER_INFO_23 {
938
const char * usri23_name;
939
const char * usri23_full_name;
940
const char * usri23_comment;
941
uint32_t usri23_flags;
942
struct domsid *usri23_user_sid;/* [unique] */
945
struct USER_INFO_1003 {
946
const char * usri1003_password;
949
struct USER_INFO_1005 {
950
uint32_t usri1005_priv;
953
struct USER_INFO_1006 {
954
const char * usri1006_home_dir;
957
struct USER_INFO_1007 {
958
const char * usri1007_comment;
961
struct USER_INFO_1008 {
962
uint32_t usri1008_flags;
965
struct USER_INFO_1009 {
966
const char * usri1009_script_path;
969
struct USER_INFO_1010 {
970
uint32_t usri1010_auth_flags;
973
struct USER_INFO_1011 {
974
const char * usri1011_full_name;
977
struct USER_INFO_1012 {
978
const char * usri1012_usr_comment;
981
struct USER_INFO_1013 {
982
const char * usri1013_parms;
985
struct USER_INFO_1014 {
986
const char * usri1014_workstations;
989
struct USER_INFO_1017 {
990
uint32_t usri1017_acct_expires;
993
struct USER_INFO_1018 {
994
uint32_t usri1018_max_storage;
997
struct USER_INFO_1020 {
998
uint32_t usri1020_units_per_week;
999
uint8_t *usri1020_logon_hours;/* [unique] */
1002
struct USER_INFO_1023 {
1003
const char * usri1023_logon_server;
1006
struct USER_INFO_1024 {
1007
uint32_t usri1024_country_code;
1010
struct USER_INFO_1025 {
1011
uint32_t usri1025_code_page;
1014
struct USER_INFO_1051 {
1015
uint32_t usri1051_primary_group_id;
1018
struct USER_INFO_1052 {
1019
const char * usri1052_profile;
1022
struct USER_INFO_1053 {
1023
const char * usri1053_home_dir_drive;
1026
struct USER_MODALS_INFO_0 {
1027
uint32_t usrmod0_min_passwd_len;
1028
uint32_t usrmod0_max_passwd_age;
1029
uint32_t usrmod0_min_passwd_age;
1030
uint32_t usrmod0_force_logoff;
1031
uint32_t usrmod0_password_hist_len;
1034
struct USER_MODALS_INFO_1 {
1035
uint32_t usrmod1_role;
1036
const char * usrmod1_primary;
1039
struct USER_MODALS_INFO_2 {
1040
const char * usrmod2_domain_name;
1041
struct domsid *usrmod2_domain_id;/* [unique] */
1044
struct USER_MODALS_INFO_3 {
1045
uint32_t usrmod3_lockout_duration;
1046
uint32_t usrmod3_lockout_observation_window;
1047
uint32_t usrmod3_lockout_threshold;
1050
struct USER_MODALS_INFO_1001 {
1051
uint32_t usrmod1001_min_passwd_len;
1054
struct USER_MODALS_INFO_1002 {
1055
uint32_t usrmod1002_max_passwd_age;
1058
struct USER_MODALS_INFO_1003 {
1059
uint32_t usrmod1003_min_passwd_age;
1062
struct USER_MODALS_INFO_1004 {
1063
uint32_t usrmod1004_force_logoff;
1066
struct USER_MODALS_INFO_1005 {
1067
uint32_t usrmod1005_password_hist_len;
1070
struct USER_MODALS_INFO_1006 {
1071
uint32_t usrmod1006_role;
1074
struct USER_MODALS_INFO_1007 {
1075
const char * usrmod1007_primary;
1078
struct NET_DISPLAY_USER {
1079
const char * usri1_name;
1080
const char * usri1_comment;
1081
uint32_t usri1_flags;
1082
const char * usri1_full_name;
1083
uint32_t usri1_user_id;
1084
uint32_t usri1_next_index;
1087
struct NET_DISPLAY_MACHINE {
1088
const char * usri2_name;
1089
const char * usri2_comment;
1090
uint32_t usri2_flags;
1091
uint32_t usri2_user_id;
1092
uint32_t usri2_next_index;
1095
struct NET_DISPLAY_GROUP {
1096
const char * grpi3_name;
1097
const char * grpi3_comment;
1098
uint32_t grpi3_group_id;
1099
uint32_t grpi3_attributes;
1100
uint32_t grpi3_next_index;
1103
struct GROUP_INFO_0 {
1104
const char * grpi0_name;
1107
struct GROUP_INFO_1 {
1108
const char * grpi1_name;
1109
const char * grpi1_comment;
1112
struct GROUP_INFO_2 {
1113
const char * grpi2_name;
1114
const char * grpi2_comment;
1115
uint32_t grpi2_group_id;
1116
uint32_t grpi2_attributes;
1119
struct GROUP_INFO_3 {
1120
const char * grpi3_name;
1121
const char * grpi3_comment;
1122
struct domsid * grpi3_group_sid;
1123
uint32_t grpi3_attributes;
1126
struct GROUP_INFO_1002 {
1127
const char * grpi1002_comment;
1130
struct GROUP_INFO_1005 {
1131
uint32_t grpi1005_attributes;
1134
struct GROUP_USERS_INFO_0 {
1135
const char * grui0_name;
1138
struct GROUP_USERS_INFO_1 {
1139
const char * grui1_name;
1140
uint32_t grui1_attributes;
1143
struct LOCALGROUP_INFO_0 {
1144
const char * lgrpi0_name;
1147
struct LOCALGROUP_INFO_1 {
1148
const char * lgrpi1_name;
1149
const char * lgrpi1_comment;
1152
struct LOCALGROUP_INFO_1002 {
1153
const char * lgrpi1002_comment;
1161
SidTypeWellKnownGroup=5,
1162
SidTypeDeletedAccount=6,
1169
struct LOCALGROUP_MEMBERS_INFO_0 {
1170
struct domsid *lgrmi0_sid;/* [unique] */
1173
struct LOCALGROUP_MEMBERS_INFO_1 {
1174
struct domsid *lgrmi1_sid;/* [unique] */
1175
enum SID_NAME_USE lgrmi1_sidusage;
1176
const char * lgrmi1_name;
1179
struct LOCALGROUP_MEMBERS_INFO_2 {
1180
struct domsid *lgrmi2_sid;/* [unique] */
1181
enum SID_NAME_USE lgrmi2_sidusage;
1182
const char * lgrmi2_domainandname;
1185
struct LOCALGROUP_MEMBERS_INFO_3 {
1186
const char * lgrmi3_domainandname;
1189
struct LOCALGROUP_USERS_INFO_0 {
1190
const char * lgrui0_name;
1193
struct TIME_OF_DAY_INFO {
1194
uint32_t tod_elapsedt;
1200
int32_t tod_timezone;
1201
uint32_t tod_tinterval;
1205
uint32_t tod_weekday;
1208
struct SHARE_INFO_0 {
1209
const char * shi0_netname;
1212
struct SHARE_INFO_1 {
1213
const char * shi1_netname;
1215
const char * shi1_remark;
1218
struct SHARE_INFO_2 {
1219
const char * shi2_netname;
1221
const char * shi2_remark;
1222
uint32_t shi2_permissions;
1223
uint32_t shi2_max_uses;
1224
uint32_t shi2_current_uses;
1225
const char * shi2_path;
1226
const char * shi2_passwd;
1229
struct SHARE_INFO_501 {
1230
const char * shi501_netname;
1231
uint32_t shi501_type;
1232
const char * shi501_remark;
1233
uint32_t shi501_flags;
1236
struct SHARE_INFO_1004 {
1237
const char * shi1004_remark;
1240
struct SHARE_INFO_1005 {
1241
uint32_t shi1005_flags;
1244
struct SHARE_INFO_1006 {
1245
uint32_t shi1006_max_uses;
1248
struct FILE_INFO_2 {
1252
struct FILE_INFO_3 {
1254
uint32_t fi3_permissions;
1255
uint32_t fi3_num_locks;
1256
const char * fi3_pathname;
1257
const char * fi3_username;
1260
#endif /* _HEADER_libnetapi */
1262
/****************************************************************
1263
****************************************************************/
1265
struct libnetapi_ctx {
1273
int disable_policy_handle_cache;
1278
/****************************************************************
1279
****************************************************************/
1281
NET_API_STATUS libnetapi_init(struct libnetapi_ctx **ctx);
1283
/****************************************************************
1284
****************************************************************/
1286
NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx);
1288
/****************************************************************
1289
****************************************************************/
1291
NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx);
1293
/****************************************************************
1294
****************************************************************/
1296
NET_API_STATUS libnetapi_set_debuglevel(struct libnetapi_ctx *ctx,
1297
const char *debuglevel);
1299
/****************************************************************
1300
****************************************************************/
1302
NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx,
1303
const char *username);
1305
/****************************************************************
1306
****************************************************************/
1308
NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx,
1309
const char *password);
1311
/****************************************************************
1312
****************************************************************/
1314
NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx,
1315
const char *workgroup);
1317
/****************************************************************
1318
****************************************************************/
1320
NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx);
1322
/****************************************************************
1323
****************************************************************/
1325
const char *libnetapi_errstr(NET_API_STATUS status);
1327
/****************************************************************
1328
****************************************************************/
1330
const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx,
1331
NET_API_STATUS status);
1333
/****************************************************************
1334
NetApiBufferAllocate
1335
****************************************************************/
1337
NET_API_STATUS NetApiBufferAllocate(uint32_t byte_count,
1340
/****************************************************************
1342
****************************************************************/
1344
NET_API_STATUS NetApiBufferFree(void *buffer);
1346
/************************************************************//**
1348
* ConvertSidToStringSid
1350
* @brief Convert a domain sid into a string
1352
* @param[in] sid A pointer to a sid structure
1353
* @param[in,out] sid_string A pointer that holds a pointer to a sid string. Caller
1354
* needs to free with free(3)
1356
***************************************************************/
1358
int ConvertSidToStringSid(const struct domsid *sid,
1361
/************************************************************//**
1363
* ConvertStringSidToSid
1365
* @brief Convert a string into a domain sid
1367
* @param[in] sid_string A pointer to a sid string.
1368
* @param[in,out] sid A pointer that holds a pointer to a sid structure.
1369
* Caller needs to free with free(3)
1371
***************************************************************/
1373
int ConvertStringSidToSid(const char *sid_string,
1374
struct domsid **sid);
1376
/************************************************************//**
1380
* @brief Join a computer to a domain or workgroup
1382
* @param[in] server The server name to connect to
1383
* @param[in] domain The domain or workgroup to join
1384
* @param[in] account_ou The organizational Unit to create the computer account
1386
* @param[in] account The domain account used for joining a domain
1387
* @param[in] password The domain account's password used for joining a domain
1388
* @param[in] join_flags Bitmask field to define specific join features
1389
* @return NET_API_STATUS
1391
* example netdomjoin/netdomjoin.c
1392
***************************************************************/
1394
NET_API_STATUS NetJoinDomain(const char * server /* [in] */,
1395
const char * domain /* [in] [ref] */,
1396
const char * account_ou /* [in] */,
1397
const char * account /* [in] */,
1398
const char * password /* [in] */,
1399
uint32_t join_flags /* [in] */);
1401
/************************************************************//**
1405
* @brief Unjoin a computer from a domain or workgroup
1407
* @param[in] server_name The server name to connect to
1408
* @param[in] account The domain account used for unjoining a domain
1409
* @param[in] password The domain account's password used for unjoining a domain
1410
* @param[in] unjoin_flags Bitmask field to define specific unjoin features
1411
* @return NET_API_STATUS
1413
***************************************************************/
1415
NET_API_STATUS NetUnjoinDomain(const char * server_name /* [in] */,
1416
const char * account /* [in] */,
1417
const char * password /* [in] */,
1418
uint32_t unjoin_flags /* [in] */);
1420
/************************************************************//**
1422
* NetGetJoinInformation
1424
* @brief Unjoin a computer from a domain or workgroup
1426
* @param[in] server_name The server name to connect to
1427
* @param[out] name_buffer Returns the name of the workgroup or domain
1428
* @param[out] name_type Returns the type of that name
1429
* @return NET_API_STATUS
1431
* example netdomjoin-gui/netdomjoin-gui.c
1433
***************************************************************/
1435
NET_API_STATUS NetGetJoinInformation(const char * server_name /* [in] */,
1436
const char * *name_buffer /* [out] [ref] */,
1437
uint16_t *name_type /* [out] [ref] */);
1439
/************************************************************//**
1443
* @brief Query for the list of joinable organizational Units that can be used
1446
* @param[in] server_name The server name to connect to
1447
* @param[in] domain The AD domain to query
1448
* @param[in] account The domain account used for the query
1449
* @param[in] password The domain account's password used for the query
1450
* @param[out] ou_count The number of ous returned
1451
* @param[out] ous Returned string array containing the ous
1452
* @return NET_API_STATUS
1454
* example netdomjoin-gui/netdomjoin-gui.c
1456
***************************************************************/
1458
NET_API_STATUS NetGetJoinableOUs(const char * server_name /* [in] */,
1459
const char * domain /* [in] [ref] */,
1460
const char * account /* [in] */,
1461
const char * password /* [in] */,
1462
uint32_t *ou_count /* [out] [ref] */,
1463
const char * **ous /* [out] [ref] */);
1465
/************************************************************//**
1467
* NetRenameMachineInDomain
1469
* @brief Rename a machine in a domain
1471
* @param[in] server_name The server name to connect to
1472
* @param[in] new_machine_name The new machine name
1473
* @param[in] account The domain account used for the query
1474
* @param[in] password The domain account's password used for the query
1475
* @param[in] rename_options Options used for the rename operation
1476
* @return NET_API_STATUS
1478
* example join/rename_machine.c
1480
***************************************************************/
1482
NET_API_STATUS NetRenameMachineInDomain(const char * server_name /* [in] */,
1483
const char * new_machine_name /* [in] */,
1484
const char * account /* [in] */,
1485
const char * password /* [in] */,
1486
uint32_t rename_options /* [in] */);
1488
/************************************************************//**
1492
* @brief Get Information on a server
1494
* @param[in] server_name The server name to connect to
1495
* @param[in] level The level to define which information is requested
1496
* @param[out] buffer The returned buffer carrying the SERVER_INFO structure
1497
* @return NET_API_STATUS
1499
***************************************************************/
1501
NET_API_STATUS NetServerGetInfo(const char * server_name /* [in] */,
1502
uint32_t level /* [in] */,
1503
uint8_t **buffer /* [out] [ref] */);
1505
/************************************************************//**
1509
* @brief Get Information on a server
1511
* @param[in] server_name The server name to connect to
1512
* @param[in] level The level to define which information is set
1513
* @param[in] buffer The buffer carrying the SERVER_INFO structure
1514
* @param[out] parm_error On failure returns the invalid SERVER_INFO member
1515
* @return NET_API_STATUS
1517
***************************************************************/
1519
NET_API_STATUS NetServerSetInfo(const char * server_name /* [in] */,
1520
uint32_t level /* [in] */,
1521
uint8_t *buffer /* [in] [ref] */,
1522
uint32_t *parm_error /* [out] [ref] */);
1524
/************************************************************//**
1528
* @brief Query for the PDC for a given domain
1530
* @param[in] server_name The server name to connect to
1531
* @param[in] domain_name The name of the domain to lookup
1532
* @param[out] buffer The name of the domain to lookup
1533
* @return NET_API_STATUS
1535
* example getdc/getdc.c
1536
***************************************************************/
1538
NET_API_STATUS NetGetDCName(const char * server_name /* [in] */,
1539
const char * domain_name /* [in] */,
1540
uint8_t **buffer /* [out] [ref] */);
1542
/************************************************************//**
1546
* @brief Query for any DC for a given domain
1548
* @param[in] server_name The server name to connect to
1549
* @param[in] domain_name The name of the domain to lookup
1550
* @param[out] buffer The name of the domain to lookup
1551
* @return NET_API_STATUS
1553
* example getdc/getdc.c
1554
***************************************************************/
1556
NET_API_STATUS NetGetAnyDCName(const char * server_name /* [in] */,
1557
const char * domain_name /* [in] */,
1558
uint8_t **buffer /* [out] [ref] */);
1561
/************************************************************//**
1565
* @brief Lookup a DC for a given domain and return information structure
1567
* @param[in] server_name The server name to connect to
1568
* @param[in] domain_name The name of the domain to lookup (cannot be NULL)
1569
* @param[in] domain_guid The GUID of the domain to lookup (optional)
1570
* @param[in] site_name The name of the site the DC should reside in
1571
* @param[in] flags A bitmask to request specific features supported by the DC
1572
* @param[out] dc_info Pointer to a DOMAIN_CONTROLLER_INFO structure
1573
* @return NET_API_STATUS
1575
* example dsgetdc/dsgetdc.c
1576
***************************************************************/
1578
NET_API_STATUS DsGetDcName(const char * server_name /* [in] [unique] */,
1579
const char * domain_name /* [in] [ref] */,
1580
struct GUID *domain_guid /* [in] [unique] */,
1581
const char * site_name /* [in] [unique] */,
1582
uint32_t flags /* [in] */,
1583
struct DOMAIN_CONTROLLER_INFO **dc_info /* [out] [ref] */);
1585
/************************************************************//**
1589
* @brief Create a user on a given server
1591
* @param[in] server_name The server name to connect to
1592
* @param[in] level The level of the USER_INFO structure passed in (Currently
1593
* only level 1 is supported)
1594
* @param[in] buffer The buffer carrying the USER_INFO structure
1595
* @param[out] parm_error In case of error returns the failing member of the
1597
* @return NET_API_STATUS
1599
* example user/user_add.c
1600
***************************************************************/
1602
NET_API_STATUS NetUserAdd(const char * server_name /* [in] */,
1603
uint32_t level /* [in] */,
1604
uint8_t *buffer /* [in] [ref] */,
1605
uint32_t *parm_error /* [out] [ref] */);
1607
/************************************************************//**
1611
* @brief Delete a user on a given server
1613
* @param[in] server_name The server name to connect to
1614
* @param[in] user_name The user account to delete
1615
* @return NET_API_STATUS
1617
* example user/user_del.c
1618
***************************************************************/
1620
NET_API_STATUS NetUserDel(const char * server_name /* [in] */,
1621
const char * user_name /* [in] */);
1623
/************************************************************//**
1627
* @brief Enumerate accounts on a server
1629
* @param[in] server_name The server name to connect to
1630
* @param[in] level The enumeration level used for the query (Currently only
1631
* level 0 is supported)
1632
* @param[in] filter The account flags filter used for the query
1633
* @param[out] buffer The returned enumeration buffer
1634
* @param[in] prefmaxlen The requested maximal buffer size
1635
* @param[out] entries_read The number of returned entries
1636
* @param[out] total_entries The number of total entries
1637
* @param[in,out] resume_handle A handle passed in and returned for resuming
1639
* @return NET_API_STATUS
1641
* example user/user_enum.c
1642
***************************************************************/
1644
NET_API_STATUS NetUserEnum(const char * server_name /* [in] */,
1645
uint32_t level /* [in] */,
1646
uint32_t filter /* [in] */,
1647
uint8_t **buffer /* [out] [ref] */,
1648
uint32_t prefmaxlen /* [in] */,
1649
uint32_t *entries_read /* [out] [ref] */,
1650
uint32_t *total_entries /* [out] [ref] */,
1651
uint32_t *resume_handle /* [in,out] [ref] */);
1653
/************************************************************//**
1655
* NetUserChangePassword
1657
* @brief Change the password for a user on a given server or in a given domain
1659
* @param[in] domain_name The server or domain name to connect to
1660
* @param[in] user_name The user account to change the password for
1661
* @param[in] old_password The user account's old password
1662
* @param[in] new_password The user account's new password
1663
* @return NET_API_STATUS
1665
* example user/user_chgpwd.c
1666
***************************************************************/
1668
NET_API_STATUS NetUserChangePassword(const char * domain_name /* [in] */,
1669
const char * user_name /* [in] */,
1670
const char * old_password /* [in] */,
1671
const char * new_password /* [in] */);
1673
/************************************************************//**
1677
* @brief Get User Information
1679
* @param[in] server_name The server name to connect to
1680
* @param[in] user_name The name of the user that is going to be queried
1681
* @param[in] level The level defining the requested USER_INFO_X structure
1682
* @param[out] buffer The buffer containing a USER_INFO_X structure
1683
* @return NET_API_STATUS
1685
* example user/user_getinfo.c
1686
***************************************************************/
1688
NET_API_STATUS NetUserGetInfo(const char * server_name /* [in] */,
1689
const char * user_name /* [in] */,
1690
uint32_t level /* [in] */,
1691
uint8_t **buffer /* [out] [ref] */);
1693
/************************************************************//**
1697
* @brief Set User Information
1699
* @param[in] server_name The server name to connect to
1700
* @param[in] user_name The name of the user that is going to be modified
1701
* @param[in] level The level defining the requested USER_INFO_X structure
1702
* @param[in] buffer The buffer containing a USER_INFO_X structure
1703
* @param[out] parm_err The returned parameter error number if any
1704
* @return NET_API_STATUS
1706
* example user/user_setinfo.c
1707
***************************************************************/
1709
NET_API_STATUS NetUserSetInfo(const char * server_name /* [in] */,
1710
const char * user_name /* [in] */,
1711
uint32_t level /* [in] */,
1712
uint8_t *buffer /* [in] [ref] */,
1713
uint32_t *parm_err /* [out] [ref] */);
1715
/************************************************************//**
1719
* @brief Get SAM domain and password information
1721
* @param[in] server_name The server name to connect to
1722
* @param[in] level The level defining which USER_MODALS_INFO_X buffer to query
1723
* @param[out] buffer The returned USER_MODALS_INFO_X buffer
1724
* @return NET_API_STATUS
1726
* example user/user_modalsget.c
1727
***************************************************************/
1729
NET_API_STATUS NetUserModalsGet(const char * server_name /* [in] */,
1730
uint32_t level /* [in] */,
1731
uint8_t **buffer /* [out] [ref] */);
1733
/************************************************************//**
1737
* @brief Set SAM domain and password information
1739
* @param[in] server_name The server name to connect to
1740
* @param[in] level The level defining which USER_MODALS_INFO_X buffer to query
1741
* @param[out] buffer The buffer conntaing a USER_MODALS_INFO_X structure
1742
* @param[out] parm_err The returned parameter error number if any
1743
* @return NET_API_STATUS
1745
* example user/user_modalsset.c
1746
***************************************************************/
1748
NET_API_STATUS NetUserModalsSet(const char * server_name /* [in] */,
1749
uint32_t level /* [in] */,
1750
uint8_t *buffer /* [in] [ref] */,
1751
uint32_t *parm_err /* [out] [ref] */);
1753
/************************************************************//**
1757
* @brief Enumerate grouplist of a user on a server
1759
* @param[in] server_name The server name to connect to
1760
* @param[in] user_name The user name to query
1761
* @param[in] level The enumeration level used for the query (Currently only
1762
* level 0 is supported)
1763
* @param[out] buffer The returned enumeration buffer
1764
* @param[in] prefmaxlen The requested maximal buffer size
1765
* @param[out] entries_read The number of returned entries
1766
* @param[out] total_entries The number of total entries
1767
* @return NET_API_STATUS
1769
* example user/user_getgroups.c
1770
***************************************************************/
1772
NET_API_STATUS NetUserGetGroups(const char * server_name /* [in] */,
1773
const char * user_name /* [in] */,
1774
uint32_t level /* [in] */,
1775
uint8_t **buffer /* [out] [ref] */,
1776
uint32_t prefmaxlen /* [in] */,
1777
uint32_t *entries_read /* [out] [ref] */,
1778
uint32_t *total_entries /* [out] [ref] */);
1780
/************************************************************//**
1784
* @brief Set grouplist of a user on a server
1786
* @param[in] server_name The server name to connect to
1787
* @param[in] user_name The user name to query
1788
* @param[in] level The level defining the GROUP_USERS_INFO_X structures in the buffer
1789
* @param[in] buffer The buffer containing GROUP_USERS_INFO_X structures
1790
* @param[in] num_entries The number of X structures in the buffer
1791
* @return NET_API_STATUS
1793
* example user/user_setgroups.c
1794
***************************************************************/
1796
NET_API_STATUS NetUserSetGroups(const char * server_name /* [in] */,
1797
const char * user_name /* [in] */,
1798
uint32_t level /* [in] */,
1799
uint8_t *buffer /* [in] [ref] */,
1800
uint32_t num_entries /* [in] */);
1802
/************************************************************//**
1804
* NetUserGetLocalGroups
1806
* @brief Enumerate local grouplist of a user on a server
1808
* @param[in] server_name The server name to connect to
1809
* @param[in] user_name The user name to query
1810
* @param[in] level The enumeration level used for the query
1811
* @param[in] flags The flags used for the query
1812
* @param[out] buffer The returned enumeration buffer
1813
* @param[in] prefmaxlen The requested maximal buffer size
1814
* @param[out] entries_read The number of returned entries
1815
* @param[out] total_entries The number of total entries
1816
* @return NET_API_STATUS
1818
* example user/user_getlocalgroups.c
1819
***************************************************************/
1821
NET_API_STATUS NetUserGetLocalGroups(const char * server_name /* [in] */,
1822
const char * user_name /* [in] */,
1823
uint32_t level /* [in] */,
1824
uint32_t flags /* [in] */,
1825
uint8_t **buffer /* [out] [ref] */,
1826
uint32_t prefmaxlen /* [in] */,
1827
uint32_t *entries_read /* [out] [ref] */,
1828
uint32_t *total_entries /* [out] [ref] */);
1830
/************************************************************//**
1832
* NetQueryDisplayInformation
1834
* @brief Enumerate accounts on a server
1836
* @param[in] server_name The server name to connect to
1837
* @param[in] level The enumeration level used for the query
1838
* @param[in] idx The index to start the the display enumeration at
1839
* @param[in] entries_requested The number of entries requested
1840
* @param[in] prefmaxlen The requested maximal buffer size
1841
* @param[out] entries_read The number of returned entries
1842
* @param[out] buffer The returned display information buffer
1843
* @return NET_API_STATUS
1845
* example user/user_dispinfo.c
1846
***************************************************************/
1848
NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [unique] */,
1849
uint32_t level /* [in] */,
1850
uint32_t idx /* [in] */,
1851
uint32_t entries_requested /* [in] */,
1852
uint32_t prefmaxlen /* [in] */,
1853
uint32_t *entries_read /* [out] [ref] */,
1854
void **buffer /* [out] [noprint,ref] */);
1856
/************************************************************//**
1860
* @brief Create Domain Group
1862
* @param[in] server_name The server name to connect to
1863
* @param[in] level The level used for the new group creation
1864
* @param[in] buf The buffer containing the group structure
1865
* @param[out] parm_err The returned parameter error number if any
1866
* @return NET_API_STATUS
1868
* example group/group_add.c
1869
***************************************************************/
1871
NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */,
1872
uint32_t level /* [in] */,
1873
uint8_t *buf /* [in] [ref] */,
1874
uint32_t *parm_err /* [out] [ref] */);
1876
/************************************************************//**
1880
* @brief Delete Domain Group
1882
* @param[in] server_name The server name to connect to
1883
* @param[in] group_name The name of the group that is going to be deleted
1884
* @return NET_API_STATUS
1886
* example group/group_del.c
1887
***************************************************************/
1889
NET_API_STATUS NetGroupDel(const char * server_name /* [in] */,
1890
const char * group_name /* [in] */);
1892
/************************************************************//**
1896
* @brief Enumerate groups on a server
1898
* @param[in] server_name The server name to connect to
1899
* @param[in] level The enumeration level used for the query (Currently only
1900
* level 0 is supported)
1901
* @param[out] buffer The returned enumeration buffer
1902
* @param[in] prefmaxlen The requested maximal buffer size
1903
* @param[out] entries_read The number of returned entries
1904
* @param[out] total_entries The number of total entries
1905
* @param[in,out] resume_handle A handle passed in and returned for resuming
1907
* @return NET_API_STATUS
1909
* example group/group_enum.c
1910
***************************************************************/
1912
NET_API_STATUS NetGroupEnum(const char * server_name /* [in] */,
1913
uint32_t level /* [in] */,
1914
uint8_t **buffer /* [out] [ref] */,
1915
uint32_t prefmaxlen /* [in] */,
1916
uint32_t *entries_read /* [out] [ref] */,
1917
uint32_t *total_entries /* [out] [ref] */,
1918
uint32_t *resume_handle /* [in,out] [ref] */);
1920
/************************************************************//**
1924
* @brief Set Domain Group Information
1926
* @param[in] server_name The server name to connect to
1927
* @param[in] group_name The name of the group that is going to be modified
1928
* @param[in] level The level defining the structure type in buf
1929
* @param[in] buf The buffer containing a GROUP_INFO_X structure
1930
* @param[out] parm_err The returned parameter error number if any
1931
* @return NET_API_STATUS
1933
* example group/group_setinfo.c
1934
***************************************************************/
1936
NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */,
1937
const char * group_name /* [in] */,
1938
uint32_t level /* [in] */,
1939
uint8_t *buf /* [in] [ref] */,
1940
uint32_t *parm_err /* [out] [ref] */);
1942
/************************************************************//**
1946
* @brief Get Domain Group Information
1948
* @param[in] server_name The server name to connect to
1949
* @param[in] group_name The name of the group that is going to be queried
1950
* @param[in] level The level defining the requested GROUP_INFO_X structure
1951
* @param[out] buf The buffer containing a GROUP_INFO_X structure
1952
* @return NET_API_STATUS
1954
* example group/group_getinfo.c
1955
***************************************************************/
1957
NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */,
1958
const char * group_name /* [in] */,
1959
uint32_t level /* [in] */,
1960
uint8_t **buf /* [out] [ref] */);
1962
/************************************************************//**
1966
* @brief Add existing User to existing Domain Group
1968
* @param[in] server_name The server name to connect to
1969
* @param[in] group_name The name of the group that is going to be modified
1970
* @param[in] user_name The name of the user that is going to be added to the
1972
* @return NET_API_STATUS
1974
* example group/group_adduser.c
1975
***************************************************************/
1977
NET_API_STATUS NetGroupAddUser(const char * server_name /* [in] */,
1978
const char * group_name /* [in] */,
1979
const char * user_name /* [in] */);
1981
/************************************************************//**
1985
* @brief Remove User from Domain Group
1987
* @param[in] server_name The server name to connect to
1988
* @param[in] group_name The name of the group that is going to be modified
1989
* @param[in] user_name The name of the user that is going to be removed from
1991
* @return NET_API_STATUS
1993
* example group/group_deluser.c
1994
***************************************************************/
1996
NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */,
1997
const char * group_name /* [in] */,
1998
const char * user_name /* [in] */);
2000
/************************************************************//**
2004
* @brief Get Users for a group on a server
2006
* @param[in] server_name The server name to connect to
2007
* @param[in] group_name The group name to enumerate users for
2008
* @param[in] level The enumeration level used for the query
2009
* @param[out] buffer The returned enumeration buffer
2010
* @param[in] prefmaxlen The requested maximal buffer size
2011
* @param[out] entries_read The number of returned entries
2012
* @param[out] total_entries The number of total entries
2013
* @param[in,out] resume_handle A handle passed in and returned for resuming
2015
* @return NET_API_STATUS
2017
* example group/group_getusers.c
2018
***************************************************************/
2020
NET_API_STATUS NetGroupGetUsers(const char * server_name /* [in] */,
2021
const char * group_name /* [in] */,
2022
uint32_t level /* [in] */,
2023
uint8_t **buffer /* [out] [ref] */,
2024
uint32_t prefmaxlen /* [in] */,
2025
uint32_t *entries_read /* [out] [ref] */,
2026
uint32_t *total_entries /* [out] [ref] */,
2027
uint32_t *resume_handle /* [in,out] [ref] */);
2029
/************************************************************//**
2033
* @brief Set Users for a group on a server
2035
* @param[in] server_name The server name to connect to
2036
* @param[in] group_name The group name to enumerate users for
2037
* @param[in] level The enumeration level used for the query
2038
* @param[in] buffer The buffer containing a X structure
2039
* @param[in] num_entries The number of X entries in the buffer
2040
* @return NET_API_STATUS
2042
* example group/group_setusers.c
2043
***************************************************************/
2045
NET_API_STATUS NetGroupSetUsers(const char * server_name /* [in] */,
2046
const char * group_name /* [in] */,
2047
uint32_t level /* [in] */,
2048
uint8_t *buffer /* [in] [ref] */,
2049
uint32_t num_entries /* [in] */);
2051
/************************************************************//**
2055
* @brief Create Local Group
2057
* @param[in] server_name The server name to connect to
2058
* @param[in] level The level used for the new group creation
2059
* @param[in] buf The buffer containing the group structure
2060
* @param[out] parm_err The returned parameter error number if any
2061
* @return NET_API_STATUS
2063
* example localgroup/localgroup_add.c
2064
***************************************************************/
2066
NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
2067
uint32_t level /* [in] */,
2068
uint8_t *buf /* [in] [ref] */,
2069
uint32_t *parm_err /* [out] [ref] */);
2071
/************************************************************//**
2075
* @brief Delete Local Group
2077
* @param[in] server_name The server name to connect to
2078
* @param[in] group_name The name of the group that is going to be deleted
2079
* @return NET_API_STATUS
2081
* example localgroup/localgroup_del.c
2082
***************************************************************/
2085
NET_API_STATUS NetLocalGroupDel(const char * server_name /* [in] */,
2086
const char * group_name /* [in] */);
2088
/************************************************************//**
2090
* NetLocalGroupGetInfo
2092
* @brief Get Local Group Information
2094
* @param[in] server_name The server name to connect to
2095
* @param[in] group_name The name of the group that is going to be queried
2096
* @param[in] level The level defining the requested LOCALGROUP_INFO_X structure
2097
* @param[out] buf The buffer containing a LOCALGROUP_INFO_X structure
2098
* @return NET_API_STATUS
2100
* example localgroup/localgroup_getinfo.c
2101
***************************************************************/
2103
NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */,
2104
const char * group_name /* [in] */,
2105
uint32_t level /* [in] */,
2106
uint8_t **buf /* [out] [ref] */);
2108
/************************************************************//**
2110
* NetLocalGroupSetInfo
2112
* @brief Set Local Group Information
2114
* @param[in] server_name The server name to connect to
2115
* @param[in] group_name The name of the group that is going to be modified
2116
* @param[in] level The level defining the requested LOCALGROUP_INFO_X structure
2117
* @param[in] buf The buffer containing a LOCALGROUP_INFO_X structure
2118
* @param[out] parm_err The returned parameter error number if any
2119
* @return NET_API_STATUS
2121
* example localgroup/localgroup_setinfo.c
2122
***************************************************************/
2125
NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
2126
const char * group_name /* [in] */,
2127
uint32_t level /* [in] */,
2128
uint8_t *buf /* [in] [ref] */,
2129
uint32_t *parm_err /* [out] [ref] */);
2131
/************************************************************//**
2135
* @brief Enumerate local groups on a server
2137
* @param[in] server_name The server name to connect to
2138
* @param[in] level The enumeration level used for the query (Currently only
2139
* level 0 is supported)
2140
* @param[out] buffer The returned enumeration buffer
2141
* @param[in] prefmaxlen The requested maximal buffer size
2142
* @param[out] entries_read The number of returned entries
2143
* @param[out] total_entries The number of total entries
2144
* @param[in,out] resume_handle A handle passed in and returned for resuming
2146
* @return NET_API_STATUS
2148
* example localgroup/localgroup_enum.c
2149
***************************************************************/
2151
NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */,
2152
uint32_t level /* [in] */,
2153
uint8_t **buffer /* [out] [ref] */,
2154
uint32_t prefmaxlen /* [in] */,
2155
uint32_t *entries_read /* [out] [ref] */,
2156
uint32_t *total_entries /* [out] [ref] */,
2157
uint32_t *resume_handle /* [in,out] [ref] */);
2159
/************************************************************//**
2161
* NetLocalGroupAddMembers
2163
* @brief Add Members to a Local Group
2165
* @param[in] server_name The server name to connect to
2166
* @param[in] group_name The name of the group that is going to modified
2167
* @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
2168
* @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
2169
* @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
2171
* @return NET_API_STATUS
2173
* example localgroup/localgroup_addmembers.c
2174
***************************************************************/
2176
NET_API_STATUS NetLocalGroupAddMembers(const char * server_name /* [in] */,
2177
const char * group_name /* [in] */,
2178
uint32_t level /* [in] */,
2179
uint8_t *buffer /* [in] [ref] */,
2180
uint32_t total_entries /* [in] */);
2182
/************************************************************//**
2184
* NetLocalGroupDelMembers
2186
* @brief Delete Members from a Local Group
2188
* @param[in] server_name The server name to connect to
2189
* @param[in] group_name The name of the group that is going to modified
2190
* @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
2191
* @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
2192
* @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
2194
* @return NET_API_STATUS
2196
* example localgroup/localgroup_delmembers.c
2197
***************************************************************/
2199
NET_API_STATUS NetLocalGroupDelMembers(const char * server_name /* [in] */,
2200
const char * group_name /* [in] */,
2201
uint32_t level /* [in] */,
2202
uint8_t *buffer /* [in] [ref] */,
2203
uint32_t total_entries /* [in] */);
2205
/************************************************************//**
2207
* NetLocalGroupGetMembers
2209
* @brief Enumerate Members in a local group
2211
* @param[in] server_name The server name to connect to
2212
* @param[in] local_group_name The localgroup that is going to be queried
2213
* @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
2214
* @param[out] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X
2216
* @param[in] prefmaxlen The requested maximal buffer size
2217
* @param[out] entries_read The number of LOCALGROUP_MEMBERS_INFO_X entries in the buffer
2218
* @param[out] total_entries The total number of LOCALGROUP_MEMBERS_INFO_X entries for that group
2219
* @param[in,out] resume_handle A handle passed in and returned for resuming
2221
* @return NET_API_STATUS
2223
* example localgroup/localgroup_getmembers.c
2224
***************************************************************/
2226
NET_API_STATUS NetLocalGroupGetMembers(const char * server_name /* [in] */,
2227
const char * local_group_name /* [in] */,
2228
uint32_t level /* [in] */,
2229
uint8_t **buffer /* [out] [ref] */,
2230
uint32_t prefmaxlen /* [in] */,
2231
uint32_t *entries_read /* [out] [ref] */,
2232
uint32_t *total_entries /* [out] [ref] */,
2233
uint32_t *resume_handle /* [in,out] [ref] */);
2235
/************************************************************//**
2237
* NetLocalGroupSetMembers
2239
* @brief Set Members in a Local Group
2241
* @param[in] server_name The server name to connect to
2242
* @param[in] group_name The name of the group that is going to modified
2243
* @param[in] level The level defining the LOCALGROUP_MEMBERS_INFO_X structure
2244
* @param[in] buffer The buffer containing a LOCALGROUP_MEMBERS_INFO_X structure
2245
* @param[in] total_entries The number of LOCALGROUP_MEMBERS_INFO_X entries in
2247
* @return NET_API_STATUS
2249
* example localgroup/localgroup_setmembers.c
2250
***************************************************************/
2252
NET_API_STATUS NetLocalGroupSetMembers(const char * server_name /* [in] */,
2253
const char * group_name /* [in] */,
2254
uint32_t level /* [in] */,
2255
uint8_t *buffer /* [in] [ref] */,
2256
uint32_t total_entries /* [in] */);
2258
/************************************************************//**
2262
* @brief Query remote Time of Day
2264
* @param[in] server_name The server name to connect to
2265
* @param[out] buf The buffer containing a TIME_OF_DAY_INFO structure
2266
* @return NET_API_STATUS
2268
* example server/remote_tod.c
2269
***************************************************************/
2271
NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
2272
uint8_t **buf /* [out] [ref] */);
2274
/************************************************************//**
2280
* @param[in] server_name The server name to connect to
2281
* @param[in] level The level defining the requested SHARE_INFO_X structure
2282
* @param[in] buffer The buffer containing a SHARE_INFO_X structure
2283
* @param[out] parm_err The returned parameter error number if any
2284
* @return NET_API_STATUS
2286
* example share/share_add.c
2287
***************************************************************/
2289
NET_API_STATUS NetShareAdd(const char * server_name /* [in] */,
2290
uint32_t level /* [in] */,
2291
uint8_t *buffer /* [in] [ref] */,
2292
uint32_t *parm_err /* [out] [ref] */);
2294
/************************************************************//**
2298
* @brief Delete Share
2300
* @param[in] server_name The server name to connect to
2301
* @param[in] net_name The name of the share to delete
2302
* @param[in] reserved
2303
* @return NET_API_STATUS
2305
* example share/share_del.c
2306
***************************************************************/
2308
NET_API_STATUS NetShareDel(const char * server_name /* [in] */,
2309
const char * net_name /* [in] */,
2310
uint32_t reserved /* [in] */);
2312
/************************************************************//**
2316
* @brief Enumerate Shares
2318
* @param[in] server_name The server name to connect to
2319
* @param[in] level The level defining the SHARE_INFO_X structure
2320
* @param[out] buffer The buffer containing a SHARE_INFO_X structure
2321
* @param[in] prefmaxlen The requested maximal buffer size
2322
* @param[out] entries_read The number of SHARE_INFO_X entries in the buffer
2323
* @param[out] total_entries The total number of SHARE_INFO_X entries
2324
* @param[in,out] resume_handle A handle passed in and returned for resuming
2326
* @return NET_API_STATUS
2328
* example share/share_enum.c
2329
***************************************************************/
2331
NET_API_STATUS NetShareEnum(const char * server_name /* [in] */,
2332
uint32_t level /* [in] */,
2333
uint8_t **buffer /* [out] [ref] */,
2334
uint32_t prefmaxlen /* [in] */,
2335
uint32_t *entries_read /* [out] [ref] */,
2336
uint32_t *total_entries /* [out] [ref] */,
2337
uint32_t *resume_handle /* [in,out] [ref] */);
2339
/************************************************************//**
2343
* @brief Get Share Info
2345
* @param[in] server_name The server name to connect to
2346
* @param[in] net_name The name of the share to query
2347
* @param[in] level The level defining the SHARE_INFO_X structure
2348
* @param[out] buffer The buffer containing a SHARE_INFO_X structure
2349
* @return NET_API_STATUS
2351
* example share/share_getinfo.c
2352
***************************************************************/
2354
NET_API_STATUS NetShareGetInfo(const char * server_name /* [in] */,
2355
const char * net_name /* [in] */,
2356
uint32_t level /* [in] */,
2357
uint8_t **buffer /* [out] [ref] */);
2359
/************************************************************//**
2363
* @brief Set Share Info
2365
* @param[in] server_name The server name to connect to
2366
* @param[in] net_name The name of the share to query
2367
* @param[in] level The level defining the SHARE_INFO_X structure
2368
* @param[in] buffer The buffer containing a SHARE_INFO_X structure
2369
* @param[out] parm_err The returned parameter error number if any
2370
* @return NET_API_STATUS
2372
* example share/share_setinfo.c
2373
***************************************************************/
2375
NET_API_STATUS NetShareSetInfo(const char * server_name /* [in] */,
2376
const char * net_name /* [in] */,
2377
uint32_t level /* [in] */,
2378
uint8_t *buffer /* [in] [ref] */,
2379
uint32_t *parm_err /* [out] [ref] */);
2381
/************************************************************//**
2385
* @brief Close a file
2387
* @param[in] server_name The server name to connect to
2388
* @param[in] fileid The fileid of the file that is going to be closed
2389
* @return NET_API_STATUS
2391
* example file/file_close.c
2392
***************************************************************/
2394
NET_API_STATUS NetFileClose(const char * server_name /* [in] */,
2395
uint32_t fileid /* [in] */);
2397
/************************************************************//**
2401
* @brief Close a file
2403
* @param[in] server_name The server name to connect to
2404
* @param[in] fileid The fileid of the file that is going to be closed
2405
* @param[in] level The level of the FILE_INFO_X buffer
2406
* @param[out] buffer The buffer containing a FILE_INFO_X structure
2407
* @return NET_API_STATUS
2409
* example file/file_getinfo.c
2410
***************************************************************/
2412
NET_API_STATUS NetFileGetInfo(const char * server_name /* [in] */,
2413
uint32_t fileid /* [in] */,
2414
uint32_t level /* [in] */,
2415
uint8_t **buffer /* [out] [ref] */);
2417
/************************************************************//**
2421
* @brief Enumerate Files
2423
* @param[in] server_name The server name to connect to
2424
* @param[in] base_path The
2425
* @param[in] user_name The
2426
* @param[in] level The level defining the FILE_INFO_X structure
2427
* @param[out] buffer The buffer containing a FILE_INFO_X structure
2428
* @param[in] prefmaxlen The requested maximal buffer size
2429
* @param[out] entries_read The number of FILE_INFO_X entries in the buffer
2430
* @param[out] total_entries The total number of FILE_INFO_X entries
2431
* @param[in,out] resume_handle A handle passed in and returned for resuming
2433
* @return NET_API_STATUS
2435
* example file/file_enum.c
2436
***************************************************************/
2438
NET_API_STATUS NetFileEnum(const char * server_name /* [in] */,
2439
const char * base_path /* [in] */,
2440
const char * user_name /* [in] */,
2441
uint32_t level /* [in] */,
2442
uint8_t **buffer /* [out] [ref] */,
2443
uint32_t prefmaxlen /* [in] */,
2444
uint32_t *entries_read /* [out] [ref] */,
2445
uint32_t *total_entries /* [out] [ref] */,
2446
uint32_t *resume_handle /* [in,out] [ref] */);
2448
/************************************************************//**
2452
* @brief Start a machine shutdown
2454
* @param[in] server_name The server name to connect to
2455
* @param[in] message The message that is displayed before the shutdown
2456
* @param[in] timeout The amount of seconds to wait until shutting down
2457
* @param[in] force_apps Whether to close all applications before the shutdown
2458
* @param[in] do_reboot Whether to reboot after the shutdown
2459
* @return NET_API_STATUS
2461
* example shutdown/shutdown_init.c
2462
***************************************************************/
2464
NET_API_STATUS NetShutdownInit(const char * server_name /* [in] */,
2465
const char * message /* [in] */,
2466
uint32_t timeout /* [in] */,
2467
uint8_t force_apps /* [in] */,
2468
uint8_t do_reboot /* [in] */);
2470
/************************************************************//**
2474
* @brief Abort an initiated machine shutdown
2476
* @param[in] server_name The server name to connect to
2477
* @return NET_API_STATUS
2479
* example shutdown/shutdown_abort.c
2480
***************************************************************/
2482
NET_API_STATUS NetShutdownAbort(const char * server_name /* [in] */);
2486
#endif /* __cplusplus */
2488
#endif /* __LIB_NETAPI_H__ */