Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

931 lines
33 KiB

  1. /********************************************************************/
  2. /** Microsoft Windows **/
  3. /** Copyright(c) Microsoft Corp., 1994 **/
  4. /********************************************************************/
  5. /********************************************************************
  6. * *
  7. * About this file ... SVRAPI.H *
  8. * *
  9. * This file contains information about the NetAccess, *
  10. * NetConnection, NetFile, NetServer, NetSession and NetShare APIs.*
  11. * There is a section for each set of APIs. *
  12. * Each section contains: *
  13. * *
  14. * Function prototypes. *
  15. * *
  16. * Data structure templates. *
  17. * *
  18. * Definition of special values. *
  19. * *
  20. ********************************************************************/
  21. /*
  22. * NOTE: Lengths of ASCIIZ strings are given as the maximum
  23. * strlen() value. This does not include space for the
  24. * terminating 0-byte. When allocating space for such an item,
  25. * use the form:
  26. *
  27. * char username[LM20_UNLEN+1];
  28. *
  29. * An exception to this is the PATHLEN manifest, which does
  30. * include space for the terminating 0-byte.
  31. */
  32. /*NOINC*/
  33. #ifndef SVRAPI_INCLUDED
  34. #define SVRAPI_INCLUDED
  35. #include <lmcons.h>
  36. #include <lmerr.h>
  37. #ifndef RC_INVOKED
  38. #pragma pack(1) /* Assume byte packing throughout */
  39. #endif
  40. #ifdef __cplusplus
  41. extern "C" { /* Assume C declarations for C++ */
  42. #endif /* __cplusplus */
  43. #if !defined(_SVRAPI_)
  44. #define API_FUNCTION DECLSPEC_IMPORT API_RET_TYPE APIENTRY
  45. #else
  46. #define API_FUNCTION API_RET_TYPE APIENTRY
  47. #endif
  48. /*INC*/
  49. /****************************************************************
  50. * *
  51. * Access Class *
  52. * *
  53. ****************************************************************/
  54. /****************************************************************
  55. * *
  56. * Function prototypes - ACCESS *
  57. * *
  58. ****************************************************************/
  59. extern API_FUNCTION
  60. NetAccessAdd ( const char FAR * pszServer,
  61. short sLevel,
  62. char FAR * pbBuffer,
  63. unsigned short cbBuffer );
  64. extern API_FUNCTION
  65. NetAccessCheck ( char FAR * pszReserved,
  66. char FAR * pszUserName,
  67. char FAR * pszResource,
  68. unsigned short usOperation,
  69. unsigned short FAR * pusResult );
  70. extern API_FUNCTION
  71. NetAccessDel ( const char FAR * pszServer,
  72. char FAR * pszResource );
  73. extern API_FUNCTION
  74. NetAccessEnum ( const char FAR * pszServer,
  75. char FAR * pszBasePath,
  76. short fsRecursive,
  77. short sLevel,
  78. char FAR * pbBuffer,
  79. unsigned short cbBuffer,
  80. unsigned short FAR * pcEntriesRead,
  81. unsigned short FAR * pcTotalAvail );
  82. extern API_FUNCTION
  83. NetAccessGetInfo ( const char FAR * pszServer,
  84. char FAR * pszResource,
  85. short sLevel,
  86. char FAR * pbBuffer,
  87. unsigned short cbBuffer,
  88. unsigned short FAR * pcbTotalAvail );
  89. extern API_FUNCTION
  90. NetAccessSetInfo ( const char FAR * pszServer,
  91. char FAR * pszResource,
  92. short sLevel,
  93. char FAR * pbBuffer,
  94. unsigned short cbBuffer,
  95. short sParmNum );
  96. extern API_FUNCTION
  97. NetAccessGetUserPerms ( char FAR * pszServer,
  98. char FAR * pszUgName,
  99. char FAR * pszResource,
  100. unsigned short FAR * pusPerms );
  101. /****************************************************************
  102. * *
  103. * Data structure templates - ACCESS *
  104. * *
  105. ****************************************************************/
  106. struct access_list {
  107. char acl_ugname[LM20_UNLEN+1];
  108. char acl_ugname_pad_1;
  109. short acl_access;
  110. }; /* access_list */
  111. struct access_list_2
  112. {
  113. char FAR * acl2_ugname;
  114. unsigned short acl2_access;
  115. }; /* access_list_2 */
  116. struct access_list_12
  117. {
  118. char FAR * acl12_ugname;
  119. unsigned short acl12_access;
  120. }; /* access_list_12 */
  121. struct access_info_0 {
  122. char FAR * acc0_resource_name;
  123. }; /* access_info_0 */
  124. struct access_info_1 {
  125. char FAR * acc1_resource_name;
  126. short acc1_attr; /* See values below */
  127. short acc1_count;
  128. }; /* access_info_1 */
  129. struct access_info_2
  130. {
  131. char FAR * acc2_resource_name;
  132. short acc2_attr;
  133. short acc2_count;
  134. }; /* access_info_2 */
  135. struct access_info_10 {
  136. char FAR * acc10_resource_name;
  137. }; /* access_info_10 */
  138. struct access_info_12
  139. {
  140. char FAR * acc12_resource_name;
  141. short acc12_attr;
  142. short acc12_count;
  143. }; /* access_info_12 */
  144. /****************************************************************
  145. * *
  146. * Special values and constants - ACCESS *
  147. * *
  148. ****************************************************************/
  149. /*
  150. * Maximum number of permission entries for each resource.
  151. */
  152. #define MAXPERMENTRIES 64
  153. /*
  154. * Bit values for the access permissions. ACCESS_ALL is a handy
  155. * way to specify maximum permissions. These are used in
  156. * acl_access field of access_list structures.
  157. */
  158. /*NOINC*/
  159. #define ACCESS_NONE 0
  160. /*INC*/
  161. #define ACCESS_DELETE 0x10
  162. #define ACCESS_ATRIB 0x20
  163. #define ACCESS_PERM 0x40
  164. #define ACCESS_FINDFIRST 0x80
  165. #define ACCESS_GROUP 0x8000
  166. /*
  167. * Bit values for the acc1_attr field of the access_info_1 structure.
  168. * Only one bit is currently defined.
  169. */
  170. #define ACCESS_AUDIT 0x1
  171. /*
  172. * Parmnum value for NetAccessSetInfo.
  173. */
  174. #define ACCESS_ATTR_PARMNUM 2
  175. /*
  176. * ACCESS_LETTERS defines a letter for each bit position in
  177. * the acl_access field of struct access_list. Note that some
  178. * bits have a corresponding letter of ' ' (space).
  179. */
  180. #define ACCESS_LETTERS "RWCXDAP "
  181. /****************************************************************
  182. * *
  183. * Share Class *
  184. * *
  185. ****************************************************************/
  186. /****************************************************************
  187. * *
  188. * Function prototypes - SHARE *
  189. * *
  190. ****************************************************************/
  191. extern API_FUNCTION
  192. NetShareAdd ( const char FAR * pszServer,
  193. short sLevel,
  194. const char FAR * pbBuffer,
  195. unsigned short cbBuffer );
  196. extern API_FUNCTION
  197. NetShareDel ( const char FAR * pszServer,
  198. const char FAR * pszNetName,
  199. unsigned short usReserved );
  200. extern API_FUNCTION
  201. NetShareEnum ( const char FAR * pszServer,
  202. short sLevel,
  203. char FAR * pbBuffer,
  204. unsigned short cbBuffer,
  205. unsigned short FAR * pcEntriesRead,
  206. unsigned short FAR * pcTotalAvail );
  207. extern API_FUNCTION
  208. NetShareGetInfo ( const char FAR * pszServer,
  209. const char FAR * pszNetName,
  210. short sLevel,
  211. char FAR * pbBuffer,
  212. unsigned short cbBuffer,
  213. unsigned short FAR * pcbTotalAvail );
  214. extern API_FUNCTION
  215. NetShareSetInfo ( const char FAR * pszServer,
  216. const char FAR * pszNetName,
  217. short sLevel,
  218. const char FAR * pbBuffer,
  219. unsigned short cbBuffer,
  220. short sParmNum );
  221. /****************************************************************
  222. * *
  223. * Data structure templates - SHARE *
  224. * *
  225. ****************************************************************/
  226. struct share_info_0 {
  227. char shi0_netname[LM20_NNLEN+1];
  228. }; /* share_info_0 */
  229. struct share_info_1 {
  230. char shi1_netname[LM20_NNLEN+1];
  231. char shi1_pad1;
  232. unsigned short shi1_type;
  233. char FAR * shi1_remark;
  234. }; /* share_info_1 */
  235. struct share_info_2 {
  236. char shi2_netname[LM20_NNLEN+1];
  237. char shi2_pad1;
  238. unsigned short shi2_type;
  239. char FAR * shi2_remark;
  240. unsigned short shi2_permissions;
  241. unsigned short shi2_max_uses;
  242. unsigned short shi2_current_uses;
  243. char FAR * shi2_path;
  244. char shi2_passwd[SHPWLEN+1];
  245. char shi2_pad2;
  246. }; /* share_info_2 */
  247. struct share_info_50 {
  248. char shi50_netname[LM20_NNLEN+1];
  249. unsigned char shi50_type;
  250. unsigned short shi50_flags;
  251. char FAR * shi50_remark;
  252. char FAR * shi50_path;
  253. char shi50_rw_password[SHPWLEN+1];
  254. char shi50_ro_password[SHPWLEN+1];
  255. }; /* share_info_50 */
  256. /****************************************************************
  257. * *
  258. * Special values and constants - SHARE *
  259. * *
  260. ****************************************************************/
  261. /* Field values for shi50_flags; */
  262. #define SHI50F_RDONLY 0x0001
  263. #define SHI50F_FULL 0x0002
  264. #define SHI50F_DEPENDSON (SHI50F_RDONLY|SHI50F_FULL)
  265. #define SHI50F_ACCESSMASK (SHI50F_RDONLY|SHI50F_FULL)
  266. #define SHI50F_PERSIST 0x0100
  267. #define SHI50F_SYSTEM 0x0200
  268. /*
  269. * Values for parmnum parameter to NetShareSetInfo.
  270. */
  271. #define SHI_REMARK_PARMNUM 4
  272. #define SHI_PERMISSIONS_PARMNUM 5
  273. #define SHI_MAX_USES_PARMNUM 6
  274. #define SHI_PASSWD_PARMNUM 9
  275. #define SHI1_NUM_ELEMENTS 4
  276. #define SHI2_NUM_ELEMENTS 10
  277. /*
  278. * Share types (shi1_type and shi2_type fields).
  279. */
  280. #define STYPE_DISKTREE 0
  281. #define STYPE_PRINTQ 1
  282. #define STYPE_DEVICE 2
  283. #define STYPE_IPC 3
  284. #define SHI_USES_UNLIMITED -1
  285. /****************************************************************
  286. * *
  287. * Session Class *
  288. * *
  289. ****************************************************************/
  290. /****************************************************************
  291. * *
  292. * Function prototypes - SESSION *
  293. * *
  294. ****************************************************************/
  295. extern API_FUNCTION
  296. NetSessionDel ( const char FAR * pszServer,
  297. const char FAR * pszClientName,
  298. short sReserved );
  299. extern API_FUNCTION
  300. NetSessionEnum ( const char FAR * pszServer,
  301. short sLevel,
  302. char FAR * pbBuffer,
  303. unsigned short cbBuffer,
  304. unsigned short FAR * pcEntriesRead,
  305. unsigned short FAR * pcTotalAvail );
  306. extern API_FUNCTION
  307. NetSessionGetInfo ( const char FAR * pszServer,
  308. const char FAR * pszClientName,
  309. short sLevel,
  310. char FAR * pbBuffer,
  311. unsigned short cbBuffer,
  312. unsigned short FAR * pcbTotalAvail );
  313. /****************************************************************
  314. * *
  315. * Data structure templates - SESSION *
  316. * *
  317. ****************************************************************/
  318. struct session_info_0 {
  319. char FAR * sesi0_cname;
  320. }; /* session_info_0 */
  321. struct session_info_1 {
  322. char FAR * sesi1_cname;
  323. char FAR * sesi1_username;
  324. unsigned short sesi1_num_conns;
  325. unsigned short sesi1_num_opens;
  326. unsigned short sesi1_num_users;
  327. unsigned long sesi1_time;
  328. unsigned long sesi1_idle_time;
  329. unsigned long sesi1_user_flags;
  330. }; /* session_info_1 */
  331. struct session_info_2 {
  332. char FAR * sesi2_cname;
  333. char FAR * sesi2_username;
  334. unsigned short sesi2_num_conns;
  335. unsigned short sesi2_num_opens;
  336. unsigned short sesi2_num_users;
  337. unsigned long sesi2_time;
  338. unsigned long sesi2_idle_time;
  339. unsigned long sesi2_user_flags;
  340. char FAR * sesi2_cltype_name;
  341. }; /* session_info_2 */
  342. struct session_info_10 {
  343. char FAR * sesi10_cname;
  344. char FAR * sesi10_username;
  345. unsigned long sesi10_time;
  346. unsigned long sesi10_idle_time;
  347. }; /* session_info_10 */
  348. struct session_info_50 {
  349. char FAR * sesi50_cname;
  350. char FAR * sesi50_username;
  351. unsigned long sesi50_key;
  352. unsigned short sesi50_num_conns;
  353. unsigned short sesi50_num_opens;
  354. unsigned long sesi50_time;
  355. unsigned long sesi50_idle_time;
  356. unsigned char sesi50_protocol;
  357. unsigned char pad1;
  358. }; /* session_info_50 */
  359. /****************************************************************
  360. * *
  361. * Special values and constants - SESSION *
  362. * *
  363. ****************************************************************/
  364. /*
  365. * Bits defined in sesi1_user_flags.
  366. */
  367. #define SESS_GUEST 1 /* session is logged on as a guest */
  368. #define SESS_NOENCRYPTION 2 /* session is not using encryption */
  369. #define SESI1_NUM_ELEMENTS 8
  370. #define SESI2_NUM_ELEMENTS 9
  371. /****************************************************************
  372. * *
  373. * Connection Class *
  374. * *
  375. ****************************************************************/
  376. /****************************************************************
  377. * *
  378. * Function prototypes - CONNECTION *
  379. * *
  380. ****************************************************************/
  381. extern API_FUNCTION
  382. NetConnectionEnum ( const char FAR * pszServer,
  383. const char FAR * pszQualifier,
  384. short sLevel,
  385. char FAR * pbBuffer,
  386. unsigned short cbBuffer,
  387. unsigned short FAR * pcEntriesRead,
  388. unsigned short FAR * pcTotalAvail );
  389. /****************************************************************
  390. * *
  391. * Data structure templates - CONNECTION *
  392. * *
  393. ****************************************************************/
  394. struct connection_info_0 {
  395. unsigned short coni0_id;
  396. }; /* connection_info_0 */
  397. struct connection_info_1 {
  398. unsigned short coni1_id;
  399. unsigned short coni1_type;
  400. unsigned short coni1_num_opens;
  401. unsigned short coni1_num_users;
  402. unsigned long coni1_time;
  403. char FAR * coni1_username;
  404. char FAR * coni1_netname;
  405. }; /* connection_info_1 */
  406. struct connection_info_50 {
  407. unsigned short coni50_type;
  408. unsigned short coni50_num_opens;
  409. unsigned long coni50_time;
  410. char FAR * coni50_netname;
  411. char FAR * coni50_username;
  412. }; /* connection_info_50 */
  413. /****************************************************************
  414. * *
  415. * File Class *
  416. * *
  417. ****************************************************************/
  418. /****************************************************************
  419. * *
  420. * Function prototypes - FILE *
  421. * *
  422. ****************************************************************/
  423. extern API_FUNCTION
  424. NetFileClose2 ( const char FAR * pszServer,
  425. unsigned long ulFileId );
  426. extern API_FUNCTION
  427. NetFileEnum ( const char FAR * pszServer,
  428. const char FAR * pszBasePath,
  429. short sLevel,
  430. char FAR * pbBuffer,
  431. unsigned short cbBuffer,
  432. unsigned short FAR * pcEntriesRead,
  433. unsigned short FAR * pcTotalAvail );
  434. /****************************************************************
  435. * *
  436. * Data structure templates - FILE *
  437. * *
  438. ****************************************************************/
  439. struct file_info_0 {
  440. unsigned short fi0_id;
  441. }; /* file_info_0 */
  442. struct file_info_1 {
  443. unsigned short fi1_id;
  444. unsigned short fi1_permissions;
  445. unsigned short fi1_num_locks;
  446. char FAR * fi1_pathname;
  447. char FAR * fi1_username;
  448. }; /* file_info_1 */
  449. struct file_info_2 {
  450. unsigned long fi2_id;
  451. }; /* file_info_2 */
  452. struct file_info_3 {
  453. unsigned long fi3_id;
  454. unsigned short fi3_permissions;
  455. unsigned short fi3_num_locks;
  456. char FAR * fi3_pathname;
  457. char FAR * fi3_username;
  458. }; /* file_info_3 */
  459. struct file_info_50 {
  460. unsigned long fi50_id;
  461. unsigned short fi50_permissions;
  462. unsigned short fi50_num_locks;
  463. char FAR * fi50_pathname;
  464. char FAR * fi50_username;
  465. char FAR * fi50_sharename;
  466. }; /* file_info_50 */
  467. struct res_file_enum_2 {
  468. unsigned short res_pad; /* not used now */
  469. unsigned short res_fs; /* server type */
  470. unsigned long res_pro; /* progressive */
  471. }; /* res_file_enum_2 */
  472. /****************************************************************
  473. * *
  474. * Special values and constants - FILE *
  475. * *
  476. ****************************************************************/
  477. /* bit values for permissions */
  478. #define PERM_FILE_READ 0x1 /* user has read access */
  479. #define PERM_FILE_WRITE 0x2 /* user has write access */
  480. #define PERM_FILE_CREATE 0x4 /* user has create access */
  481. typedef struct res_file_enum_2 FRK;
  482. /*NOINC*/
  483. #define FRK_INIT( f ) \
  484. { \
  485. (f).res_pad = 0L; \
  486. (f).res_fs = 0; \
  487. (f).res_pro = 0; \
  488. }
  489. /*INC*/
  490. /****************************************************************
  491. * *
  492. * Server Class *
  493. * *
  494. ****************************************************************/
  495. /****************************************************************
  496. * *
  497. * Function prototypes - SERVER *
  498. * *
  499. ****************************************************************/
  500. extern API_FUNCTION
  501. NetServerGetInfo ( const char FAR * pszServer,
  502. short sLevel,
  503. char FAR * pbBuffer,
  504. unsigned short cbBuffer,
  505. unsigned short FAR * pcbTotalAvail );
  506. extern API_FUNCTION
  507. NetServerSetInfo ( const char FAR * pszServer,
  508. short sLevel,
  509. const char FAR * pbBuffer,
  510. unsigned short cbBuffer,
  511. short sParmNum );
  512. /****************************************************************
  513. * *
  514. * Data structure templates - SERVER *
  515. * *
  516. ****************************************************************/
  517. struct server_info_0 {
  518. char sv0_name[CNLEN + 1]; /* Server name */
  519. }; /* server_info_0 */
  520. struct server_info_1 {
  521. char sv1_name[CNLEN + 1];
  522. unsigned char sv1_version_major; /* Major version # of net */
  523. unsigned char sv1_version_minor; /* Minor version # of net */
  524. unsigned long sv1_type; /* Server type */
  525. char FAR * sv1_comment; /* Exported server comment */
  526. }; /* server_info_1 */
  527. /* NOTE struct prefix must equal server_info_1 like below! */
  528. struct server_info_50 {
  529. char sv50_name[CNLEN + 1];
  530. unsigned char sv50_version_major; /* Major version # of net */
  531. unsigned char sv50_version_minor; /* Minor version # of net */
  532. unsigned long sv50_type; /* Server type */
  533. char FAR * sv50_comment; /* Exported server comment */
  534. unsigned short sv50_security; /* SV_SECURITY_* (see below) */
  535. unsigned short sv50_auditing; /* 0 = no auditing; nonzero = auditing */
  536. char FAR * sv50_container; /* Security server/domain */
  537. char FAR * sv50_ab_server; /* Address book server */
  538. char FAR * sv50_ab_dll; /* Address book provider DLL */
  539. }; /* server_info_50 */
  540. struct server_info_2 {
  541. char sv2_name[CNLEN + 1];
  542. unsigned char sv2_version_major;
  543. unsigned char sv2_version_minor;
  544. unsigned long sv2_type;
  545. char FAR * sv2_comment;
  546. unsigned long sv2_ulist_mtime; /* User list, last modification time */
  547. unsigned long sv2_glist_mtime; /* Group list, last modification time */
  548. unsigned long sv2_alist_mtime; /* Access list, last modification time */
  549. unsigned short sv2_users; /* max number of users allowed */
  550. unsigned short sv2_disc; /* auto-disconnect timeout(in minutes) */
  551. char FAR * sv2_alerts; /* alert names (semicolon separated) */
  552. unsigned short sv2_security; /* SV_USERSECURITY or SV_SHARESECURITY */
  553. unsigned short sv2_auditing; /* 0 = no auditing; nonzero = auditing */
  554. unsigned short sv2_numadmin; /* max number of administrators allowed */
  555. unsigned short sv2_lanmask; /* bit mask representing the srv'd nets */
  556. unsigned short sv2_hidden; /* 0 = visible; nonzero = hidden */
  557. unsigned short sv2_announce; /* visible server announce rate (sec) */
  558. unsigned short sv2_anndelta; /* announce randomize interval (sec) */
  559. /* name of guest account */
  560. char sv2_guestacct[LM20_UNLEN + 1];
  561. unsigned char sv2_pad1; /* Word alignment pad byte */
  562. char FAR * sv2_userpath; /* ASCIIZ path to user directories */
  563. unsigned short sv2_chdevs; /* max # shared character devices */
  564. unsigned short sv2_chdevq; /* max # character device queues */
  565. unsigned short sv2_chdevjobs; /* max # character device jobs */
  566. unsigned short sv2_connections; /* max # of connections */
  567. unsigned short sv2_shares; /* max # of shares */
  568. unsigned short sv2_openfiles; /* max # of open files */
  569. unsigned short sv2_sessopens; /* max # of open files per session */
  570. unsigned short sv2_sessvcs; /* max # of virtual circuits per client */
  571. unsigned short sv2_sessreqs; /* max # of simul. reqs. from a client */
  572. unsigned short sv2_opensearch; /* max # of open searches */
  573. unsigned short sv2_activelocks; /* max # of active file locks */
  574. unsigned short sv2_numreqbuf; /* number of server (standard) buffers */
  575. unsigned short sv2_sizreqbuf; /* size of svr (standard) bufs (bytes) */
  576. unsigned short sv2_numbigbuf; /* number of big (64K) buffers */
  577. unsigned short sv2_numfiletasks;/* number of file worker processes */
  578. unsigned short sv2_alertsched; /* alert counting interval (minutes) */
  579. unsigned short sv2_erroralert; /* error log alerting threshold */
  580. unsigned short sv2_logonalert; /* logon violation alerting threshold */
  581. unsigned short sv2_accessalert; /* access violation alerting threshold */
  582. unsigned short sv2_diskalert; /* low disk space alert threshold (KB) */
  583. unsigned short sv2_netioalert; /* net I/O error ratio alert threshold */
  584. /* (tenths of a percent) */
  585. unsigned short sv2_maxauditsz; /* Maximum audit file size (KB) */
  586. char FAR * sv2_srvheuristics; /* performance related server switches*/
  587. }; /* server_info_2 */
  588. struct server_info_3 {
  589. char sv3_name[CNLEN + 1];
  590. unsigned char sv3_version_major;
  591. unsigned char sv3_version_minor;
  592. unsigned long sv3_type;
  593. char FAR * sv3_comment;
  594. unsigned long sv3_ulist_mtime; /* User list, last modification time */
  595. unsigned long sv3_glist_mtime; /* Group list, last modification time */
  596. unsigned long sv3_alist_mtime; /* Access list, last modification time */
  597. unsigned short sv3_users; /* max number of users allowed */
  598. unsigned short sv3_disc; /* auto-disconnect timeout(in minutes) */
  599. char FAR * sv3_alerts; /* alert names (semicolon separated) */
  600. unsigned short sv3_security; /* SV_USERSECURITY or SV_SHARESECURITY */
  601. unsigned short sv3_auditing; /* 0 = no auditing; nonzero = auditing */
  602. unsigned short sv3_numadmin; /* max number of administrators allowed */
  603. unsigned short sv3_lanmask; /* bit mask representing the srv'd nets */
  604. unsigned short sv3_hidden; /* 0 = visible; nonzero = hidden */
  605. unsigned short sv3_announce; /* visible server announce rate (sec) */
  606. unsigned short sv3_anndelta; /* announce randomize interval (sec) */
  607. /* name of guest account */
  608. char sv3_guestacct[LM20_UNLEN + 1];
  609. unsigned char sv3_pad1; /* Word alignment pad byte */
  610. char FAR * sv3_userpath; /* ASCIIZ path to user directories */
  611. unsigned short sv3_chdevs; /* max # shared character devices */
  612. unsigned short sv3_chdevq; /* max # character device queues */
  613. unsigned short sv3_chdevjobs; /* max # character device jobs */
  614. unsigned short sv3_connections; /* max # of connections */
  615. unsigned short sv3_shares; /* max # of shares */
  616. unsigned short sv3_openfiles; /* max # of open files */
  617. unsigned short sv3_sessopens; /* max # of open files per session */
  618. unsigned short sv3_sessvcs; /* max # of virtual circuits per client */
  619. unsigned short sv3_sessreqs; /* max # of simul. reqs. from a client */
  620. unsigned short sv3_opensearch; /* max # of open searches */
  621. unsigned short sv3_activelocks; /* max # of active file locks */
  622. unsigned short sv3_numreqbuf; /* number of server (standard) buffers */
  623. unsigned short sv3_sizreqbuf; /* size of svr (standard) bufs (bytes) */
  624. unsigned short sv3_numbigbuf; /* number of big (64K) buffers */
  625. unsigned short sv3_numfiletasks;/* number of file worker processes */
  626. unsigned short sv3_alertsched; /* alert counting interval (minutes) */
  627. unsigned short sv3_erroralert; /* error log alerting threshold */
  628. unsigned short sv3_logonalert; /* logon violation alerting threshold */
  629. unsigned short sv3_accessalert; /* access violation alerting threshold */
  630. unsigned short sv3_diskalert; /* low disk space alert threshold (KB) */
  631. unsigned short sv3_netioalert; /* net I/O error ratio alert threshold */
  632. /* (tenths of a percent) */
  633. unsigned short sv3_maxauditsz; /* Maximum audit file size (KB) */
  634. char FAR * sv3_srvheuristics; /* performance related server switches*/
  635. unsigned long sv3_auditedevents; /* Audit event control mask */
  636. unsigned short sv3_autoprofile; /* (0,1,2,3) = (NONE,LOAD,SAVE,or BOTH) */
  637. char FAR * sv3_autopath; /* file pathname (where to load & save) */
  638. }; /* server_info_3 */
  639. /****************************************************************
  640. * *
  641. * Special values and constants - SERVER *
  642. * *
  643. ****************************************************************/
  644. /*
  645. * Mask to be applied to svX_version_major in order to obtain
  646. * the major version number.
  647. */
  648. #define MAJOR_VERSION_MASK 0x0F
  649. /*
  650. * Bit-mapped values for svX_type fields. X = 1, 2 or 3.
  651. */
  652. #define SV_TYPE_WORKSTATION 0x00000001
  653. #define SV_TYPE_SERVER 0x00000002
  654. #define SV_TYPE_SQLSERVER 0x00000004
  655. #define SV_TYPE_DOMAIN_CTRL 0x00000008
  656. #define SV_TYPE_DOMAIN_BAKCTRL 0x00000010
  657. #define SV_TYPE_TIME_SOURCE 0x00000020
  658. #define SV_TYPE_AFP 0x00000040
  659. #define SV_TYPE_NOVELL 0x00000080
  660. #define SV_TYPE_DOMAIN_MEMBER 0x00000100
  661. #define SV_TYPE_PRINTQ_SERVER 0x00000200
  662. #define SV_TYPE_DIALIN_SERVER 0x00000400
  663. #define SV_TYPE_ALL 0xFFFFFFFF /* handy for NetServerEnum2 */
  664. /*
  665. * Values of svX_security field. X = 2 or 3.
  666. */
  667. #define SV_USERSECURITY 1
  668. #define SV_SHARESECURITY 0
  669. /*
  670. * Values of svX_security field. X = 50.
  671. */
  672. #define SV_SECURITY_SHARE 0 /* Share-level */
  673. #define SV_SECURITY_WINNT 1 /* User-level - Windows NT workst'n */
  674. #define SV_SECURITY_WINNTAS 2 /* User-level - Windows NT domain */
  675. #define SV_SECURITY_NETWARE 3 /* User-level - NetWare 3.x bindery */
  676. /*
  677. * Values of svX_hidden field. X = 2 or 3.
  678. */
  679. #define SV_HIDDEN 1
  680. #define SV_VISIBLE 0
  681. /*
  682. * Values for parmnum parameter to NetServerSetInfo.
  683. */
  684. #define SV_COMMENT_PARMNUM 5
  685. #define SV_DISC_PARMNUM 10
  686. #define SV_ALERTS_PARMNUM 11
  687. #define SV_HIDDEN_PARMNUM 16
  688. #define SV_ANNOUNCE_PARMNUM 17
  689. #define SV_ANNDELTA_PARMNUM 18
  690. #define SV_ALERTSCHED_PARMNUM 37
  691. #define SV_ERRORALERT_PARMNUM 38
  692. #define SV_LOGONALERT_PARMNUM 39
  693. #define SV_ACCESSALERT_PARMNUM 40
  694. #define SV_DISKALERT_PARMNUM 41
  695. #define SV_NETIOALERT_PARMNUM 42
  696. #define SV_MAXAUDITSZ_PARMNUM 43
  697. #define SVI1_NUM_ELEMENTS 5
  698. /*
  699. * Masks describing AUTOPROFILE parameters
  700. */
  701. #define SW_AUTOPROF_LOAD_MASK 0x1
  702. #define SW_AUTOPROF_SAVE_MASK 0x2
  703. /****************************************************************
  704. * *
  705. * Security Class *
  706. * *
  707. ****************************************************************/
  708. /****************************************************************
  709. * *
  710. * Function prototypes - SECURITY *
  711. * *
  712. ****************************************************************/
  713. extern API_FUNCTION
  714. NetSecurityGetInfo ( const char FAR * pszServer,
  715. short sLevel,
  716. char FAR * pbBuffer,
  717. unsigned short cbBuffer,
  718. unsigned short FAR * pcbTotalAvail );
  719. /****************************************************************
  720. * *
  721. * Data structure templates - SECURITY *
  722. * *
  723. ****************************************************************/
  724. struct security_info_1 {
  725. unsigned long sec1_security; /* SEC_SECURITY_* (see below) */
  726. char FAR * sec1_container; /* Security server/domain */
  727. char FAR * sec1_ab_server; /* Address book server */
  728. char FAR * sec1_ab_dll; /* Address book provider DLL */
  729. }; /* security_info_1 */
  730. /****************************************************************
  731. * *
  732. * Special values and constants - SECURITY *
  733. * *
  734. ****************************************************************/
  735. /*
  736. /*
  737. * Values of secX_security field. X = 1.
  738. */
  739. #define SEC_SECURITY_SHARE SV_SECURITY_SHARE
  740. #define SEC_SECURITY_WINNT SV_SECURITY_WINNT
  741. #define SEC_SECURITY_WINNTAS SV_SECURITY_WINNTAS
  742. #define SEC_SECURITY_NETWARE SV_SECURITY_NETWARE
  743. /*NOINC*/
  744. #ifdef __cplusplus
  745. }
  746. #endif /* __cplusplus */
  747. #ifndef RC_INVOKED
  748. #pragma pack() /* Revert to default packing */
  749. #endif
  750. #endif /* SVRAPI_INCLUDED */
  751. /*INC*/