home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / iiscnfg.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  29KB  |  745 lines

  1. /*++
  2.  
  3.    Copyright (c) 1997 Microsoft Corporation
  4.  
  5.    Module  Name :
  6.  
  7.        iiscnfg.h
  8.  
  9.    Abstract:
  10.  
  11.         Contains public Metadata IDs used by IIS.
  12.  
  13.    Environment:
  14.  
  15.       Win32 User Mode
  16.  
  17. --*/
  18.  
  19. #ifndef _IISCNFG_H_
  20. #define _IISCNFG_H_
  21.  
  22.  
  23. //
  24. // Paths
  25. //
  26.  
  27. #define IIS_MD_LOCAL_MACHINE_PATH       "LM"
  28.  
  29. //
  30. // Name of the default publishing root under an instance
  31. //
  32.  
  33. #define IIS_MD_INSTANCE_ROOT            "Root"
  34.  
  35. //
  36. //  ISAPI Filters are kept in a list under the instances and the service (for
  37. //  global filters) in the following format:
  38. //
  39. //  LM/W3Svc/<Instance>/Filters
  40. //      MD_FILTER_LOAD_ORDER  "Filter1, Filter2, Filter3"
  41. //
  42. //  LM/W3Svc/<Instance>/Filters/Filter1
  43. //      MD_FILTER_IMAGE_PATH  "d:\inetsrv\myfilter.dll"
  44. //
  45. //  LM/W3Svc/<Instance>/Filters/Filter2
  46. //      MD_FILTER_IMAGE_PATH  "d:\inetsrv\otherfilter.dll"
  47. //
  48.  
  49. #define IIS_MD_ISAPI_FILTERS            "/Filters"
  50.  
  51. //
  52. // Path below each service to the key that publishes service information
  53. //
  54.  
  55. #define IIS_MD_SVC_INFO_PATH            "Info"
  56.  
  57. //
  58. // ADSI schema properties path
  59. //
  60.  
  61. #define IIS_MD_ADSI_SCHEMA_PATH_A       "/Schema"
  62. #define IIS_MD_ADSI_SCHEMA_PATH_W       L"/Schema"
  63.  
  64. //
  65. // user types
  66. //
  67. // There are two user types:
  68. //
  69. //   Server configuration - All the properties for configuring the server that
  70. //      are not applicable to files and directories - such as Port, Host name,
  71. //      Server comment, Connection timeout etc.
  72. //
  73. //  File/Dir configuration - All the properties that can be configured down to
  74. //      the files and directories - such as Access permissions (Read, Write etc),
  75. //      Extension mapping, IP Security etc.
  76. //
  77.  
  78. #define IIS_MD_UT_SERVER                1   // Server configuration parameters
  79. #define IIS_MD_UT_FILE                  2   // File/Dir inheritable properties
  80. #define IIS_MD_UT_WAM                 100   // Web Application configuration parameters
  81. #define ASP_MD_UT_APP                 101   // ASP application configuration parameters
  82. #define IIS_MD_UT_END_RESERVED       2000   // All user types below this are
  83.                                             // reserved for IIS services
  84.  
  85.  
  86. //
  87. //  Metabase property IDs must be unique.  This table defines reserved ranges
  88. //
  89.  
  90. #define IIS_MD_ID_BEGIN_RESERVED    0x00000001      // IIS reserved range
  91. #define IIS_MD_ID_END_RESERVED      0x00007fff
  92. #define ASP_MD_ID_BEGIN_RESERVED    0x00007000      // ASP reserved range, subrange of IIS.
  93. #define ASP_MD_ID_END_RESERVED      0x000074ff
  94. #define WAM_MD_ID_BEGIN_RESERVED    0x00007500      // ASP reserved range, subrange of IIS.
  95. #define WAM_MD_ID_END_RESERVED      0x00007fff
  96. #define FP_MD_ID_BEGIN_RESERVED     0x00008000      // Front page reserved range
  97. #define FP_MD_ID_END_RESERVED       0x00008fff
  98. #define SMTP_MD_ID_BEGIN_RESERVED   0x00009000
  99. #define SMTP_MD_ID_END_RESERVED     0x00009fff
  100. #define POP3_MD_ID_BEGIN_RESERVED   0x0000a000
  101. #define POP3_MD_ID_END_RESERVED     0x0000afff
  102. #define NNTP_MD_ID_BEGIN_RESERVED   0x0000b000
  103. #define NNTP_MD_ID_END_RESERVED     0x0000bfff
  104. #define IMAP_MD_ID_BEGIN_RESERVED   0x0000c000
  105. #define IMAP_MD_ID_END_RESERVED     0x0000cfff
  106. #define MSCS_MD_ID_BEGIN_RESERVED   0x0000d000
  107. #define MSCS_MD_ID_END_RESERVED     0x0000dfff
  108.  
  109. //
  110. //  General server related attributes - these should be added in the metabase
  111. //  with a user type of IIS_MD_UT_SERVER
  112. //
  113.  
  114. #define IIS_MD_SERVER_BASE              1000
  115.  
  116. //
  117. //  These are global to all services and should only be set at
  118. //  the IIS root
  119. //
  120.  
  121. #define MD_MAX_BANDWIDTH                (IIS_MD_SERVER_BASE+0  )
  122. #define MD_KEY_TYPE                     (IIS_MD_SERVER_BASE+2  )
  123. #define MD_MAX_BANDWIDTH_BLOCKED        (IIS_MD_SERVER_BASE+3  )
  124.  
  125. //
  126. //  These properties are applicable to both HTTP and FTP virtual
  127. //  servers
  128. //
  129.  
  130. #define MD_SERVER_COMMAND               (IIS_MD_SERVER_BASE+12 )
  131. #define MD_CONNECTION_TIMEOUT           (IIS_MD_SERVER_BASE+13 )
  132. #define MD_MAX_CONNECTIONS              (IIS_MD_SERVER_BASE+14 )
  133. #define MD_SERVER_COMMENT               (IIS_MD_SERVER_BASE+15 )
  134. #define MD_SERVER_STATE                 (IIS_MD_SERVER_BASE+16 )
  135. #define MD_SERVER_AUTOSTART             (IIS_MD_SERVER_BASE+17 )
  136. #define MD_SERVER_SIZE                  (IIS_MD_SERVER_BASE+18 )
  137. #define MD_SERVER_LISTEN_BACKLOG        (IIS_MD_SERVER_BASE+19 )
  138. #define MD_SERVER_LISTEN_TIMEOUT        (IIS_MD_SERVER_BASE+20 )
  139. #define MD_DOWNLEVEL_ADMIN_INSTANCE     (IIS_MD_SERVER_BASE+21 )
  140. #define MD_LEVELS_TO_SCAN               (IIS_MD_SERVER_BASE+22 )
  141. #define MD_SERVER_BINDINGS              (IIS_MD_SERVER_BASE+23 )
  142. #define MD_MAX_ENDPOINT_CONNECTIONS     (IIS_MD_SERVER_BASE+24 )
  143. #define MD_SERVER_CONFIGURATION_INFO    (IIS_MD_SERVER_BASE+27 )
  144. #define MD_IISADMIN_EXTENSIONS          (IIS_MD_SERVER_BASE+28 )
  145.  
  146.  
  147. //
  148. //  These properties are specific to HTTP and belong to the website
  149. //
  150.  
  151. #define IIS_MD_HTTP_BASE                2000
  152.  
  153. #define MD_SECURE_BINDINGS              (IIS_MD_HTTP_BASE+21 )
  154.  
  155. #define MD_FILTER_LOAD_ORDER            (IIS_MD_HTTP_BASE+40 )
  156. #define MD_FILTER_IMAGE_PATH            (IIS_MD_HTTP_BASE+41 )
  157. #define MD_FILTER_STATE                 (IIS_MD_HTTP_BASE+42 )
  158. #define MD_FILTER_ENABLED               (IIS_MD_HTTP_BASE+43 )
  159. #define MD_FILTER_FLAGS                 (IIS_MD_HTTP_BASE+44 )
  160. #define MD_FILTER_DESCRIPTION           (IIS_MD_HTTP_BASE+45 )
  161.  
  162. #define MD_ADV_NOTIFY_PWD_EXP_IN_DAYS   (IIS_MD_HTTP_BASE+63 )
  163. #define MD_ADV_CACHE_TTL                (IIS_MD_HTTP_BASE+64 )
  164. #define MD_NET_LOGON_WKS                (IIS_MD_HTTP_BASE+65 )
  165. #define MD_USE_HOST_NAME                (IIS_MD_HTTP_BASE+66 )
  166. #define MD_AUTH_CHANGE_FLAGS            (IIS_MD_HTTP_BASE+68 )
  167.  
  168. #define MD_PROCESS_NTCR_IF_LOGGED_ON    (IIS_MD_HTTP_BASE+70 )
  169.  
  170. #define MD_FRONTPAGE_WEB                (IIS_MD_HTTP_BASE+72 )
  171. #define MD_IN_PROCESS_ISAPI_APPS        (IIS_MD_HTTP_BASE+73 )
  172.  
  173. #define MD_ALLOW_PATH_INFO_FOR_SCRIPT_MAPPINGS  ( IIS_MD_HTTP_BASE+95)
  174.  
  175. #define MD_APP_FRIENDLY_NAME            (IIS_MD_HTTP_BASE+102)
  176. #define MD_APP_ROOT                     (IIS_MD_HTTP_BASE+103)
  177. #define MD_APP_ISOLATED                 (IIS_MD_HTTP_BASE+104)
  178. #define MD_APP_WAM_CLSID                (IIS_MD_HTTP_BASE+105)
  179. #define MD_APP_PACKAGE_ID               (IIS_MD_HTTP_BASE+106)
  180. #define MD_APP_PACKAGE_NAME             (IIS_MD_HTTP_BASE+107)
  181. #define MD_APP_OOP_RECOVER_LIMIT        (IIS_MD_HTTP_BASE+110)
  182.  
  183. #define MD_ADMIN_INSTANCE               (IIS_MD_HTTP_BASE+115)
  184.  
  185. #define MD_CUSTOM_ERROR_DESC            (IIS_MD_HTTP_BASE+120)
  186.  
  187. //
  188. //  Site Server properties
  189. //
  190.  
  191. #define MD_MD_SERVER_SS_AUTH_MAPPING    (IIS_MD_HTTP_BASE+200)
  192.  
  193. //
  194. // valid values for MD_CERT_CHECK_MODE
  195. //
  196.  
  197. #define MD_CERT_NO_REVOC_CHECK  0x00000001
  198.  
  199. //
  200. // Generic property indicating a failure status code - Can be used under
  201. // any component that can fail (virtual directory, filters, applications etc)
  202. //
  203.  
  204. #define MD_WIN32_ERROR                  (IIS_MD_SERVER_BASE+99 )
  205.  
  206. //
  207. // Virtual root properties - note MD_ACCESS_PERM is also generally set at
  208. // the virtual directory.  These are used for both HTTP and FTP
  209. //
  210.  
  211. #define IIS_MD_VR_BASE                  3000
  212.  
  213. #define MD_VR_PATH                      (IIS_MD_VR_BASE+1 )
  214. #define MD_VR_USERNAME                  (IIS_MD_VR_BASE+2 )
  215. #define MD_VR_PASSWORD                  (IIS_MD_VR_BASE+3 )
  216. #define MD_VR_PASSTHROUGH               (IIS_MD_VR_BASE+6 )
  217.  
  218.  
  219. //
  220. //  Logging related attributes
  221. //
  222.  
  223. #define IIS_MD_LOG_BASE                 4000
  224.  
  225. #define MD_LOG_TYPE                     (IIS_MD_LOG_BASE+0  )
  226. #define MD_LOGFILE_DIRECTORY            (IIS_MD_LOG_BASE+1  )
  227. #define MD_LOG_UNUSED1                  (IIS_MD_LOG_BASE+2  )
  228. #define MD_LOGFILE_PERIOD               (IIS_MD_LOG_BASE+3  )
  229. #define MD_LOGFILE_TRUNCATE_SIZE        (IIS_MD_LOG_BASE+4  )
  230. #define MD_LOG_PLUGIN_MOD_ID            (IIS_MD_LOG_BASE+5  )
  231. #define MD_LOG_PLUGIN_UI_ID             (IIS_MD_LOG_BASE+6  )
  232. #define MD_LOGSQL_DATA_SOURCES          (IIS_MD_LOG_BASE+7  )
  233. #define MD_LOGSQL_TABLE_NAME            (IIS_MD_LOG_BASE+8  )
  234. #define MD_LOGSQL_USER_NAME             (IIS_MD_LOG_BASE+9  )
  235. #define MD_LOGSQL_PASSWORD              (IIS_MD_LOG_BASE+10 )
  236. #define MD_LOG_PLUGIN_ORDER             (IIS_MD_LOG_BASE+11 )
  237. #define MD_LOG_PLUGINS_AVAILABLE        (IIS_MD_LOG_BASE+12 )
  238. #define MD_LOGEXT_FIELD_MASK            (IIS_MD_LOG_BASE+13 )
  239. #define MD_LOGEXT_FIELD_MASK2           (IIS_MD_LOG_BASE+14 )
  240.  
  241. #define IIS_MD_LOG_LAST                 MD_LOGEXT_FIELD_MASK2
  242.  
  243. //
  244. // Log type
  245. //
  246.  
  247. #define MD_LOG_TYPE_DISABLED            0
  248. #define MD_LOG_TYPE_ENABLED             1
  249.  
  250. //
  251. // LOGGING values
  252. //
  253.  
  254. #define MD_LOGFILE_PERIOD_NONE      0
  255. #define MD_LOGFILE_PERIOD_MAXSIZE   0
  256. #define MD_LOGFILE_PERIOD_DAILY     1
  257. #define MD_LOGFILE_PERIOD_WEEKLY    2
  258. #define MD_LOGFILE_PERIOD_MONTHLY   3
  259.  
  260. //
  261. // Field masks for extended logging
  262. //      Fields are logged in order of increasing mask value
  263. //
  264.  
  265. #define MD_EXTLOG_DATE                  0x00000001
  266. #define MD_EXTLOG_TIME                  0x00000002
  267. #define MD_EXTLOG_CLIENT_IP             0x00000004
  268. #define MD_EXTLOG_USERNAME              0x00000008
  269. #define MD_EXTLOG_SITE_NAME             0x00000010
  270. #define MD_EXTLOG_COMPUTER_NAME         0x00000020
  271. #define MD_EXTLOG_SERVER_IP             0x00000040
  272. #define MD_EXTLOG_METHOD                0x00000080
  273. #define MD_EXTLOG_URI_STEM              0x00000100
  274. #define MD_EXTLOG_URI_QUERY             0x00000200
  275. #define MD_EXTLOG_HTTP_STATUS           0x00000400
  276. #define MD_EXTLOG_WIN32_STATUS          0x00000800
  277. #define MD_EXTLOG_BYTES_SENT            0x00001000
  278. #define MD_EXTLOG_BYTES_RECV            0x00002000
  279. #define MD_EXTLOG_TIME_TAKEN            0x00004000
  280. #define MD_EXTLOG_SERVER_PORT           0x00008000
  281. #define MD_EXTLOG_USER_AGENT            0x00010000
  282. #define MD_EXTLOG_COOKIE                0x00020000
  283. #define MD_EXTLOG_REFERER               0x00040000
  284. #define MD_EXTLOG_PROTOCOL_VERSION      0x00080000
  285.  
  286. #define MD_DEFAULT_EXTLOG_FIELDS        (MD_EXTLOG_CLIENT_IP | \
  287.                                          MD_EXTLOG_TIME      | \
  288.                                          MD_EXTLOG_METHOD    | \
  289.                                          MD_EXTLOG_URI_STEM  | \
  290.                                          MD_EXTLOG_HTTP_STATUS)
  291.  
  292. //
  293. //  ISAPI Filter Notification Flags
  294. //
  295.  
  296. #define MD_NOTIFY_SECURE_PORT           0x00000001
  297. #define MD_NOTIFY_NONSECURE_PORT        0x00000002
  298.  
  299. #define MD_NOTIFY_READ_RAW_DATA         0x00008000
  300. #define MD_NOTIFY_PREPROC_HEADERS       0x00004000
  301. #define MD_NOTIFY_AUTHENTICATION        0x00002000
  302. #define MD_NOTIFY_URL_MAP               0x00001000
  303. #define MD_NOTIFY_ACCESS_DENIED         0x00000800
  304. #define MD_NOTIFY_SEND_RESPONSE         0x00000040
  305. #define MD_NOTIFY_SEND_RAW_DATA         0x00000400
  306. #define MD_NOTIFY_LOG                   0x00000200
  307. #define MD_NOTIFY_END_OF_REQUEST        0x00000080
  308. #define MD_NOTIFY_END_OF_NET_SESSION    0x00000100
  309.  
  310. //
  311. //  ISAPI Filter ordering flags
  312. //
  313.  
  314. #define MD_NOTIFY_ORDER_HIGH            0x00080000
  315. #define MD_NOTIFY_ORDER_MEDIUM          0x00040000
  316. #define MD_NOTIFY_ORDER_LOW             0x00020000
  317. #define MD_NOTIFY_ORDER_DEFAULT         MD_NOTIFY_ORDER_LOW
  318.  
  319. #define MD_NOTIFY_ORDER_MASK            (MD_NOTIFY_ORDER_HIGH   |    \
  320.                                          MD_NOTIFY_ORDER_MEDIUM |    \
  321.                                          MD_NOTIFY_ORDER_LOW)
  322.  
  323.  
  324. //
  325. //  These are FTP specific properties
  326. //
  327.  
  328. #define IIS_MD_FTP_BASE                 5000
  329.  
  330. #define MD_EXIT_MESSAGE                 (IIS_MD_FTP_BASE+1  )
  331. #define MD_GREETING_MESSAGE             (IIS_MD_FTP_BASE+2  )
  332. #define MD_MAX_CLIENTS_MESSAGE          (IIS_MD_FTP_BASE+3  )
  333. #define MD_MSDOS_DIR_OUTPUT             (IIS_MD_FTP_BASE+4  )
  334. #define MD_ALLOW_ANONYMOUS              (IIS_MD_FTP_BASE+5  )
  335. #define MD_ANONYMOUS_ONLY               (IIS_MD_FTP_BASE+6  )
  336. #define MD_LOG_ANONYMOUS                (IIS_MD_FTP_BASE+7  )
  337. #define MD_LOG_NONANONYMOUS             (IIS_MD_FTP_BASE+8  )
  338. #define MD_ALLOW_REPLACE_ON_RENAME      (IIS_MD_FTP_BASE+9  )
  339.  
  340.  
  341. //
  342. //  These are SSL specific properties
  343. //
  344.  
  345. #define IIS_MD_SSL_BASE                 5500
  346.  
  347. #define MD_SSL_PUBLIC_KEY               ( IIS_MD_SSL_BASE+0 )
  348. #define MD_SSL_PRIVATE_KEY              ( IIS_MD_SSL_BASE+1 )
  349. #define MD_SSL_KEY_PASSWORD             ( IIS_MD_SSL_BASE+2 )
  350. #define MD_SSL_KEY_REQUEST              ( IIS_MD_SSL_BASE+3 )
  351.  
  352. //
  353. //  File and Directory related properties - these should be added in the
  354. //  metabase with a user type of IIS_MD_UT_FILE
  355. //
  356.  
  357. #define IIS_MD_FILE_PROP_BASE           6000
  358.  
  359. #define MD_AUTHORIZATION                (IIS_MD_FILE_PROP_BASE )
  360. #define MD_REALM                        (IIS_MD_FILE_PROP_BASE+1 )
  361. #define MD_HTTP_EXPIRES                 (IIS_MD_FILE_PROP_BASE+2 )
  362. #define MD_HTTP_PICS                    (IIS_MD_FILE_PROP_BASE+3 )
  363. #define MD_HTTP_CUSTOM                  (IIS_MD_FILE_PROP_BASE+4 )
  364. #define MD_DIRECTORY_BROWSING           (IIS_MD_FILE_PROP_BASE+5 )
  365. #define MD_DEFAULT_LOAD_FILE            (IIS_MD_FILE_PROP_BASE+6 )
  366. #define MD_CUSTOM_ERROR                 (IIS_MD_FILE_PROP_BASE+8 )
  367. #define MD_FOOTER_DOCUMENT              (IIS_MD_FILE_PROP_BASE+9 )
  368. #define MD_FOOTER_ENABLED               (IIS_MD_FILE_PROP_BASE+10 )
  369. #define MD_HTTP_REDIRECT                (IIS_MD_FILE_PROP_BASE+11 )
  370. #define MD_DEFAULT_LOGON_DOMAIN         (IIS_MD_FILE_PROP_BASE+12 )
  371. #define MD_LOGON_METHOD                 (IIS_MD_FILE_PROP_BASE+13 )
  372. #define MD_SCRIPT_MAPS                  (IIS_MD_FILE_PROP_BASE+14 )
  373. #define MD_MIME_MAP                     (IIS_MD_FILE_PROP_BASE+15 )
  374. #define MD_ACCESS_PERM                  (IIS_MD_FILE_PROP_BASE+16 )
  375. #define MD_IP_SEC                       (IIS_MD_FILE_PROP_BASE+19 )
  376. #define MD_ANONYMOUS_USER_NAME          (IIS_MD_FILE_PROP_BASE+20 )
  377. #define MD_ANONYMOUS_PWD                (IIS_MD_FILE_PROP_BASE+21 )
  378. #define MD_ANONYMOUS_USE_SUBAUTH        (IIS_MD_FILE_PROP_BASE+22 )
  379. #define MD_DONT_LOG                     (IIS_MD_FILE_PROP_BASE+23 )
  380. #define MD_ADMIN_ACL                    (IIS_MD_FILE_PROP_BASE+27 )
  381. #define MD_SSI_EXEC_DISABLED            (IIS_MD_FILE_PROP_BASE+28 )
  382. #define MD_DO_REVERSE_DNS               (IIS_MD_FILE_PROP_BASE+29 )
  383. #define MD_SSL_ACCESS_PERM              (IIS_MD_FILE_PROP_BASE+30 )
  384. #define MD_AUTHORIZATION_PERSISTENCE    (IIS_MD_FILE_PROP_BASE+31 )
  385. #define MD_NTAUTHENTICATION_PROVIDERS   (IIS_MD_FILE_PROP_BASE+32 )
  386. #define MD_SCRIPT_TIMEOUT               (IIS_MD_FILE_PROP_BASE+33 )
  387. #define MD_CACHE_EXTENSIONS             (IIS_MD_FILE_PROP_BASE+34 )
  388. #define MD_CREATE_PROCESS_AS_USER       (IIS_MD_FILE_PROP_BASE+35 )
  389. #define MD_CREATE_PROC_NEW_CONSOLE      (IIS_MD_FILE_PROP_BASE+36 )
  390. #define MD_POOL_IDC_TIMEOUT             (IIS_MD_FILE_PROP_BASE+37 )
  391. #define MD_ALLOW_KEEPALIVES             (IIS_MD_FILE_PROP_BASE+38 )
  392. #define MD_IS_CONTENT_INDEXED           (IIS_MD_FILE_PROP_BASE+39 )
  393. #define MD_CC_NO_CACHE                  (IIS_MD_FILE_PROP_BASE+41 )
  394. #define MD_CC_MAX_AGE                   (IIS_MD_FILE_PROP_BASE+42 )
  395. #define MD_CC_OTHER                     (IIS_MD_FILE_PROP_BASE+43 )
  396. #define MD_REDIRECT_HEADERS             (IIS_MD_FILE_PROP_BASE+44 )
  397. #define MD_UPLOAD_READAHEAD_SIZE        (IIS_MD_FILE_PROP_BASE+45 )
  398. #define MD_PUT_READ_SIZE                (IIS_MD_FILE_PROP_BASE+46 )
  399.  
  400.  
  401. #define ASP_MD_SERVER_BASE                  7000
  402.  
  403. #define MD_ASP_BUFFERINGON                  (ASP_MD_SERVER_BASE + 0)
  404. #define MD_ASP_LOGERRORREQUESTS             (ASP_MD_SERVER_BASE + 1)
  405. #define MD_ASP_SCRIPTERRORSSENTTOBROWSER    (ASP_MD_SERVER_BASE + 2)
  406. #define MD_ASP_SCRIPTERRORMESSAGE           (ASP_MD_SERVER_BASE + 3)
  407. #define MD_ASP_SCRIPTFILECACHESIZE          (ASP_MD_SERVER_BASE + 4)
  408. #define MD_ASP_SCRIPTENGINECACHEMAX         (ASP_MD_SERVER_BASE + 5)
  409. #define MD_ASP_SCRIPTTIMEOUT                (ASP_MD_SERVER_BASE + 6)
  410. #define MD_ASP_SESSIONTIMEOUT               (ASP_MD_SERVER_BASE + 7)
  411. #define MD_ASP_ENABLEPARENTPATHS            (ASP_MD_SERVER_BASE + 8)
  412. #define MD_ASP_MEMFREEFACTOR                (ASP_MD_SERVER_BASE + 9)
  413. #define MD_ASP_MINUSEDBLOCKS                (ASP_MD_SERVER_BASE + 10)
  414. #define MD_ASP_ALLOWSESSIONSTATE            (ASP_MD_SERVER_BASE + 11)
  415. #define MD_ASP_SCRIPTLANGUAGE               (ASP_MD_SERVER_BASE + 12)
  416. #define MD_ASP_QUEUETIMEOUT                 (ASP_MD_SERVER_BASE + 13)
  417. #define MD_ASP_ALLOWOUTOFPROCCOMPONENTS     (ASP_MD_SERVER_BASE + 14)
  418. #define MD_ASP_ALLOWOUTOFPROCCMPNTS         (MD_ASP_ALLOWOUTOFPROCCOMPONENTS)    // Deprecated.  Use MD_ASP_ALLOWOUTOFPROCCMPNTS
  419. #define MD_ASP_EXCEPTIONCATCHENABLE         (ASP_MD_SERVER_BASE + 15)
  420. #define MD_ASP_CODEPAGE                     (ASP_MD_SERVER_BASE + 16)
  421. #define MD_ASP_SCRIPTLANGUAGELIST           (ASP_MD_SERVER_BASE + 17)
  422. #define MD_ASP_ENABLESERVERDEBUG            (ASP_MD_SERVER_BASE + 18)
  423. #define MD_ASP_ENABLECLIENTDEBUG            (ASP_MD_SERVER_BASE + 19)
  424. #define MD_ASP_TRACKTHREADINGMODEL          (ASP_MD_SERVER_BASE + 20)
  425.  
  426. #define MD_ASP_ID_LAST                      (ASP_MD_SERVER_BASE + 20)
  427.  
  428.  
  429. //
  430. //  Valid values for WAM
  431. //
  432. #define WAM_MD_SERVER_BASE                  7500
  433.  
  434. #define MD_WAM_USER_NAME                (WAM_MD_SERVER_BASE+1)
  435. #define MD_WAM_PWD                      (WAM_MD_SERVER_BASE+2)
  436.  
  437. //
  438. //  Valid values for MD_AUTHORIZATION
  439. //
  440.  
  441. #define MD_AUTH_ANONYMOUS               0x00000001
  442. #define MD_AUTH_BASIC                   0x00000002
  443. #define MD_AUTH_NT                      0x00000004    // Use NT auth provider (like NTLM)
  444.  
  445. //
  446. //  Valid values for MD_AUTHORIZATION_PERSISTENCE
  447. //
  448.  
  449.  
  450. #define MD_AUTH_SINGLEREQUEST                   0x00000040
  451. #define MD_AUTH_SINGLEREQUESTIFPROXY            0x00000080
  452. #define MD_AUTH_SINGLEREQUESTALWAYSIFPROXY      0x00000100
  453.  
  454. //
  455. //  Valid values for MD_ACCESS_PERM
  456. //
  457.  
  458. #define MD_ACCESS_READ                  0x00000001    // Allow for Read
  459. #define MD_ACCESS_WRITE                 0x00000002    // Allow for Write
  460. #define MD_ACCESS_EXECUTE               0x00000004    // Allow for Execute
  461. #define MD_ACCESS_SCRIPT                0x00000200    // Allow for Script execution
  462. #define MD_ACCESS_NO_REMOTE_WRITE       0x00000400    // Local host access only
  463. #define MD_ACCESS_NO_REMOTE_READ        0x00001000    // Local host access only
  464. #define MD_ACCESS_NO_REMOTE_EXECUTE     0x00002000    // Local host access only
  465. #define MD_ACCESS_NO_REMOTE_SCRIPT      0x00004000    // Local host access only
  466.  
  467. #define MD_NONSLL_ACCESS_MASK           (MD_ACCESS_READ|                \
  468.                                          MD_ACCESS_WRITE|               \
  469.                                          MD_ACCESS_EXECUTE|             \
  470.                                          MD_ACCESS_SCRIPT|              \
  471.                                          MD_ACCESS_NO_REMOTE_READ|      \
  472.                                          MD_ACCESS_NO_REMOTE_WRITE|     \
  473.                                          MD_ACCESS_NO_REMOTE_EXECUTE|   \
  474.                                          MD_ACCESS_NO_REMOTE_SCRIPT     \
  475.                                          )
  476. //
  477. //  Valid values for MD_SSL_ACCESS_PERM
  478. //
  479.  
  480. #define MD_ACCESS_SSL                   0x00000008    // Require SSL
  481. #define MD_ACCESS_NEGO_CERT             0x00000020    // Allow client SSL certs
  482. #define MD_ACCESS_REQUIRE_CERT          0x00000040    // Require client SSL certs
  483. #define MD_ACCESS_MAP_CERT              0x00000080    // Map SSL cert to NT account
  484. #define MD_ACCESS_SSL128                0x00000100    // Require 128 bit SSL
  485.  
  486. #define MD_SSL_ACCESS_MASK              (MD_ACCESS_SSL|\
  487.                                          MD_ACCESS_NEGO_CERT|\
  488.                                          MD_ACCESS_REQUIRE_CERT|\
  489.                                          MD_ACCESS_MAP_CERT|\
  490.                                          MD_ACCESS_SSL128)
  491.  
  492. #define MD_ACCESS_MASK                  0x00007fff
  493.  
  494. //
  495. //  Valid values for MD_DIRECTORY_BROWSING
  496. //
  497.  
  498. #define MD_DIRBROW_SHOW_DATE            0x00000002
  499. #define MD_DIRBROW_SHOW_TIME            0x00000004
  500. #define MD_DIRBROW_SHOW_SIZE            0x00000008
  501. #define MD_DIRBROW_SHOW_EXTENSION       0x00000010
  502. #define MD_DIRBROW_LONG_DATE            0x00000020
  503.  
  504. #define MD_DIRBROW_ENABLED              0x80000000  // Allow directory browsing
  505. #define MD_DIRBROW_LOADDEFAULT          0x40000000  // Load default doc if exists
  506.  
  507. #define MD_DIRBROW_MASK                 (MD_DIRBROW_SHOW_DATE      |    \
  508.                                          MD_DIRBROW_SHOW_TIME      |    \
  509.                                          MD_DIRBROW_SHOW_SIZE      |    \
  510.                                          MD_DIRBROW_SHOW_EXTENSION |    \
  511.                                          MD_DIRBROW_LONG_DATE      |    \
  512.                                          MD_DIRBROW_LOADDEFAULT    |    \
  513.                                          MD_DIRBROW_ENABLED)
  514.  
  515.  
  516.  
  517. //
  518. //  Valid values for MD_LOGON_METHOD
  519. //
  520.  
  521. #define MD_LOGON_INTERACTIVE    0
  522. #define MD_LOGON_BATCH          1
  523. #define MD_LOGON_NETWORK        2
  524.  
  525. //
  526. // Valid values for MD_NOTIFY_EXAUTH
  527. //
  528.  
  529. #define MD_NOTIFEXAUTH_NTLMSSL  1
  530.  
  531. //
  532. //  Valid values for MD_FILTER_STATE
  533. //
  534.  
  535. #define MD_FILTER_STATE_LOADED          1
  536. #define MD_FILTER_STATE_UNLOADED        4
  537.  
  538. //
  539. //  Valid values for MD_SERVER_STATE
  540. //
  541.  
  542. #define MD_SERVER_STATE_STARTING        1
  543. #define MD_SERVER_STATE_STARTED         2
  544. #define MD_SERVER_STATE_STOPPING        3
  545. #define MD_SERVER_STATE_STOPPED         4
  546. #define MD_SERVER_STATE_PAUSING         5
  547. #define MD_SERVER_STATE_PAUSED          6
  548. #define MD_SERVER_STATE_CONTINUING      7
  549.  
  550. //
  551. //  Valid values for MD_SERVER_COMMAND
  552. //
  553.  
  554. #define MD_SERVER_COMMAND_START         1
  555. #define MD_SERVER_COMMAND_STOP          2
  556. #define MD_SERVER_COMMAND_PAUSE         3
  557. #define MD_SERVER_COMMAND_CONTINUE      4
  558.  
  559. //
  560. //  Valid values for MD_SERVER_SIZE
  561. //
  562.  
  563. #define MD_SERVER_SIZE_SMALL            0
  564. #define MD_SERVER_SIZE_MEDIUM           1
  565. #define MD_SERVER_SIZE_LARGE            2
  566.  
  567. //
  568. // Valid values for MD_SERVER_CONFIG_INFO
  569. //
  570.  
  571. #define MD_SERVER_CONFIG_SSL_40         0x00000001
  572. #define MD_SERVER_CONFIG_SSL_128        0x00000002
  573. #define MD_SERVER_CONFIG_ALLOW_ENCRYPT  0x00000004
  574. #define MD_SERVER_CONFIG_AUTO_PW_SYNC   0x00000008
  575.  
  576. #define MD_SERVER_CONFIGURATION_MASK   (MD_SERVER_CONFIG_SSL_40       | \
  577.                                         MD_SERVER_CONFIG_SSL_128      | \
  578.                                         MD_SERVER_CONFIG_ENCRYPT      | \
  579.                                         MD_SERVER_CONFIG_AUTO_PW_SYNC)
  580.  
  581. //
  582. // Valid values for MD_SCRIPT_MAPS flag field
  583. //
  584.  
  585. #define MD_SCRIPTMAPFLAG_SCRIPT                     0x00000001
  586. #define MD_SCRIPTMAPFLAG_CHECK_PATH_INFO            0x00000004
  587.  
  588. //
  589. //  Bogus value - do not use
  590. //
  591. #define MD_SCRIPTMAPFLAG_ALLOWED_ON_READ_DIR        0x00000001
  592.  
  593.  
  594. //
  595. // Valid values for MD_AUTH_CHANGE_ENABLE
  596. //
  597.  
  598. #define MD_AUTH_CHANGE_UNSECURE     0x00000001
  599. #define MD_AUTH_CHANGE_DISABLE      0x00000002
  600. #define MD_AUTH_ADVNOTIFY_DISABLE   0x00000004
  601.  
  602. //
  603. // Valid values for MD_NET_LOGON_WKS
  604. //
  605.  
  606. #define MD_NETLOGON_WKS_NONE        0
  607. #define MD_NETLOGON_WKS_IP          1
  608. #define MD_NETLOGON_WKS_DNS         2
  609.  
  610. //
  611. //  Valide substatus errors for MD_CUSTOM_ERROR
  612. //
  613.  
  614. #define MD_ERROR_SUB401_LOGON                   1
  615. #define MD_ERROR_SUB401_LOGON_CONFIG            2
  616. #define MD_ERROR_SUB401_LOGON_ACL               3
  617. #define MD_ERROR_SUB401_FILTER                  4
  618. #define MD_ERROR_SUB401_APPLICATION             5
  619.  
  620. #define MD_ERROR_SUB403_EXECUTE_ACCESS_DENIED   1
  621. #define MD_ERROR_SUB403_READ_ACCESS_DENIED      2
  622. #define MD_ERROR_SUB403_WRITE_ACCESS_DENIED     3
  623. #define MD_ERROR_SUB403_SSL_REQUIRED            4
  624. #define MD_ERROR_SUB403_SSL128_REQUIRED         5
  625. #define MD_ERROR_SUB403_ADDR_REJECT             6
  626. #define MD_ERROR_SUB403_CERT_REQUIRED           7
  627. #define MD_ERROR_SUB403_SITE_ACCESS_DENIED      8
  628. #define MD_ERROR_SUB403_TOO_MANY_USERS          9
  629. #define MD_ERROR_SUB403_INVALID_CNFG           10
  630. #define MD_ERROR_SUB403_PWD_CHANGE             11
  631. #define MD_ERROR_SUB403_MAPPER_DENY_ACCESS     12
  632. #define MD_ERROR_SUB403_CA_NOT_ALLOWED         13
  633. #define MD_ERROR_SUB403_DIR_LIST_DENIED        14
  634.  
  635. #define MD_ERROR_SUB502_TIMEOUT                 1
  636. #define MD_ERROR_SUB502_PREMATURE_EXIT          2
  637.  
  638. //
  639. // Valid access rights for ACE entries in MD_ADMIN_ACL
  640. //
  641.  
  642. #define MD_ACR_READ                 0x00000001
  643. #define MD_ACR_WRITE                0x00000002
  644. #define MD_ACR_RESTRICTED_WRITE     0x00000020
  645. #define MD_ACR_UNSECURE_PROPS_READ  0x00000080
  646. #define MD_ACR_ENUM_KEYS            0x00000008
  647. #define MD_ACR_WRITE_DAC            0x00040000
  648.  
  649.  
  650. //
  651. // MD_IP_SEC binary format description
  652. //
  653.  
  654. /*
  655.  
  656.   This object is composed of 4 lists : 2 lists ( deny & grant ) of network addresses,
  657.   the only allowed family is AF_INET.
  658.   Each of this list is composed of sublists, one for each ( network address family,
  659.   significant subnet mask ) combination. The significant subnet mask is stored as
  660.   ( number of bytes all 1 ( 0xff ), bitmask in last byte ).
  661.   This is followed by 2 lists ( deny & grant ) of DNS names. Each of these lists is
  662.   composed of sublists, based on then number of components in the DNS name
  663.   e.g. "microsoft.com" has 2 components, "www.msft.com" has 3.
  664.  
  665. Header:
  666.     SELFREFINDEX    iDenyAddr;      // address deny list
  667.                                     // points to ADDRESS_HEADER
  668.     SELFREFINDEX    iGrantAddr;     // address grant list
  669.                                     // points to ADDRESS_HEADER
  670.     SELFREFINDEX    iDenyName;      // DNS name deny list
  671.                                     // points to NAME_HEADER
  672.     SELFREFINDEX    iGrantName;     // DNS name grant list
  673.                                     // points to NAME_HEADER
  674.     DWORD           dwFlags;
  675.     DWORD           cRefSize;       // size of reference area ( in bytes )
  676.  
  677. ADDRESS_HEADER :
  678.     DWORD               cEntries;   // # of Entries[]
  679.     DWORD               cAddresses; // total # of addresses in all
  680.                                     // ADDRESS_LIST_ENTRY
  681.     ADDRESS_LIST_ENTRY  Entries[];
  682.  
  683. ADDRESS_LIST_ENTRY :
  684.     DWORD           iFamily;
  685.     DWORD           cAddresses;
  686.     DWORD           cFullBytes;
  687.     DWORD           LastByte;
  688.     SELFREFINDEX    iFirstAddress;  // points to array of addresses
  689.  
  690. NAME_HEADER :
  691.     DWORD           cEntries;
  692.     DWORD           cNames;         // total # of names for all Entries[]
  693.     NAME_LIST_ENTRY Entries[];
  694.  
  695. Name list entry :
  696.     DWORD           cComponents;    // # of DNS components
  697.     DWORD           cNames;
  698.     SELFREFINDEX    iName[];        // array of references to DNS names
  699.  
  700. This is followed by address arrays & names pointed to by iFirstAddress & iName
  701. Names are '\0' delimited
  702.  
  703. SELFREFINDEX is a DWORD offset from start of structure with high bit set to 1
  704.  
  705. */
  706.  
  707. //
  708. // Macros
  709. //
  710.  
  711. #define MD_SET_DATA_RECORD(_pMDR, _id, _attr, _utype, _dtype, _dlen, _pData) \
  712.             { \
  713.             (_pMDR)->dwMDIdentifier=(_id);      \
  714.             (_pMDR)->dwMDAttributes=(_attr);    \
  715.             (_pMDR)->dwMDUserType=(_utype);     \
  716.             (_pMDR)->dwMDDataType=(_dtype);     \
  717.             (_pMDR)->dwMDDataLen=(_dlen);       \
  718.             (_pMDR)->pbMDData=(LPBYTE)(_pData); \
  719.             }
  720.  
  721. //
  722. // IIS ADSI Admin Object class names
  723. //
  724.  
  725. #define IIS_CLASS_COMPUTER             "IIsComputer"
  726. #define IIS_CLASS_WEB_SERVICE          "IIsWebService"
  727. #define IIS_CLASS_WEB_SERVER           "IIsWebServer"
  728. #define IIS_CLASS_WEB_INFO             "IIsWebInfo"
  729. #define IIS_CLASS_WEB_DIR              "IIsWebDirectory"
  730. #define IIS_CLASS_WEB_VDIR             "IIsWebVirtualDir"
  731. #define IIS_CLASS_WEB_FILE             "IIsWebFile"
  732. #define IIS_CLASS_FTP_SERVICE          "IIsFtpService"
  733. #define IIS_CLASS_FTP_SERVER           "IIsFtpServer"
  734. #define IIS_CLASS_FTP_INFO             "IIsFtpInfo"
  735. #define IIS_CLASS_FTP_VDIR             "IIsFtpVirtualDir"
  736. #define IIS_CLASS_FILTERS              "IIsFilters"
  737. #define IIS_CLASS_FILTER               "IIsFilter"
  738. #define IIS_CLASS_LOG_MODULES          "IIsLogModules"
  739. #define IIS_CLASS_LOG_MODULE           "IIsLogModule"
  740. #define IIS_CLASS_MIMEMAP              "IIsMimeMap"
  741. #define IIS_CLASS_CERTMAPPER           "IIsCertMapper"
  742.  
  743.  
  744. #endif // _IISCNFG_H_
  745.