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.

322 lines
9.7 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. inetaccs.h
  5. Abstract:
  6. This file contains the internet access 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. Sophiac 16-Oct-1995 Added common statistics apis for perfmon
  12. MuraliK 14-Dec-1995 Changed Interface names to use Service names
  13. --*/
  14. #ifndef _INETACCS_H_
  15. #define _INETACCS_H_
  16. #include <inetcom.h>
  17. #ifdef __cplusplus
  18. extern "C"
  19. {
  20. #endif // _cplusplus
  21. /************************************************************
  22. * Symbolic Constants
  23. ************************************************************/
  24. #ifndef NO_AUX_PERF
  25. #ifndef MAX_AUX_PERF_COUNTERS
  26. #define MAX_AUX_PERF_COUNTERS (20)
  27. #endif // MAX_AUX_PERF_COUNTERS
  28. #endif // NO_AUX_PERF
  29. //
  30. // Service name.
  31. //
  32. #define INET_ACCS_SERVICE_NAME TEXT("INETACCS")
  33. #define INET_ACCS_SERVICE_NAME_A "INETACCS"
  34. #define INET_ACCS_SERVICE_NAME_W L"INETACCS"
  35. //
  36. // Configuration parameters registry key.
  37. //
  38. #define INET_ACCS_KEY \
  39. TEXT("System\\CurrentControlSet\\Services\\inetaccs")
  40. #define INET_ACCS_PARAMETERS_KEY \
  41. INET_ACCS_KEY TEXT("\\Parameters")
  42. #define INET_ACCS_CACHE_KEY TEXT("Cache")
  43. #define INET_ACCS_FILTER_KEY TEXT("Filter")
  44. /////////////////////////////////////////////////////////////////////////
  45. // //
  46. // Internet Server Common Definitions //
  47. // //
  48. /////////////////////////////////////////////////////////////////////////
  49. //
  50. // Client Interface Name for RPC connections over named pipes
  51. //
  52. # define INET_ACCS_INTERFACE_NAME INET_ACCS_SERVICE_NAME
  53. # define INET_ACCS_NAMED_PIPE TEXT("\\PIPE\\") ## INET_ACCS_INTERFACE_NAME
  54. # define INET_ACCS_NAMED_PIPE_W L"\\PIPE\\" ## INET_ACCS_SERVICE_NAME_W
  55. //
  56. // Field Control common for Gateway services
  57. //
  58. #define FC_INET_ACCS_ALL FC_INET_COM_ALL
  59. //
  60. // Admin configuration information
  61. //
  62. typedef struct _INET_ACCS_CONFIG_INFO
  63. {
  64. FIELD_CONTROL FieldControl;
  65. //
  66. // don't add any service specific config parameter here.
  67. //
  68. INET_COM_CONFIG_INFO CommonConfigInfo;
  69. //
  70. // add service specific parameters here.
  71. //
  72. } INET_ACCS_CONFIG_INFO, * LPINET_ACCS_CONFIG_INFO;
  73. /////////////////////////////////////////////////////////////////////////
  74. // //
  75. // Global Internet Server Definitions //
  76. // //
  77. /////////////////////////////////////////////////////////////////////////
  78. #define FC_GINET_ACCS_MEMORY_CACHE_SIZE ((FIELD_CONTROL)BitFlag(1))
  79. #define FC_GINET_ACCS_DISK_CACHE_TIMEOUT ((FIELD_CONTROL)BitFlag(2))
  80. #define FC_GINET_ACCS_DISK_CACHE_UPDATE ((FIELD_CONTROL)BitFlag(3))
  81. #define FC_GINET_ACCS_FRESHNESS_INTERVAL ((FIELD_CONTROL)BitFlag(4))
  82. #define FC_GINET_ACCS_CLEANUP_INTERVAL ((FIELD_CONTROL)BitFlag(5))
  83. #define FC_GINET_ACCS_CLEANUP_FACTOR ((FIELD_CONTROL)BitFlag(6))
  84. #define FC_GINET_ACCS_CLEANUP_TIME ((FIELD_CONTROL)BitFlag(7))
  85. #define FC_GINET_ACCS_PERSISTENT_CACHE ((FIELD_CONTROL)BitFlag(8))
  86. #define FC_GINET_ACCS_DISK_CACHE_LOCATION ((FIELD_CONTROL)BitFlag(9))
  87. #define FC_GINET_ACCS_BANDWIDTH_LEVEL ((FIELD_CONTROL)BitFlag(10))
  88. #define FC_GINET_ACCS_DOMAIN_FILTER_CONFIG ((FIELD_CONTROL)BitFlag(11))
  89. #define FC_GINET_ACCS_ALL (FC_GINET_ACCS_MEMORY_CACHE_SIZE | \
  90. FC_GINET_ACCS_DISK_CACHE_TIMEOUT | \
  91. FC_GINET_ACCS_DISK_CACHE_UPDATE | \
  92. FC_GINET_ACCS_FRESHNESS_INTERVAL | \
  93. FC_GINET_ACCS_CLEANUP_INTERVAL | \
  94. FC_GINET_ACCS_CLEANUP_FACTOR | \
  95. FC_GINET_ACCS_CLEANUP_TIME | \
  96. FC_GINET_ACCS_PERSISTENT_CACHE | \
  97. FC_GINET_ACCS_DISK_CACHE_LOCATION | \
  98. FC_GINET_ACCS_BANDWIDTH_LEVEL | \
  99. FC_GINET_ACCS_DOMAIN_FILTER_CONFIG | \
  100. 0 \
  101. )
  102. //
  103. // Disk cache settings
  104. //
  105. typedef struct _INET_ACCS_DISK_CACHE_LOC_ENTRY
  106. {
  107. LPWSTR pszDirectory; // Directory for temporary files
  108. DWORD cbMaxCacheSize; // Maximum number of bytes (in 1024
  109. // byte increments)
  110. } INET_ACCS_DISK_CACHE_LOC_ENTRY, *LPINET_ACCS_DISK_CACHE_LOC_ENTRY;
  111. #pragma warning( disable:4200 ) // nonstandard ext. - zero sized array
  112. // (MIDL requires zero entries)
  113. typedef struct _INET_ACCS_DISK_CACHE_LOC_LIST
  114. {
  115. DWORD cEntries;
  116. #ifdef MIDL_PASS
  117. [size_is( cEntries)]
  118. #endif
  119. INET_ACCS_DISK_CACHE_LOC_ENTRY aLocEntry[];
  120. } INET_ACCS_DISK_CACHE_LOC_LIST, *LPINET_ACCS_DISK_CACHE_LOC_LIST;
  121. //
  122. // Domain Filter settings
  123. //
  124. typedef struct _INET_ACCS_DOMAIN_FILTER_ENTRY
  125. {
  126. DWORD dwMask; // Mask and network number in
  127. DWORD dwNetwork; // network order
  128. LPSTR pszFilterSite; // domain filter site name
  129. } INET_ACCS_DOMAIN_FILTER_ENTRY, *LPINET_ACCS_DOMAIN_FILTER_ENTRY;
  130. typedef struct _INET_ACCS_DOMAIN_FILTER_LIST
  131. {
  132. DWORD cEntries;
  133. #ifdef MIDL_PASS
  134. [size_is( cEntries)]
  135. #endif
  136. INET_ACCS_DOMAIN_FILTER_ENTRY aFilterEntry[];
  137. } INET_ACCS_DOMAIN_FILTER_LIST, *LPINET_ACCS_DOMAIN_FILTER_LIST;
  138. //
  139. // Domain Filter Types
  140. //
  141. #define INET_ACCS_DOMAIN_FILTER_DISABLED 0
  142. #define INET_ACCS_DOMAIN_FILTER_DENIED 1
  143. #define INET_ACCS_DOMAIN_FILTER_GRANT 2
  144. typedef struct _INET_ACCS_GLOBAL_CONFIG_INFO
  145. {
  146. FIELD_CONTROL FieldControl;
  147. DWORD cbMemoryCacheSize; // Size of memory cache
  148. DWORD DiskCacheTimeOut; // Remove if not accessed in this
  149. // time (in seconds)
  150. DWORD DiskCacheUpdate; // When to refresh the data (sec)
  151. DWORD FreshnessInterval; // Time to refresh the data
  152. DWORD CleanupInterval; // Time interval between unused
  153. // file cleanups (sec)
  154. DWORD CleanupFactor; // % of the cache storage freed up
  155. // during cleanup
  156. DWORD CleanupTime; // scheduled time to clean up
  157. DWORD PersistentCache; // Allow cache not to be cleaned
  158. LPINET_ACCS_DISK_CACHE_LOC_LIST DiskCacheList;
  159. DWORD BandwidthLevel; // Bandwidth Level used.
  160. DWORD DomainFilterType; // set to either DENIED
  161. // or GRANT or DISABLED
  162. LPINET_ACCS_DOMAIN_FILTER_LIST GrantFilterList;
  163. // domain filter granted sites
  164. LPINET_ACCS_DOMAIN_FILTER_LIST DenyFilterList;
  165. // domain filter denied sites
  166. } INET_ACCS_GLOBAL_CONFIG_INFO, * LPINET_ACCS_GLOBAL_CONFIG_INFO;
  167. //
  168. // Global statistics
  169. //
  170. typedef struct _INET_ACCS_STATISTICS_0
  171. {
  172. INET_COM_CACHE_STATISTICS CacheCtrs;
  173. INET_COM_ATQ_STATISTICS AtqCtrs;
  174. # ifndef NO_AUX_PERF
  175. DWORD nAuxCounters; // number of active counters in rgCounters
  176. DWORD rgCounters[MAX_AUX_PERF_COUNTERS];
  177. # endif // NO_AUX_PERF
  178. } INET_ACCS_STATISTICS_0, * LPINET_ACCS_STATISTICS_0;
  179. //
  180. // Inet Access admin API Prototypes
  181. //
  182. NET_API_STATUS
  183. NET_API_FUNCTION
  184. InetAccessGetVersion(
  185. IN LPWSTR pszServer OPTIONAL,
  186. IN DWORD dwReserved,
  187. OUT DWORD * pdwVersion
  188. );
  189. NET_API_STATUS
  190. NET_API_FUNCTION
  191. InetAccessGetGlobalAdminInformation(
  192. IN LPWSTR pszServer OPTIONAL,
  193. IN DWORD dwReserved,
  194. OUT LPINET_ACCS_GLOBAL_CONFIG_INFO * ppConfig
  195. );
  196. NET_API_STATUS
  197. NET_API_FUNCTION
  198. InetAccessSetGlobalAdminInformation(
  199. IN LPWSTR pszServer OPTIONAL,
  200. IN DWORD dwReserved,
  201. IN INET_ACCS_GLOBAL_CONFIG_INFO * pConfig
  202. );
  203. NET_API_STATUS
  204. NET_API_FUNCTION
  205. InetAccessGetAdminInformation(
  206. IN LPWSTR pszServer OPTIONAL,
  207. IN DWORD dwServerMask,
  208. OUT LPINET_ACCS_CONFIG_INFO * ppConfig
  209. );
  210. NET_API_STATUS
  211. NET_API_FUNCTION
  212. InetAccessSetAdminInformation(
  213. IN LPWSTR pszServer OPTIONAL,
  214. IN DWORD dwServerMask,
  215. IN INET_ACCS_CONFIG_INFO * pConfig
  216. );
  217. NET_API_STATUS
  218. NET_API_FUNCTION
  219. InetAccessQueryStatistics(
  220. IN LPWSTR pszServer OPTIONAL,
  221. IN DWORD Level,
  222. IN DWORD dwServerMask,
  223. OUT LPBYTE * Buffer
  224. );
  225. NET_API_STATUS
  226. NET_API_FUNCTION
  227. InetAccessClearStatistics(
  228. IN LPWSTR pszServer OPTIONAL,
  229. IN DWORD dwServerMask
  230. );
  231. NET_API_STATUS
  232. NET_API_FUNCTION
  233. InetAccessFlushMemoryCache(
  234. IN LPWSTR pszServer OPTIONAL,
  235. IN DWORD dwServerMask
  236. );
  237. #ifdef __cplusplus
  238. }
  239. #endif // _cplusplus
  240. #endif // _INETACCS_H_