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.

231 lines
6.2 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. #ifndef dllexp
  19. # define dllexp __declspec( dllexport)
  20. #endif // dllexp
  21. //
  22. // Server bitfield mask definitions
  23. //
  24. // The services using the tsunami cache must be the lowest bits in the
  25. // bitfield.
  26. //
  27. #define INET_FTP INET_FTP_SVC_ID
  28. #define INET_GOPHER INET_GOPHER_SVC_ID
  29. #define INET_HTTP INET_HTTP_SVC_ID
  30. //
  31. // service ids
  32. //
  33. #define INET_FTP_SVC_ID 0x00000001
  34. #define INET_GOPHER_SVC_ID 0x00000002
  35. #define INET_HTTP_SVC_ID 0x00000004
  36. #define INET_DNS_SVC_ID 0x00000008
  37. #define INET_HTTP_PROXY 0x00000010
  38. #define INET_NNTP_SVC_ID 0x00000040
  39. #define INET_SMTP_SVC_ID 0x00000080
  40. #define INET_GATEWAY_SVC_ID 0x00000100
  41. #define INET_POP3_SVC_ID 0x00000200
  42. #define INET_CHAT_SVC_ID 0x00000400
  43. #define INET_LDAP_SVC_ID 0x00000800
  44. #define INET_IMAP_SVC_ID 0x00001000
  45. //
  46. // structure Field Control defines
  47. //
  48. typedef DWORD FIELD_CONTROL;
  49. typedef DWORD FIELD_FLAG;
  50. //
  51. // Returns TRUE if the field specified by bitFlag is set
  52. //
  53. #define IsFieldSet(fc, bitFlag) \
  54. (((FIELD_CONTROL)(fc) & (FIELD_FLAG)(bitFlag)) != 0)
  55. //
  56. // Indicates the field specified by bitFlag contains a valid value
  57. //
  58. #define SetField(fc, bitFlag) \
  59. ((FIELD_CONTROL)(fc) |= (FIELD_FLAG)(bitFlag))
  60. //
  61. // Simple macro that sets the ith bit
  62. //
  63. #define BitFlag(i) ((0x1) << (i))
  64. //
  65. // Values for Logging related parameters should match with values in
  66. // internet\svcs\inc\inetlog.h
  67. //
  68. //
  69. // Log Type
  70. //
  71. #define INET_LOG_INVALID ((DWORD ) -1)
  72. #define INET_LOG_DISABLED 0
  73. #define INET_LOG_TO_FILE 1
  74. #define INET_LOG_TO_SQL 2
  75. //
  76. // Log File Periods -- options identifying logging periods for InetaLogToFile
  77. //
  78. #define INET_LOG_PERIOD_INVALID ((DWORD)-1)
  79. #define INET_LOG_PERIOD_NONE 0
  80. #define INET_LOG_PERIOD_DAILY 1
  81. #define INET_LOG_PERIOD_WEEKLY 2
  82. #define INET_LOG_PERIOD_MONTHLY 3
  83. #define INET_LOG_PERIOD_HOURLY 4
  84. #define INET_LOG_PERIOD_YEARLY 5 // unsupported
  85. //
  86. // Log Format
  87. //
  88. #define INET_LOG_FORMAT_INTERNET_STD 0
  89. #define INET_LOG_FORMAT_NCSA 3
  90. #define INET_LOG_FORMAT_BINARY 1
  91. #define INET_LOG_FORMAT_CUSTOM 2
  92. #define INET_LOG_FORMAT_EXTENDED 2
  93. # define MAX_TABLE_NAME_LEN ( 30) // Most DBs support only 30 bytes
  94. # define MAX_USER_NAME_LEN ( UNLEN + 1)
  95. # define MAX_PASSWORD_LEN ( PWLEN + 1)
  96. typedef struct _INET_LOG_CONFIGURATION
  97. {
  98. DWORD inetLogType; // type of log.
  99. // File specific logging. (valid if inetLogType == INET_LOG_TO_FILE)
  100. DWORD ilPeriod; // one of Log File Periods
  101. // Empty string means do not modify existing default
  102. WCHAR rgchLogFileDirectory[MAX_PATH]; // dest for log files
  103. // Zero value means do not modify the existing default.
  104. DWORD cbSizeForTruncation; // max size for each log file.
  105. // Sql specific logging (valid if inetLogType == INET_LOG_TO_SQL)
  106. // Empty string means do not modify existing default
  107. // rgchDataSource last 4 bytes will be the ilFormat for the log format
  108. // rgchDataSource second last 4 bytes will be the binary mask for the binary logging format
  109. WCHAR rgchDataSource[MAX_PATH]; // ODBC data source name
  110. WCHAR rgchTableName[MAX_TABLE_NAME_LEN]; // table name on data source
  111. WCHAR rgchUserName[MAX_USER_NAME_LEN];
  112. // name of user for ODBC connections
  113. WCHAR rgchPassword[MAX_PASSWORD_LEN]; // password for ODBC connection
  114. } INET_LOG_CONFIGURATION, * LPINET_LOG_CONFIGURATION;
  115. //
  116. // Global statistics
  117. //
  118. typedef struct _INETA_CACHE_STATISTICS {
  119. //
  120. // These are file handle cache counters (global only)
  121. //
  122. DWORD FilesCached; // # of files currently in the cache
  123. DWORD TotalFilesCached; // # of files added to the cache ever
  124. DWORD FileHits; // cache hits
  125. DWORD FileMisses; // cache misses
  126. DWORD FileFlushes; // flushes due to dir change or other
  127. DWORDLONG CurrentFileCacheSize;// Current file cache size
  128. DWORDLONG MaximumFileCacheSize;// Maximum file cache size
  129. DWORD FlushedEntries; // # of flushed entries still kicking around
  130. DWORD TotalFlushed; // # of entries ever flushed from the cache
  131. //
  132. // These are URI cache counters (global only)
  133. //
  134. DWORD URICached; // # of files currently in the cache
  135. DWORD TotalURICached; // # of files added to the cache ever
  136. DWORD URIHits; // cache hits
  137. DWORD URIMisses; // cache misses
  138. DWORD URIFlushes; // flushes due to dir change or other
  139. DWORD TotalURIFlushed; // # of entries ever flushed from the cache
  140. //
  141. // These are blob cache counters (global only)
  142. //
  143. DWORD BlobCached; // # of files currently in the cache
  144. DWORD TotalBlobCached; // # of files added to the cache ever
  145. DWORD BlobHits; // cache hits
  146. DWORD BlobMisses; // cache misses
  147. DWORD BlobFlushes; // flushes due to dir change or other
  148. DWORD TotalBlobFlushed; // # of entries ever flushed from the cache
  149. } INETA_CACHE_STATISTICS, *LPINETA_CACHE_STATISTICS;
  150. typedef struct _INETA_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. } INETA_ATQ_STATISTICS, *LPINETA_ATQ_STATISTICS;
  158. //
  159. // service types for InternetConnect() and dirlist
  160. //
  161. #define INTERNET_SERVICE_FTP 1
  162. #define INTERNET_SERVICE_GOPHER 2
  163. #define INTERNET_SERVICE_HTTP 3
  164. #ifdef __cplusplus
  165. }
  166. #endif // _cplusplus
  167. #endif // _INETCOM_H_