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.

260 lines
7.4 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. inetcom.h
  5. Abstract:
  6. This file contains contains global definitions for internet products.
  7. Author:
  8. Madan Appiah (madana) 10-Oct-1995
  9. Revision History:
  10. --*/
  11. #ifndef _INETCOM_H_
  12. #define _INETCOM_H_
  13. #ifdef __cplusplus
  14. extern "C"
  15. {
  16. #endif // _cplusplus
  17. # include <lmcons.h> // for definitions of NET_API*
  18. //
  19. // Server bitfield mask definitions
  20. //
  21. // The services using the tsunami cache must be the lowest bits in the
  22. // bitfield.
  23. //
  24. #define INET_FTP 0x0001
  25. #define INET_GOPHER 0x0002
  26. #define INET_HTTP 0x0004
  27. #define INET_DNS 0x0008
  28. #define INET_HTTP_PROXY 0x0010
  29. #define INET_MSN 0x0020
  30. #define INET_NNTP 0x0040
  31. #define INET_SMTP 0x0080
  32. #define INET_GATEWAY 0x0100
  33. #define INET_POP3 0x0200
  34. #define INET_CHAT 0x0400
  35. #define INET_LDAP 0x0800
  36. #define INET_IMAP 0x1000
  37. //
  38. // structure Field Control defines
  39. //
  40. typedef DWORD FIELD_CONTROL;
  41. typedef DWORD FIELD_FLAG;
  42. //
  43. // Returns TRUE if the field specified by bitFlag is set
  44. //
  45. #define IsFieldSet(fc, bitFlag) \
  46. (((FIELD_CONTROL)(fc) & (FIELD_FLAG)(bitFlag)) != 0)
  47. //
  48. // Indicates the field specified by bitFlag contains a valid value
  49. //
  50. #define SetField(fc, bitFlag) \
  51. ((FIELD_CONTROL)(fc) |= (FIELD_FLAG)(bitFlag))
  52. //
  53. // Simple macro that sets the ith bit
  54. //
  55. #define BitFlag(i) ((0x1) << (i))
  56. //
  57. // Values for Logging related parameters should match with values in
  58. // internet\svcs\inc\inetlog.h
  59. //
  60. //
  61. // Log Type
  62. //
  63. #define INET_LOG_INVALID ((DWORD ) -1)
  64. #define INET_LOG_DISABLED 0
  65. #define INET_LOG_TO_FILE 1
  66. #define INET_LOG_TO_SQL 2
  67. // Log File Periods -- options identifying logging periods for InetaLogToFile
  68. #define INET_LOG_PERIOD_NONE 0
  69. #define INET_LOG_PERIOD_DAILY 1
  70. #define INET_LOG_PERIOD_WEEKLY 2
  71. #define INET_LOG_PERIOD_MONTHLY 3
  72. #define INET_LOG_PERIOD_YEARLY 4
  73. // Log Format
  74. #define INET_LOG_FORMAT_INTERNET_STD 0
  75. #define INET_LOG_FORMAT_NCSA 3
  76. # define MAX_TABLE_NAME_LEN ( 30) // Most DBs support only 30 bytes
  77. # define MAX_USER_NAME_LEN ( UNLEN + 1)
  78. # define MAX_PASSWORD_LEN ( PWLEN + 1)
  79. typedef struct _INET_LOG_CONFIGURATION
  80. {
  81. DWORD inetLogType; // type of log.
  82. // File specific logging. (valid if inetLogType == INET_LOG_TO_FILE)
  83. DWORD ilPeriod; // one of Log File Periods
  84. // Empty string means do not modify existing default
  85. WCHAR rgchLogFileDirectory[MAX_PATH]; // dest for log files
  86. // Zero value means do not modify the existing default.
  87. DWORD cbSizeForTruncation; // max size for each log file.
  88. // Sql specific logging (valid if inetLogType == INET_LOG_TO_SQL)
  89. // Empty string means do not modify existing default
  90. // rgchDataSource last 4 bytes will be the ilFormat for the log format
  91. WCHAR rgchDataSource[MAX_PATH]; // ODBC data source name
  92. WCHAR rgchTableName[MAX_TABLE_NAME_LEN]; // table name on data source
  93. WCHAR rgchUserName[MAX_USER_NAME_LEN];
  94. // name of user for ODBC connections
  95. WCHAR rgchPassword[MAX_PASSWORD_LEN]; // password for ODBC connection
  96. } INET_LOG_CONFIGURATION, * LPINET_LOG_CONFIGURATION;
  97. //
  98. // Field Control common for Gateway services
  99. //
  100. #define FC_INET_COM_CONNECTION_TIMEOUT ((FIELD_CONTROL)BitFlag(0))
  101. #define FC_INET_COM_MAX_CONNECTIONS ((FIELD_CONTROL)BitFlag(1))
  102. #define FC_INET_COM_LOG_CONFIG ((FIELD_CONTROL)BitFlag(2))
  103. #define FC_INET_COM_ADMIN_NAME ((FIELD_CONTROL)BitFlag(3))
  104. #define FC_INET_COM_SERVER_COMMENT ((FIELD_CONTROL)BitFlag(4))
  105. #define FC_INET_COM_ADMIN_EMAIL ((FIELD_CONTROL)BitFlag(5))
  106. #define FC_INET_COM_ALL \
  107. ( FC_INET_COM_CONNECTION_TIMEOUT |\
  108. FC_INET_COM_MAX_CONNECTIONS |\
  109. FC_INET_COM_LOG_CONFIG |\
  110. FC_INET_COM_ADMIN_NAME |\
  111. FC_INET_COM_SERVER_COMMENT |\
  112. FC_INET_COM_ADMIN_EMAIL \
  113. )
  114. //
  115. // common config info.
  116. //
  117. typedef struct _INET_COM_CONFIG_INFO
  118. {
  119. DWORD dwConnectionTimeout; // how long to hold connections
  120. DWORD dwMaxConnections; // max connections allowed
  121. LPWSTR lpszAdminName;
  122. LPWSTR lpszAdminEmail;
  123. LPWSTR lpszServerComment;
  124. LPINET_LOG_CONFIGURATION lpLogConfig;
  125. LANGID LangId; // These are read only
  126. LCID LocalId;
  127. BYTE ProductId[64];
  128. } INET_COM_CONFIG_INFO, *LPINET_COM_CONFIG_INFO;
  129. typedef struct _INET_COMMON_CONFIG_INFO
  130. {
  131. FIELD_CONTROL FieldControl;
  132. INET_COM_CONFIG_INFO CommonConfigInfo;
  133. } *LPINET_COMMON_CONFIG_INFO;
  134. //
  135. // Global statistics
  136. //
  137. typedef struct _INET_COM_CACHE_STATISTICS {
  138. //
  139. // These are memory cache counters
  140. //
  141. DWORD CacheBytesTotal; // Only returned for global statistics
  142. DWORD CacheBytesInUse;
  143. DWORD CurrentOpenFileHandles;
  144. DWORD CurrentDirLists;
  145. DWORD CurrentObjects;
  146. DWORD FlushesFromDirChanges;
  147. DWORD CacheHits;
  148. DWORD CacheMisses;
  149. } INET_COM_CACHE_STATISTICS;
  150. typedef struct _INET_COM_ATQ_STATISTICS {
  151. // Numbers related to Atq Blocking, Rejections of requests
  152. DWORD TotalBlockedRequests;
  153. DWORD TotalRejectedRequests;
  154. DWORD TotalAllowedRequests;
  155. DWORD CurrentBlockedRequests;
  156. DWORD MeasuredBandwidth;
  157. } INET_COM_ATQ_STATISTICS;
  158. /////////////////////////////////////////////////////////////////////////
  159. // //
  160. // preserve back ward compatibility //
  161. // //
  162. /////////////////////////////////////////////////////////////////////////
  163. typedef INET_COM_CACHE_STATISTICS INETA_CACHE_STATISTICS,
  164. * LPINETA_CACHE_STATISTICS;
  165. typedef INET_COM_ATQ_STATISTICS INETA_ATQ_STATISTICS,
  166. * LPINETA_ATQ_STATISTICS;
  167. /////////////////////////////////////////////////////////////////////////
  168. // //
  169. // Stuff from Wininet.h, which is no longer included in the server //
  170. // files //
  171. // //
  172. /////////////////////////////////////////////////////////////////////////
  173. //
  174. // service types for InternetConnect() and dirlist
  175. //
  176. #define INTERNET_SERVICE_FTP 1
  177. #define INTERNET_SERVICE_GOPHER 2
  178. #define INTERNET_SERVICE_HTTP 3
  179. #ifdef __cplusplus
  180. }
  181. #endif // _cplusplus
  182. #endif // _INETCOM_H_