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.

1282 lines
43 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. inetinfo.h
  5. Abstract:
  6. This file contains the internet info server admin APIs.
  7. Author:
  8. Madan Appiah (madana) 10-Oct-1995
  9. Revision History:
  10. Madana 10-Oct-1995 Made a new copy for product split from inetasrv.h
  11. MuraliK 12-Oct-1995 Fixes to support product split
  12. MuraliK 15-Nov-1995 Support Wide Char interface names
  13. --*/
  14. #ifndef _INETINFO_H_
  15. #define _INETINFO_H_
  16. # include "inetcom.h"
  17. # include "iiscnfg.h"
  18. #ifdef __cplusplus
  19. extern "C"
  20. {
  21. #endif // _cplusplus
  22. /************************************************************
  23. * Symbolic Constants
  24. ************************************************************/
  25. //
  26. // The total number of instances of common services using the commong
  27. // service counters
  28. //
  29. #define MAX_PERF_CTR_SVCS 3
  30. #define LAST_PERF_CTR_SVC INET_HTTP_SVC_ID
  31. #ifndef NO_AUX_PERF
  32. #ifndef MAX_AUX_PERF_COUNTERS
  33. #define MAX_AUX_PERF_COUNTERS (20)
  34. #endif // MAX_AUX_PERF_COUNTERS
  35. #endif // NO_AUX_PERF
  36. //
  37. // Service name.
  38. //
  39. #ifndef _EXEXPRESS
  40. #define INET_INFO_SERVICE_NAME TEXT("INETINFO")
  41. #define INET_INFO_SERVICE_NAME_A "INETINFO"
  42. #define INET_INFO_SERVICE_NAME_W L"INETINFO"
  43. #else
  44. #define INET_INFO_SERVICE_NAME TEXT("KNETINFO")
  45. #define INET_INFO_SERVICE_NAME_A "KNETINFO"
  46. #define INET_INFO_SERVICE_NAME_W L"KNETINFO"
  47. #define inetinfo_ServerIfHandle knetinfo_ServerIfHandle
  48. #endif
  49. //
  50. // IIS Version number
  51. //
  52. #define IIS_VERSION_MAJOR 5
  53. #define IIS_VERSION_MINOR 1
  54. #define IIS_SERVER_VERSION_MAJOR 6
  55. #define IIS_SERVER_VERSION_MINOR 0
  56. //
  57. // Configuration parameters registry key.
  58. //
  59. #define INET_INFO_KEY \
  60. TEXT("System\\CurrentControlSet\\Services\\InetInfo")
  61. #define INET_INFO_PARAMETERS_KEY \
  62. INET_INFO_KEY TEXT("\\Parameters")
  63. //
  64. // If this registry key exists under the W3Svc\Parameters key,
  65. // it is used to validate server access. Basically, all new users
  66. // must have sufficient privilege to open this key before they
  67. // may access the Server.
  68. //
  69. #define INET_INFO_ACCESS_KEY TEXT("AccessCheck")
  70. //
  71. // Special instances value
  72. //
  73. //
  74. // First instance of the service.
  75. //
  76. #define INET_INSTANCE_FIRST 0xf0000001
  77. //
  78. // None is used to support users of the old APIs where there was
  79. // no concept of an instance.
  80. //
  81. #define INET_INSTANCE_DOWNLEVEL 0xf0000002
  82. //
  83. // indicates the the request is for global data
  84. //
  85. #define INET_INSTANCE_GLOBAL 0xf0000003
  86. //
  87. // root instance is a special instance which is not active
  88. //
  89. #define INET_INSTANCE_ROOT 0
  90. #define INET_INSTANCE_ALL 0xffffffff
  91. #define INET_INSTANCE_MIN (1)
  92. #define INET_INSTANCE_MAX (0x7ffffffff)
  93. //
  94. // Authentication requirements values
  95. //
  96. #define INET_INFO_AUTH_ANONYMOUS MD_AUTH_ANONYMOUS
  97. #define INET_INFO_AUTH_CLEARTEXT MD_AUTH_BASIC
  98. #define INET_INFO_AUTH_NT_AUTH MD_AUTH_NT
  99. #define INET_INFO_AUTH_MD5_AUTH MD_AUTH_MD5
  100. #define INET_INFO_AUTH_MAPBASIC MD_AUTH_MAPBASIC
  101. #define INET_INFO_AUTH_W95_MASK INET_INFO_AUTH_ANONYMOUS
  102. //
  103. // Name of the LSA Secret Object containing the password for
  104. // anonymous logon.
  105. //
  106. #define INET_INFO_ANONYMOUS_SECRET TEXT("INET_INFO_ANONYMOUS_DATA")
  107. #define INET_INFO_ANONYMOUS_SECRET_A "INET_INFO_ANONYMOUS_DATA"
  108. #define INET_INFO_ANONYMOUS_SECRET_W L"INET_INFO_ANONYMOUS_DATA"
  109. /////////////////////////////////////////////////////////////////////////
  110. // //
  111. // Internet Server Common Definitions //
  112. // //
  113. /////////////////////////////////////////////////////////////////////////
  114. //
  115. // Client Interface Name for RPC connections over named pipes
  116. //
  117. # define INET_INFO_INTERFACE_NAME INET_INFO_SERVICE_NAME
  118. # define INET_INFO_NAMED_PIPE TEXT("\\PIPE\\") ## INET_INFO_INTERFACE_NAME
  119. # define INET_INFO_NAMED_PIPE_W L"\\PIPE\\" ## INET_INFO_SERVICE_NAME_W
  120. //
  121. // Field control values for the INET_INFO_CONFIG_INFO structure
  122. //
  123. #define FC_INET_INFO_CONNECTION_TIMEOUT ((FIELD_CONTROL)BitFlag(0))
  124. #define FC_INET_INFO_MAX_CONNECTIONS ((FIELD_CONTROL)BitFlag(1))
  125. #define FC_INET_INFO_LOG_CONFIG ((FIELD_CONTROL)BitFlag(2))
  126. #define FC_INET_INFO_ADMIN_NAME ((FIELD_CONTROL)BitFlag(3))
  127. #define FC_INET_INFO_SERVER_COMMENT ((FIELD_CONTROL)BitFlag(4))
  128. #define FC_INET_INFO_ADMIN_EMAIL ((FIELD_CONTROL)BitFlag(5))
  129. #define FC_INET_INFO_HOST_NAME ((FIELD_CONTROL)BitFlag(6))
  130. #define FC_INET_INFO_SERVER_SIZE ((FIELD_CONTROL)BitFlag(7))
  131. #define FC_INET_INFO_DEF_LOGON_DOMAIN ((FIELD_CONTROL)BitFlag(15))
  132. #define FC_INET_INFO_AUTHENTICATION ((FIELD_CONTROL)BitFlag(16))
  133. #define FC_INET_INFO_ALLOW_ANONYMOUS ((FIELD_CONTROL)BitFlag(17))
  134. #define FC_INET_INFO_LOG_ANONYMOUS ((FIELD_CONTROL)BitFlag(18))
  135. #define FC_INET_INFO_LOG_NONANONYMOUS ((FIELD_CONTROL)BitFlag(19))
  136. #define FC_INET_INFO_ANON_USER_NAME ((FIELD_CONTROL)BitFlag(20))
  137. #define FC_INET_INFO_ANON_PASSWORD ((FIELD_CONTROL)BitFlag(21))
  138. #define FC_INET_INFO_PORT_NUMBER ((FIELD_CONTROL)BitFlag(22))
  139. #define FC_INET_INFO_SITE_SECURITY ((FIELD_CONTROL)BitFlag(23))
  140. #define FC_INET_INFO_VIRTUAL_ROOTS ((FIELD_CONTROL)BitFlag(24))
  141. #define FC_INET_INFO_SECURE_PORT_NUMBER ((FIELD_CONTROL)BitFlag(25))
  142. #define FC_INET_INFO_SERVER_NAME ((FIELD_CONTROL)BitFlag(26))
  143. #define FC_INET_INFO_AUTO_START ((FIELD_CONTROL)BitFlag(27))
  144. #define FC_INET_INFO_ADDRESS_TYPE ((FIELD_CONTROL)BitFlag(28))
  145. #define FC_INET_INFO_IP_ADDRESS ((FIELD_CONTROL)BitFlag(29))
  146. // common parameters for publishing servers only
  147. # define FC_INET_INFO_ALL (FC_INET_INFO_CONNECTION_TIMEOUT |\
  148. FC_INET_INFO_MAX_CONNECTIONS |\
  149. FC_INET_INFO_LOG_CONFIG |\
  150. FC_INET_INFO_ADMIN_NAME |\
  151. FC_INET_INFO_SERVER_COMMENT |\
  152. FC_INET_INFO_ADMIN_EMAIL |\
  153. FC_INET_INFO_HOST_NAME |\
  154. FC_INET_INFO_SERVER_SIZE |\
  155. FC_INET_INFO_AUTHENTICATION |\
  156. FC_INET_INFO_ALLOW_ANONYMOUS |\
  157. FC_INET_INFO_LOG_ANONYMOUS |\
  158. FC_INET_INFO_LOG_NONANONYMOUS |\
  159. FC_INET_INFO_ANON_USER_NAME |\
  160. FC_INET_INFO_ANON_PASSWORD |\
  161. FC_INET_INFO_PORT_NUMBER |\
  162. FC_INET_INFO_SITE_SECURITY |\
  163. FC_INET_INFO_VIRTUAL_ROOTS |\
  164. FC_INET_INFO_SECURE_PORT_NUMBER |\
  165. FC_INET_INFO_SERVER_NAME |\
  166. FC_INET_INFO_AUTO_START |\
  167. FC_INET_INFO_ADDRESS_TYPE |\
  168. FC_INET_INFO_IP_ADDRESS |\
  169. FC_INET_INFO_DEF_LOGON_DOMAIN \
  170. )
  171. //
  172. // Virtual root access mask values
  173. //
  174. #define VROOT_MASK_READ MD_ACCESS_READ
  175. #define VROOT_MASK_WRITE MD_ACCESS_WRITE
  176. #define VROOT_MASK_EXECUTE MD_ACCESS_EXECUTE
  177. #define VROOT_MASK_READ_SOURCE MD_ACCESS_SOURCE
  178. #define VROOT_MASK_SSL MD_ACCESS_SSL
  179. #define VROOT_MASK_DONT_CACHE MD_ACCESS_DONT_CACHE
  180. #define VROOT_MASK_NEGO_CERT MD_ACCESS_NEGO_CERT
  181. #define VROOT_MASK_NEGO_MANDATORY MD_ACCESS_REQUIRE_CERT
  182. #define VROOT_MASK_MAP_CERT MD_ACCESS_MAP_CERT
  183. #define VROOT_MASK_SSL128 MD_ACCESS_SSL128
  184. #define VROOT_MASK_SCRIPT MD_ACCESS_SCRIPT
  185. #define VROOT_MASK_NO_REMOTE_READ MD_ACCESS_NO_REMOTE_READ
  186. #define VROOT_MASK_NO_REMOTE_WRITE MD_ACCESS_NO_REMOTE_WRITE
  187. #define VROOT_MASK_NO_REMOTE_EXECUTE MD_ACCESS_NO_REMOTE_EXECUTE
  188. #define VROOT_MASK_NO_REMOTE_SCRIPT MD_ACCESS_NO_REMOTE_SCRIPT
  189. #define VROOT_MASK_NO_PHYSICAL_DIR MD_ACCESS_NO_PHYSICAL_DIR
  190. #define VROOT_MASK_MASK MD_ACCESS_MASK
  191. //
  192. // INet admin API structures
  193. //
  194. typedef struct _INET_INFO_IP_SEC_ENTRY
  195. {
  196. DWORD dwMask; // Mask and network number in
  197. DWORD dwNetwork; // network order
  198. } INET_INFO_IP_SEC_ENTRY, *LPINET_INFO_IP_SEC_ENTRY;
  199. #pragma warning( disable:4200 ) // nonstandard ext. - zero sized array
  200. // (MIDL requires zero entries)
  201. typedef struct _INET_INFO_IP_SEC_LIST
  202. {
  203. DWORD cEntries;
  204. #ifdef MIDL_PASS
  205. [size_is( cEntries)]
  206. #endif
  207. INET_INFO_IP_SEC_ENTRY aIPSecEntry[];
  208. } INET_INFO_IP_SEC_LIST, *LPINET_INFO_IP_SEC_LIST;
  209. typedef struct _INET_INFO_SITE_ENTRY
  210. {
  211. LPWSTR pszComment; // Site Comment
  212. DWORD dwInstance; // Site Instance Number
  213. } INET_INFO_SITE_ENTRY, *LPINET_INFO_SITE_ENTRY;
  214. typedef struct _INET_INFO_SITE_LIST
  215. {
  216. DWORD cEntries;
  217. #ifdef MIDL_PASS
  218. [size_is( cEntries)]
  219. #endif
  220. INET_INFO_SITE_ENTRY aSiteEntry[];
  221. } INET_INFO_SITE_LIST, *LPINET_INFO_SITE_LIST;
  222. typedef struct _INET_INFO_VIRTUAL_ROOT_ENTRY
  223. {
  224. LPWSTR pszRoot; // Virtual root name
  225. LPWSTR pszAddress; // Optional IP address
  226. LPWSTR pszDirectory; // Physical direcotry
  227. DWORD dwMask; // Mask for this virtual root
  228. LPWSTR pszAccountName; // Account to connect as
  229. WCHAR AccountPassword[PWLEN+1]; // Password for pszAccountName
  230. DWORD dwError; // Error code if entry wasn't added
  231. // only used for gets
  232. } INET_INFO_VIRTUAL_ROOT_ENTRY, *LPINET_INFO_VIRTUAL_ROOT_ENTRY;
  233. typedef struct _INET_INFO_VIRTUAL_ROOT_LIST
  234. {
  235. DWORD cEntries;
  236. #ifdef MIDL_PASS
  237. [size_is( cEntries)]
  238. #endif
  239. INET_INFO_VIRTUAL_ROOT_ENTRY aVirtRootEntry[];
  240. } INET_INFO_VIRTUAL_ROOT_LIST, *LPINET_INFO_VIRTUAL_ROOT_LIST;
  241. //
  242. // Admin configuration information
  243. //
  244. typedef struct _INET_INFO_CONFIG_INFO
  245. {
  246. FIELD_CONTROL FieldControl;
  247. DWORD dwConnectionTimeout; // how long to hold connections
  248. DWORD dwMaxConnections; // max connections allowed
  249. LPWSTR lpszAdminName;
  250. LPWSTR lpszAdminEmail;
  251. LPWSTR lpszServerComment;
  252. LPINET_LOG_CONFIGURATION lpLogConfig;
  253. LANGID LangId; // These are read only
  254. LCID LocalId;
  255. BYTE ProductId[64];
  256. BOOL fLogAnonymous; // Log Anonymous users?
  257. BOOL fLogNonAnonymous; // Log Non anonymous users?
  258. LPWSTR lpszAnonUserName; // Anonymous user name?
  259. WCHAR szAnonPassword[PWLEN+1]; // Password for the anonymous user
  260. DWORD dwAuthentication; // What authentication is enabled?
  261. short sPort; // Port Number for service
  262. LPINET_INFO_IP_SEC_LIST DenyIPList; // Site security deny list
  263. LPINET_INFO_IP_SEC_LIST GrantIPList; // Site security grant list
  264. LPINET_INFO_VIRTUAL_ROOT_LIST VirtualRoots; // Symlinks to other data dirs
  265. } INET_INFO_CONFIG_INFO, * LPINET_INFO_CONFIG_INFO;
  266. /////////////////////////////////////////////////////////////////////////
  267. // //
  268. // Global Internet Server Definitions //
  269. // //
  270. /////////////////////////////////////////////////////////////////////////
  271. #define FC_GINET_INFO_BANDWIDTH_LEVEL ((FIELD_CONTROL)BitFlag(0))
  272. #define FC_GINET_INFO_MEMORY_CACHE_SIZE ((FIELD_CONTROL)BitFlag(1))
  273. #define FC_GINET_INFO_ALL \
  274. ( FC_GINET_INFO_BANDWIDTH_LEVEL | \
  275. FC_GINET_INFO_MEMORY_CACHE_SIZE | \
  276. 0 \
  277. )
  278. typedef struct _INET_INFO_GLOBAL_CONFIG_INFO
  279. {
  280. FIELD_CONTROL FieldControl;
  281. DWORD BandwidthLevel; // Bandwidth Level used.
  282. DWORD cbMemoryCacheSize;
  283. } INET_INFO_GLOBAL_CONFIG_INFO, * LPINET_INFO_GLOBAL_CONFIG_INFO;
  284. //
  285. // Global statistics
  286. //
  287. typedef struct _INET_INFO_STATISTICS_0
  288. {
  289. INETA_CACHE_STATISTICS CacheCtrs;
  290. INETA_ATQ_STATISTICS AtqCtrs;
  291. # ifndef NO_AUX_PERF
  292. DWORD nAuxCounters; // number of active counters in rgCounters
  293. DWORD rgCounters[MAX_AUX_PERF_COUNTERS];
  294. # endif // NO_AUX_PERF
  295. } INET_INFO_STATISTICS_0, * LPINET_INFO_STATISTICS_0;
  296. //
  297. // Capabilities Flags
  298. //
  299. typedef struct _INET_INFO_CAP_FLAGS {
  300. DWORD Flag; // Which capabilities are enabled
  301. DWORD Mask; // Which capabilities are supported
  302. } INET_INFO_CAP_FLAGS, * LPINET_INFO_CAP_FLAGS;
  303. //
  304. // Inet info server capabilities
  305. //
  306. typedef struct _INET_INFO_CAPABILITIES {
  307. DWORD CapVersion; // Version number of this structure
  308. DWORD ProductType; // Product type
  309. DWORD MajorVersion; // Major version number
  310. DWORD MinorVersion; // Minor Version number
  311. DWORD BuildNumber; // Build number
  312. DWORD NumCapFlags; // Number of capabilities structures
  313. LPINET_INFO_CAP_FLAGS CapFlags;
  314. } INET_INFO_CAPABILITIES, * LPINET_INFO_CAPABILITIES;
  315. //
  316. // Location of FrontPage web registry settings if installed
  317. //
  318. #define REG_FP_PATH "Software\\Microsoft\\FrontPage\\3.0"
  319. //
  320. // Product type
  321. //
  322. #define INET_INFO_PRODUCT_NTSERVER 0x00000001
  323. #define INET_INFO_PRODUCT_NTWKSTA 0x00000002
  324. #define INET_INFO_PRODUCT_WINDOWS95 0x00000003
  325. #define INET_INFO_PRODUCT_UNKNOWN 0xffffffff
  326. //
  327. // Settable server capabilities
  328. //
  329. #define IIS_CAP1_ODBC_LOGGING 0x00000001
  330. #define IIS_CAP1_FILE_LOGGING 0x00000002
  331. #define IIS_CAP1_VIRTUAL_SERVER 0x00000004
  332. #define IIS_CAP1_BW_THROTTLING 0x00000008
  333. #define IIS_CAP1_IP_ACCESS_CHECK 0x00000010
  334. #define IIS_CAP1_MAX_CONNECTIONS 0x00000020
  335. #define IIS_CAP1_10_CONNECTION_LIMIT 0x00000040
  336. #define IIS_CAP1_MULTIPLE_INSTANCE 0x00000080
  337. #define IIS_CAP1_SSL_SUPPORT 0x00000100
  338. #define IIS_CAP1_OPERATORS_LIST 0x00000200
  339. #define IIS_CAP1_CPU_AUDITING 0x00000800
  340. #define IIS_CAP1_SERVER_COMPRESSION 0x00001000
  341. #define IIS_CAP1_DAV 0x00002000
  342. #define IIS_CAP1_POOLED_OOP 0x00010000
  343. //
  344. // Get or'd in at runtime after checking the network configuration
  345. //
  346. #define IIS_CAP1_DIGEST_SUPPORT 0x00004000
  347. #define IIS_CAP1_NT_CERTMAP_SUPPORT 0x00008000
  348. //
  349. // Gets 'or'ed in at runtime after checking the registry
  350. //
  351. #define IIS_CAP1_FP_INSTALLED 0x00000400
  352. #define IIS_CAP1_ALL ( IIS_CAP1_ODBC_LOGGING | \
  353. IIS_CAP1_FILE_LOGGING | \
  354. IIS_CAP1_VIRTUAL_SERVER | \
  355. IIS_CAP1_BW_THROTTLING | \
  356. IIS_CAP1_IP_ACCESS_CHECK | \
  357. IIS_CAP1_MAX_CONNECTIONS | \
  358. IIS_CAP1_10_CONNECTION_LIMIT| \
  359. IIS_CAP1_MULTIPLE_INSTANCE | \
  360. IIS_CAP1_SSL_SUPPORT | \
  361. IIS_CAP1_OPERATORS_LIST | \
  362. IIS_CAP1_SERVER_COMPRESSION | \
  363. IIS_CAP1_CPU_AUDITING | \
  364. IIS_CAP1_DAV | \
  365. IIS_CAP1_POOLED_OOP \
  366. )
  367. #define IIS_CAP1_NTS ( IIS_CAP1_ODBC_LOGGING | \
  368. IIS_CAP1_FILE_LOGGING | \
  369. IIS_CAP1_VIRTUAL_SERVER | \
  370. IIS_CAP1_BW_THROTTLING | \
  371. IIS_CAP1_IP_ACCESS_CHECK | \
  372. IIS_CAP1_MAX_CONNECTIONS | \
  373. IIS_CAP1_MULTIPLE_INSTANCE | \
  374. IIS_CAP1_SSL_SUPPORT | \
  375. IIS_CAP1_OPERATORS_LIST | \
  376. IIS_CAP1_SERVER_COMPRESSION | \
  377. IIS_CAP1_CPU_AUDITING | \
  378. IIS_CAP1_DAV | \
  379. IIS_CAP1_POOLED_OOP \
  380. )
  381. #define IIS_CAP1_NTW ( IIS_CAP1_FILE_LOGGING | \
  382. IIS_CAP1_MAX_CONNECTIONS | \
  383. IIS_CAP1_10_CONNECTION_LIMIT| \
  384. IIS_CAP1_SSL_SUPPORT | \
  385. IIS_CAP1_SERVER_COMPRESSION | \
  386. IIS_CAP1_DAV | \
  387. IIS_CAP1_POOLED_OOP \
  388. )
  389. #define IIS_CAP1_W95 ( IIS_CAP1_FILE_LOGGING | \
  390. IIS_CAP1_MAX_CONNECTIONS | \
  391. IIS_CAP1_10_CONNECTION_LIMIT \
  392. )
  393. //
  394. // INet admin API Prototypes
  395. //
  396. NET_API_STATUS
  397. NET_API_FUNCTION
  398. InetInfoGetVersion(
  399. IN LPWSTR pszServer OPTIONAL,
  400. IN DWORD dwReserved,
  401. OUT DWORD * pdwVersion
  402. );
  403. NET_API_STATUS
  404. NET_API_FUNCTION
  405. InetInfoGetServerCapabilities(
  406. IN LPWSTR pszServer OPTIONAL,
  407. IN DWORD dwReserved,
  408. OUT LPINET_INFO_CAPABILITIES * ppCap
  409. );
  410. NET_API_STATUS
  411. NET_API_FUNCTION
  412. InetInfoGetGlobalAdminInformation(
  413. IN LPWSTR pszServer OPTIONAL,
  414. IN DWORD dwReserved,
  415. OUT LPINET_INFO_GLOBAL_CONFIG_INFO * ppConfig
  416. );
  417. NET_API_STATUS
  418. NET_API_FUNCTION
  419. InetInfoSetGlobalAdminInformation(
  420. IN LPWSTR pszServer OPTIONAL,
  421. IN DWORD dwReserved,
  422. IN INET_INFO_GLOBAL_CONFIG_INFO * pConfig
  423. );
  424. NET_API_STATUS
  425. NET_API_FUNCTION
  426. InetInfoGetAdminInformation(
  427. IN LPWSTR pszServer OPTIONAL,
  428. IN DWORD dwServerMask,
  429. OUT LPINET_INFO_CONFIG_INFO * ppConfig
  430. );
  431. NET_API_STATUS
  432. NET_API_FUNCTION
  433. InetInfoSetAdminInformation(
  434. IN LPWSTR pszServer OPTIONAL,
  435. IN DWORD dwServerMask,
  436. IN INET_INFO_CONFIG_INFO * pConfig
  437. );
  438. NET_API_STATUS
  439. NET_API_FUNCTION
  440. InetInfoQueryStatistics(
  441. IN LPWSTR pszServer OPTIONAL,
  442. IN DWORD Level,
  443. IN DWORD dwServerMask,
  444. OUT LPBYTE * Buffer
  445. );
  446. NET_API_STATUS
  447. NET_API_FUNCTION
  448. InetInfoClearStatistics(
  449. IN LPWSTR pszServer OPTIONAL,
  450. IN DWORD dwServerMask
  451. );
  452. NET_API_STATUS
  453. NET_API_FUNCTION
  454. InetInfoFlushMemoryCache(
  455. IN LPWSTR pszServer OPTIONAL,
  456. IN DWORD dwServerMask
  457. );
  458. NET_API_STATUS
  459. NET_API_FUNCTION
  460. InetInfoGetSites(
  461. IN LPWSTR pszServer OPTIONAL,
  462. IN DWORD dwServerMask,
  463. OUT LPINET_INFO_SITE_LIST * ppSites
  464. );
  465. /////////////////////////////////////////////////////////////////////////
  466. // //
  467. // HTTP (w3) specific items //
  468. // //
  469. /////////////////////////////////////////////////////////////////////////
  470. //
  471. // Client Interface Name for RPC connections over named pipes
  472. //
  473. #define W3_SERVICE_NAME TEXT("W3SVC")
  474. #define W3_SERVICE_NAME_A "W3SVC"
  475. #define W3_SERVICE_NAME_W L"W3SVC"
  476. # define W3_INTERFACE_NAME W3_SERVICE_NAME
  477. # define W3_NAMED_PIPE TEXT("\\PIPE\\") ## W3_INTERFACE_NAME
  478. # define W3_NAMED_PIPE_W L"\\PIPE\\" ## W3_SERVICE_NAME_W
  479. //
  480. // Built-in application package ID's and class ID's
  481. //
  482. #define W3_INPROC_PACKAGE_ID L"{3D14228C-FBE1-11d0-995D-00C04FD919C1}"
  483. #define W3_OOP_POOL_PACKAGE_ID L"{3D14228D-FBE1-11d0-995D-00C04FD919C1}"
  484. #define W3_INPROC_WAM_CLSID L"{99169CB0-A707-11d0-989D-00C04FD919C1}"
  485. #define W3_OOP_POOL_WAM_CLSID L"{99169CB1-A707-11d0-989D-00C04FD919C1}"
  486. //
  487. // Constants for ISAPI token query functions
  488. //
  489. #define TOKEN_ANONYMOUS_TOKEN 1
  490. #define TOKEN_VR_TOKEN 2
  491. //
  492. // Manifests for APIs
  493. //
  494. #define FC_W3_DIR_BROWSE_CONTROL ((FIELD_CONTROL)BitFlag(0))
  495. #define FC_W3_DEFAULT_LOAD_FILE ((FIELD_CONTROL)BitFlag(1))
  496. #define FC_W3_CHECK_FOR_WAISDB ((FIELD_CONTROL)BitFlag(2))
  497. #define FC_W3_DIRECTORY_IMAGE ((FIELD_CONTROL)BitFlag(3))
  498. #define FC_W3_SERVER_AS_PROXY ((FIELD_CONTROL)BitFlag(4))
  499. #define FC_W3_CATAPULT_USER_AND_PWD ((FIELD_CONTROL)BitFlag(5))
  500. #define FC_W3_SSI_ENABLED ((FIELD_CONTROL)BitFlag(6))
  501. #define FC_W3_SSI_EXTENSION ((FIELD_CONTROL)BitFlag(7))
  502. #define FC_W3_GLOBAL_EXPIRE ((FIELD_CONTROL)BitFlag(8))
  503. #define FC_W3_SCRIPT_MAPPING ((FIELD_CONTROL)BitFlag(9))
  504. #define FC_W3_CGI_SCRIPT_TIMEOUT ((FIELD_CONTROL)BitFlag(10))
  505. #define FC_W3_POOL_ODBC_CONN_TIME ((FIELD_CONTROL)BitFlag(11))
  506. #define FC_W3_CACHE_ISAPI_APPS ((FIELD_CONTROL)BitFlag(12))
  507. #define FC_W3_USE_KEEP_ALIVES ((FIELD_CONTROL)BitFlag(13))
  508. #define FC_W3_ENABLE_HEADER_DOC ((FIELD_CONTROL)BitFlag(14))
  509. #define FC_W3_HEADER_DOC_NAME ((FIELD_CONTROL)BitFlag(15))
  510. #define FC_W3_ENABLE_FOOT_DOC ((FIELD_CONTROL)BitFlag(16))
  511. #define FC_W3_FOOTER_DOC_NAME ((FIELD_CONTROL)BitFlag(17))
  512. #define FC_W3_CUSTOMER_HEADERS ((FIELD_CONTROL)BitFlag(18))
  513. #define FC_W3_ALL (FC_W3_DIR_BROWSE_CONTROL | \
  514. FC_W3_DEFAULT_LOAD_FILE | \
  515. FC_W3_CHECK_FOR_WAISDB | \
  516. FC_W3_DIRECTORY_IMAGE | \
  517. FC_W3_SERVER_AS_PROXY | \
  518. FC_W3_CATAPULT_USER_AND_PWD |\
  519. FC_W3_SSI_ENABLED | \
  520. FC_W3_SSI_EXTENSION | \
  521. FC_W3_GLOBAL_EXPIRE | \
  522. FC_W3_SCRIPT_MAPPING | \
  523. FC_W3_CGI_SCRIPT_TIMEOUT | \
  524. FC_W3_POOL_ODBC_CONN_TIME| \
  525. FC_W3_CACHE_ISAPI_APPS | \
  526. FC_W3_USE_KEEP_ALIVES | \
  527. FC_W3_ENABLE_HEADER_DOC | \
  528. FC_W3_HEADER_DOC_NAME | \
  529. FC_W3_ENABLE_FOOT_DOC | \
  530. FC_W3_FOOTER_DOC_NAME | \
  531. FC_W3_CUSTOMER_HEADERS \
  532. )
  533. //
  534. // HTTP Directory browsing flags
  535. //
  536. //#define DIRBROW_SHOW_ICON 0x00000001
  537. #define DIRBROW_SHOW_DATE MD_DIRBROW_SHOW_DATE
  538. #define DIRBROW_SHOW_TIME MD_DIRBROW_SHOW_TIME
  539. #define DIRBROW_SHOW_SIZE MD_DIRBROW_SHOW_SIZE
  540. #define DIRBROW_SHOW_EXTENSION MD_DIRBROW_SHOW_EXTENSION
  541. #define DIRBROW_LONG_DATE MD_DIRBROW_LONG_DATE
  542. #define DIRBROW_ENABLED MD_DIRBROW_ENABLED
  543. #define DIRBROW_LOADDEFAULT MD_DIRBROW_LOADDEFAULT
  544. #define DIRBROW_MASK MD_DIRBROW_MASK
  545. //
  546. // Setting the csecGlobalExpire field to this value will prevent the server
  547. // from generating an "Expires:" header.
  548. //
  549. #define NO_GLOBAL_EXPIRE 0xffffffff
  550. //
  551. // Encryption Capabilities
  552. //
  553. #define ENC_CAPS_NOT_INSTALLED 0x80000000 // No keys installed
  554. #define ENC_CAPS_DISABLED 0x40000000 // Disabled due to locale
  555. #define ENC_CAPS_SSL 0x00000001 // SSL active
  556. #define ENC_CAPS_PCT 0x00000002 // PCT active
  557. //
  558. // Encryption type (SSL/PCT etc) portion of encryption flag dword
  559. //
  560. #define ENC_CAPS_TYPE_MASK (ENC_CAPS_SSL | \
  561. ENC_CAPS_PCT)
  562. #define ENC_CAPS_DEFAULT ENC_CAPS_TYPE_MASK
  563. //
  564. // Structures for APIs
  565. //
  566. typedef struct _W3_USER_INFO
  567. {
  568. DWORD idUser; // User id
  569. LPWSTR pszUser; // User name
  570. BOOL fAnonymous; // TRUE if the user is logged on as
  571. // Anonymous, FALSE otherwise
  572. DWORD inetHost; // Host Address
  573. DWORD tConnect; // User Connection Time (elapsed seconds)
  574. } W3_USER_INFO, * LPW3_USER_INFO;
  575. typedef struct _W3_STATISTICS_0
  576. {
  577. LARGE_INTEGER TotalBytesSent;
  578. LARGE_INTEGER TotalBytesReceived;
  579. DWORD TotalFilesSent;
  580. DWORD TotalFilesReceived;
  581. DWORD CurrentAnonymousUsers;
  582. DWORD CurrentNonAnonymousUsers;
  583. DWORD TotalAnonymousUsers;
  584. DWORD TotalNonAnonymousUsers;
  585. DWORD MaxAnonymousUsers;
  586. DWORD MaxNonAnonymousUsers;
  587. DWORD CurrentConnections;
  588. DWORD MaxConnections;
  589. DWORD ConnectionAttempts;
  590. DWORD LogonAttempts;
  591. DWORD TotalGets;
  592. DWORD TotalPosts;
  593. DWORD TotalHeads;
  594. DWORD TotalOthers; // Other HTTP verbs
  595. DWORD TotalCGIRequests;
  596. DWORD TotalBGIRequests;
  597. DWORD TotalNotFoundErrors;
  598. DWORD CurrentCGIRequests;
  599. DWORD CurrentBGIRequests;
  600. DWORD MaxCGIRequests;
  601. DWORD MaxBGIRequests;
  602. DWORD TimeOfLastClear;
  603. # ifndef NO_AUX_PERF
  604. DWORD nAuxCounters; // number of active counters in rgCounters
  605. DWORD rgCounters[MAX_AUX_PERF_COUNTERS];
  606. # endif // NO_AUX_PERF
  607. } W3_STATISTICS_0, * LPW3_STATISTICS_0;
  608. typedef struct _W3_STATISTICS_1
  609. {
  610. LARGE_INTEGER TotalBytesSent;
  611. LARGE_INTEGER TotalBytesReceived;
  612. DWORD TotalFilesSent;
  613. DWORD TotalFilesReceived;
  614. DWORD CurrentAnonymousUsers;
  615. DWORD CurrentNonAnonymousUsers;
  616. DWORD TotalAnonymousUsers;
  617. DWORD TotalNonAnonymousUsers;
  618. DWORD MaxAnonymousUsers;
  619. DWORD MaxNonAnonymousUsers;
  620. DWORD CurrentConnections;
  621. DWORD MaxConnections;
  622. DWORD ConnectionAttempts;
  623. DWORD LogonAttempts;
  624. DWORD TotalOptions;
  625. DWORD TotalGets;
  626. DWORD TotalPosts;
  627. DWORD TotalHeads;
  628. DWORD TotalPuts;
  629. DWORD TotalDeletes;
  630. DWORD TotalTraces;
  631. DWORD TotalMove;
  632. DWORD TotalCopy;
  633. DWORD TotalMkcol;
  634. DWORD TotalPropfind;
  635. DWORD TotalProppatch;
  636. DWORD TotalSearch;
  637. DWORD TotalLock;
  638. DWORD TotalUnlock;
  639. DWORD TotalOthers; // Other HTTP verbs
  640. DWORD TotalCGIRequests;
  641. DWORD TotalBGIRequests;
  642. DWORD TotalNotFoundErrors;
  643. DWORD TotalLockedErrors;
  644. DWORD CurrentCalAuth;
  645. DWORD MaxCalAuth;
  646. DWORD TotalFailedCalAuth;
  647. DWORD CurrentCalSsl;
  648. DWORD MaxCalSsl;
  649. DWORD TotalFailedCalSsl;
  650. DWORD CurrentCGIRequests;
  651. DWORD CurrentBGIRequests;
  652. DWORD MaxCGIRequests;
  653. DWORD MaxBGIRequests;
  654. // bandwidth throttling info
  655. DWORD CurrentBlockedRequests;
  656. DWORD TotalBlockedRequests;
  657. DWORD TotalAllowedRequests;
  658. DWORD TotalRejectedRequests;
  659. DWORD MeasuredBw;
  660. DWORD ServiceUptime;
  661. DWORD TimeOfLastClear;
  662. # ifndef NO_AUX_PERF
  663. DWORD nAuxCounters; // number of active counters in rgCounters
  664. DWORD rgCounters[MAX_AUX_PERF_COUNTERS];
  665. # endif // NO_AUX_PERF
  666. } W3_STATISTICS_1, * LPW3_STATISTICS_1;
  667. typedef struct _W3_SCRIPT_MAP_ENTRY
  668. {
  669. LPWSTR lpszExtension;
  670. LPWSTR lpszImage;
  671. } W3_SCRIPT_MAP_ENTRY, *LPW3_SCRIPT_MAP_ENTRY;
  672. typedef struct _W3_SCRIPT_MAP_LIST
  673. {
  674. DWORD cEntries;
  675. #ifdef MIDL_PASS
  676. [size_is( cEntries)]
  677. #endif
  678. W3_SCRIPT_MAP_ENTRY aScriptMap[];
  679. } W3_SCRIPT_MAP_LIST, *LPW3_SCRIPT_MAP_LIST;
  680. typedef struct _W3_CONFIG_INFO
  681. {
  682. FIELD_CONTROL FieldControl;
  683. DWORD dwDirBrowseControl; // Directory listing and def. load
  684. LPWSTR lpszDefaultLoadFile; // File to load if feature is on
  685. BOOL fCheckForWAISDB; // Call waislookup if .dct found?
  686. LPWSTR lpszDirectoryImage; // Image for directory in file list
  687. BOOL fServerAsProxy; // Run server as a proxy if TRUE
  688. LPWSTR lpszCatapultUser; // The user/password to impersonate
  689. WCHAR szCatapultUserPwd[PWLEN+1]; // if the proxy server is using
  690. // the catapult server
  691. BOOL fSSIEnabled; // Are server side includes enabled?
  692. LPWSTR lpszSSIExtension; // Extension for server side inc.
  693. DWORD csecGlobalExpire; // Value to set Expires: header to
  694. LPW3_SCRIPT_MAP_LIST ScriptMap; // List of extension mappings
  695. DWORD dwEncCaps; // Encryption capabilities
  696. } W3_CONFIG_INFO, *LPW3_CONFIG_INFO;
  697. //
  698. // API Prototypes
  699. //
  700. NET_API_STATUS
  701. NET_API_FUNCTION
  702. W3GetAdminInformation(
  703. IN LPWSTR pszServer OPTIONAL,
  704. OUT LPW3_CONFIG_INFO * ppConfig
  705. );
  706. NET_API_STATUS
  707. NET_API_FUNCTION
  708. W3SetAdminInformation(
  709. IN LPWSTR pszServer OPTIONAL,
  710. IN LPW3_CONFIG_INFO pConfig
  711. );
  712. NET_API_STATUS
  713. NET_API_FUNCTION
  714. W3EnumerateUsers(
  715. IN LPWSTR pszServer OPTIONAL,
  716. OUT LPDWORD lpdwEntriesRead,
  717. OUT LPW3_USER_INFO * Buffer
  718. );
  719. NET_API_STATUS
  720. NET_API_FUNCTION
  721. W3DisconnectUser(
  722. IN LPWSTR pszServer OPTIONAL,
  723. IN DWORD idUser
  724. );
  725. NET_API_STATUS
  726. NET_API_FUNCTION
  727. W3QueryStatistics(
  728. IN LPWSTR pszServer OPTIONAL,
  729. IN DWORD Level,
  730. OUT LPBYTE * Buffer
  731. );
  732. NET_API_STATUS
  733. NET_API_FUNCTION
  734. W3ClearStatistics(
  735. IN LPWSTR pszServer OPTIONAL
  736. );
  737. /////////////////////////////////////////////////////////////////////////
  738. // //
  739. // FTP specific items //
  740. // //
  741. /////////////////////////////////////////////////////////////////////////
  742. //
  743. // Service name.
  744. //
  745. #define FTPD_SERVICE_NAME TEXT("MSFTPSVC")
  746. #define FTPD_SERVICE_NAME_A "MSFTPSVC"
  747. #define FTPD_SERVICE_NAME_W L"MSFTPSVC"
  748. //
  749. // Client Interface Name for RPC connections over named pipes
  750. //
  751. # define FTP_INTERFACE_NAME FTPD_SERVICE_NAME
  752. # define FTP_NAMED_PIPE TEXT("\\PIPE\\") ## FTP_INTERFACE_NAME
  753. # define FTP_NAMED_PIPE_W L"\\PIPE\\" ## FTPD_SERVICE_NAME_W
  754. //
  755. // Manifests for APIs.
  756. //
  757. #define FC_FTP_ALLOW_ANONYMOUS ((FIELD_CONTROL)BitFlag( 0))
  758. #define FC_FTP_ALLOW_GUEST_ACCESS ((FIELD_CONTROL)BitFlag( 1))
  759. #define FC_FTP_ANNOTATE_DIRECTORIES ((FIELD_CONTROL)BitFlag( 2))
  760. #define FC_FTP_ANONYMOUS_ONLY ((FIELD_CONTROL)BitFlag( 3))
  761. #define FC_FTP_EXIT_MESSAGE ((FIELD_CONTROL)BitFlag( 4))
  762. #define FC_FTP_GREETING_MESSAGE ((FIELD_CONTROL)BitFlag( 5))
  763. #define FC_FTP_HOME_DIRECTORY ((FIELD_CONTROL)BitFlag( 6))
  764. #define FC_FTP_LISTEN_BACKLOG ((FIELD_CONTROL)BitFlag( 7))
  765. #define FC_FTP_LOWERCASE_FILES ((FIELD_CONTROL)BitFlag( 8))
  766. #define FC_FTP_MAX_CLIENTS_MESSAGE ((FIELD_CONTROL)BitFlag( 9))
  767. #define FC_FTP_MSDOS_DIR_OUTPUT ((FIELD_CONTROL)BitFlag(10))
  768. #define FC_FTP_READ_ACCESS_MASK ((FIELD_CONTROL)BitFlag(11))
  769. #define FC_FTP_WRITE_ACCESS_MASK ((FIELD_CONTROL)BitFlag(12))
  770. #define FC_FTP_ALLOW_REPLACE_ON_RENAME ((FIELD_CONTROL)BitFlag(13))
  771. #define FC_FTP_SHOW_4_DIGIT_YEAR ((FIELD_CONTROL)BitFlag(14))
  772. #define FC_FTP_BANNER_MESSAGE ((FIELD_CONTROL)BitFlag(15))
  773. #define FC_FTP_USER_ISOLATION ((FIELD_CONTROL)BitFlag(16))
  774. #define FC_FTP_LOG_IN_UTF_8 ((FIELD_CONTROL)BitFlag(17))
  775. #define FC_FTP_ALL ( \
  776. FC_FTP_ALLOW_ANONYMOUS | \
  777. FC_FTP_ALLOW_GUEST_ACCESS | \
  778. FC_FTP_ANNOTATE_DIRECTORIES | \
  779. FC_FTP_ANONYMOUS_ONLY | \
  780. FC_FTP_EXIT_MESSAGE | \
  781. FC_FTP_GREETING_MESSAGE | \
  782. FC_FTP_HOME_DIRECTORY | \
  783. FC_FTP_LISTEN_BACKLOG | \
  784. FC_FTP_LOWERCASE_FILES | \
  785. FC_FTP_MAX_CLIENTS_MESSAGE | \
  786. FC_FTP_MSDOS_DIR_OUTPUT | \
  787. FC_FTP_READ_ACCESS_MASK | \
  788. FC_FTP_WRITE_ACCESS_MASK | \
  789. FC_FTP_ALLOW_REPLACE_ON_RENAME | \
  790. FC_FTP_SHOW_4_DIGIT_YEAR | \
  791. FC_FTP_BANNER_MESSAGE | \
  792. FC_FTP_USER_ISOLATION | \
  793. FC_FTP_LOG_IN_UTF_8 | \
  794. 0 )
  795. //
  796. // Structures for APIs.
  797. //
  798. typedef struct _FTP_CONFIG_INFO
  799. {
  800. FIELD_CONTROL FieldControl;
  801. BOOL fAllowAnonymous;
  802. BOOL fAllowGuestAccess;
  803. BOOL fAnnotateDirectories;
  804. BOOL fAnonymousOnly;
  805. LPWSTR lpszExitMessage;
  806. LPWSTR lpszGreetingMessage;
  807. LPWSTR lpszHomeDirectory;
  808. DWORD dwListenBacklog;
  809. BOOL fLowercaseFiles;
  810. LPWSTR lpszMaxClientsMessage;
  811. BOOL fMsdosDirOutput;
  812. BOOL fFourDigitYear;
  813. LPWSTR lpszBannerMessage;
  814. DWORD dwUserIsolationMode;
  815. BOOL fLogInUtf8;
  816. } FTP_CONFIG_INFO, * LPFTP_CONFIG_INFO;
  817. //
  818. // API Prototypes.
  819. //
  820. NET_API_STATUS
  821. NET_API_FUNCTION
  822. FtpGetAdminInformation(
  823. IN LPWSTR pszServer OPTIONAL,
  824. OUT LPFTP_CONFIG_INFO * ppConfig
  825. );
  826. NET_API_STATUS
  827. NET_API_FUNCTION
  828. FtpSetAdminInformation(
  829. IN LPWSTR pszServer OPTIONAL,
  830. IN LPFTP_CONFIG_INFO pConfig
  831. );
  832. # include <ftpd.h>
  833. /////////////////////////////////////////////////////////////////////////
  834. // //
  835. // Gopher specific items //
  836. // //
  837. /////////////////////////////////////////////////////////////////////////
  838. //
  839. // Service name.
  840. //
  841. # define GOPHERD_SERVICE_NAME TEXT("GopherSvc")
  842. # define GOPHERD_SERVICE_NAME_A "GopherSvc"
  843. # define GOPHERD_SERVICE_NAME_W L"GopherSvc"
  844. //
  845. // Client Interface Name for RPC connections over named pipes
  846. //
  847. # define GOPHERD_INTERFACE_NAME GOPHERD_SERVICE_NAME
  848. # define GOPHERD_NAMED_PIPE TEXT("\\PIPE\\") ## GOPHERD_INTERFACE_NAME
  849. # define GOPHERD_NAMED_PIPE_W L"\\PIPE\\" ## GOPHERD_SERVICE_NAME_W
  850. //
  851. // Gopher port
  852. //
  853. #define IPPORT_GOPHER 0x46
  854. /************************************************************
  855. * Symbolic Constants
  856. * Prefix GDA_ stands for Gopher Daemon Admin
  857. ************************************************************/
  858. # define GDA_SITE ((FIELD_CONTROL ) BitFlag( 1)) // SZ
  859. # define GDA_ORGANIZATION ((FIELD_CONTROL ) BitFlag( 2)) // SZ
  860. # define GDA_LOCATION ((FIELD_CONTROL ) BitFlag( 3)) // SZ
  861. # define GDA_GEOGRAPHY ((FIELD_CONTROL ) BitFlag( 4)) // SZ
  862. # define GDA_LANGUAGE ((FIELD_CONTROL ) BitFlag( 5)) // SZ
  863. # define GDA_CHECK_FOR_WAISDB ((FIELD_CONTROL ) BitFlag( 8)) // BOOL
  864. # define GDA_DEBUG_FLAGS ((FIELD_CONTROL ) BitFlag( 30)) // DWORD
  865. # define GDA_ALL_CONFIG_INFO ( GDA_SITE | \
  866. GDA_ORGANIZATION | \
  867. GDA_LOCATION | \
  868. GDA_GEOGRAPHY | \
  869. GDA_LANGUAGE | \
  870. GDA_CHECK_FOR_WAISDB | \
  871. GDA_DEBUG_FLAGS \
  872. )
  873. # define GOPHERD_ANONYMOUS_SECRET_W L"GOPHERD_ANONYMOUS_DATA"
  874. # define GOPHERD_ROOT_SECRET_W L"GOPHERD_ROOT_DATA"
  875. //
  876. // Configuration information is the config data that is communicated
  877. // b/w the server and admin UI
  878. //
  879. typedef struct _GOPHERD_CONFIG_INFO {
  880. FIELD_CONTROL FieldControl; // bit mask indicating fields set.
  881. LPWSTR lpszSite; // Name of Gopher site
  882. LPWSTR lpszOrganization; // Organization Name
  883. LPWSTR lpszLocation; // Location of server
  884. LPWSTR lpszGeography; // Geographical data
  885. LPWSTR lpszLanguage; // Language for server
  886. BOOL fCheckForWaisDb; // Check & allow Wais Db
  887. // Debugging data
  888. DWORD dwDebugFlags; // Bitmap of debugging data
  889. } GOPHERD_CONFIG_INFO, * LPGOPHERD_CONFIG_INFO;
  890. typedef struct _GOPHERD_STATISTICS_INFO {
  891. LARGE_INTEGER TotalBytesSent;
  892. LARGE_INTEGER TotalBytesRecvd;
  893. DWORD TotalFilesSent;
  894. DWORD TotalDirectoryListings;
  895. DWORD TotalSearches;
  896. DWORD CurrentAnonymousUsers;
  897. DWORD CurrentNonAnonymousUsers;
  898. DWORD MaxAnonymousUsers;
  899. DWORD MaxNonAnonymousUsers;
  900. DWORD TotalAnonymousUsers;
  901. DWORD TotalNonAnonymousUsers;
  902. DWORD TotalConnections;
  903. DWORD MaxConnections;
  904. DWORD CurrentConnections;
  905. DWORD ConnectionAttempts; // raw connections made
  906. DWORD LogonAttempts; // total logons attempted
  907. DWORD AbortedAttempts; // Aborted connections
  908. DWORD ErroredConnections; // # in Error when processed
  909. DWORD GopherPlusRequests;
  910. DWORD TimeOfLastClear;
  911. } GOPHERD_STATISTICS_INFO, * LPGOPHERD_STATISTICS_INFO;
  912. //
  913. // GOPHERD_USER_INFO contains details about connected users.
  914. // This structure may undergo modification. Currently UserInformation
  915. // is not supported.
  916. //
  917. typedef struct _GOPHERD_USER_INFO {
  918. DWORD dwIdUser; // Id for user
  919. LPWSTR lpszUserName; // User name
  920. BOOL fAnonymous; // TRUE if user logged on as anonymous
  921. // FALSE otherwise
  922. DWORD dwInetHost; // host address for client
  923. //
  924. // Other details if required
  925. //
  926. } GOPHERD_USER_INFO, * LPGOPHERD_USER_INFO;
  927. /************************************************************
  928. * Gopher Server RPC APIs
  929. ************************************************************/
  930. //
  931. // Server Administrative Information
  932. //
  933. DWORD
  934. NET_API_FUNCTION
  935. GdGetAdminInformation(
  936. IN LPWSTR pszServer OPTIONAL,
  937. OUT LPGOPHERD_CONFIG_INFO * ppConfigInfo
  938. );
  939. DWORD
  940. NET_API_FUNCTION
  941. GdSetAdminInformation(
  942. IN LPWSTR pszServer OPTIONAL,
  943. IN LPGOPHERD_CONFIG_INFO pConfigInfo
  944. );
  945. //
  946. // API for Users enumeration ( Not Yet Supported).
  947. //
  948. DWORD
  949. NET_API_FUNCTION
  950. GdEnumerateUsers(
  951. IN LPWSTR pszServer OPTIONAL,
  952. OUT LPDWORD lpnEntriesRead,
  953. OUT LPGOPHERD_USER_INFO * lpUserBuffer
  954. );
  955. DWORD
  956. NET_API_FUNCTION
  957. GdDisconnectUser(
  958. IN LPWSTR pszServer OPTIONAL,
  959. IN DWORD dwIdUser
  960. );
  961. //
  962. // Statistics API
  963. //
  964. DWORD
  965. NET_API_FUNCTION
  966. GdGetStatistics(
  967. IN LPWSTR pszServer OPTIONAL,
  968. OUT LPBYTE lpStatBuffer // pass LPGOPHERD_STATISTICS_INFO
  969. );
  970. DWORD
  971. NET_API_FUNCTION
  972. GdClearStatistics(
  973. IN LPWSTR pszServer OPTIONAL
  974. );
  975. /////////////////////////////////////////////////////////////////////////
  976. // //
  977. // Catapult specific items //
  978. // //
  979. /////////////////////////////////////////////////////////////////////////
  980. # define INET_GATEWAY_INTERFACE_NAME TEXT("gateway")
  981. // preserve back ward compatibility
  982. typedef INET_INFO_CONFIG_INFO INETA_CONFIG_INFO,
  983. * LPINETA_CONFIG_INFO;
  984. typedef INET_INFO_IP_SEC_ENTRY INETA_IP_SEC_ENTRY,
  985. * LPINETA_IP_SEC_ENTRY;
  986. typedef INET_INFO_IP_SEC_LIST INETA_IP_SEC_LIST,
  987. * LPINETA_IP_SEC_LIST;
  988. typedef INET_INFO_VIRTUAL_ROOT_ENTRY INETA_VIRTUAL_ROOT_ENTRY,
  989. * LPINETA_VIRTUAL_ROOT_ENTRY;
  990. typedef INET_INFO_VIRTUAL_ROOT_LIST INETA_VIRTUAL_ROOT_LIST,
  991. * LPINETA_VIRTUAL_ROOT_LIST;
  992. typedef INET_INFO_GLOBAL_CONFIG_INFO INETA_GLOBAL_CONFIG_INFO,
  993. * LPINETA_GLOBAL_CONFIG_INFO;
  994. typedef INET_INFO_STATISTICS_0 INETA_STATISTICS_0,
  995. * LPINETA_STATISTICS_0;
  996. #define INETA_PARAMETERS_KEY (INET_INFO_PARAMETERS_KEY)
  997. #ifdef __cplusplus
  998. }
  999. #endif // _cplusplus
  1000. #endif // _INETINFO_H_