Source code of Windows XP (NT5)
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.

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