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.

151 lines
5.0 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996-1998
  5. //
  6. // File: lscommon.h
  7. //
  8. // Contents:
  9. //
  10. // History:
  11. //
  12. //---------------------------------------------------------------------------
  13. #ifndef __LSCOMMON_H__
  14. #define __LSCOMMON_H__
  15. //
  16. // Setup related
  17. //
  18. #define SZAPPNAME "lserver"
  19. #define SZSERVICENAME "TermServLicensing"
  20. #define SZSERVICEDISPLAYNAME "Terminal Server Licensing"
  21. #define LSERVER_DEFAULT_DBDIR "lserver"
  22. #define SZDEPENDENCIES "RPCSS\0\0"
  23. #define SZACCESSDRIVERNAME "Microsoft Access Driver (*.mdb)"
  24. //
  25. // These are the old locations, only used to migrate
  26. //
  27. #define LSERVER_LSA_PASSWORD_KEYNAME_OLD _TEXT("TermServLiceningPwd-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  28. #define LSERVER_LSA_LASTRUN_OLD _TEXT("TermServLicensingStatus-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  29. #define LSERVER_LSA_SETUPID_OLD _TEXT("TermServLicensingSetupId-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  30. #define LSERVER_LSA_PRIVATEKEY_SIGNATURE_OLD _TEXT("TermServLiceningSignKey-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  31. #define LSERVER_LSA_PRIVATEKEY_EXCHANGE_OLD _TEXT("TermServLicensingExchKey-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  32. #define LSERVER_LSA_LSERVERID_OLD _TEXT("TermServLicensingServerId-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  33. //
  34. // These are the new locations, with an L$ prepended so that only local callers
  35. // can read or write
  36. //
  37. #define LSERVER_LSA_PASSWORD_KEYNAME _TEXT("L$TermServLiceningPwd-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  38. #define LSERVER_LSA_LASTRUN _TEXT("L$TermServLicensingStatus-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  39. #define LSERVER_LSA_SETUPID _TEXT("L$TermServLicensingSetupId-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  40. #define LSERVER_LSA_PRIVATEKEY_SIGNATURE _TEXT("L$TermServLiceningSignKey-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  41. #define LSERVER_LSA_PRIVATEKEY_EXCHANGE _TEXT("L$TermServLicensingExchKey-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  42. #define LSERVER_LSA_LSERVERID _TEXT("L$TermServLicensingServerId-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  43. //
  44. // Keep this here for License Server OC setup.
  45. //
  46. #define LSERVER_LSA_STRUCT_VERSION 0x00010000 // version 1.0
  47. typedef struct {
  48. DWORD dwVersion;
  49. DWORD dwMaxKeyPackId;
  50. DWORD dwMaxLicenseId;
  51. } TLServerLastRunState, *LPTLServerLastRunState;
  52. #define LSERVER_LSA_LASTRUN_VER_CURRENT LSERVER_LSA_STRUCT_VERSION20
  53. typedef struct {
  54. DWORD dwVersion;
  55. DWORD dwMaxKeyPackId;
  56. DWORD dwMaxLicenseId;
  57. FILETIME ftLastShutdownTime;
  58. } TLServerLastRun, *LPTLServerLastRun;
  59. #define LSERVER_LSA_STRUCT_VERSION20 0x00020000
  60. #define LSERVER_DEFAULT_DBPATH _TEXT("%SYSTEMROOT%\\SYSTEM32\\LSERVER\\")
  61. #define LSERVER_DEFAULT_USER _TEXT("sa")
  62. #define LSERVER_DEFAULT_PWD _TEXT("password")
  63. #define LSERVER_DEFAULT_EDB _TEXT("TLSLic.edb")
  64. #define LSERVER_DEFAULT_EMPTYEDB _TEXT("Empty.edb")
  65. //-----------------------------------------------------------------------------
  66. //
  67. // TODO - client need to define this
  68. //
  69. #define LSERVER_DISCOVERY_PARAMETER_KEY "Software\\Microsoft\\MSLicensing\\Parameters"
  70. #define LSERVER_LOOKUP_TIMEOUT "TimeOut"
  71. #define LSERVER_LOOKUP_DEFAULT_TIMEOUT 1*1000 // default to 1 second timeout
  72. //-----------------------------------------------------------------------------
  73. //
  74. // RPC
  75. //
  76. #define RPC_ENTRYNAME "/.:/HydraLSFrontEnd"
  77. #define RPC_PROTOSEQTCP "ncacn_ip_tcp"
  78. #define RPC_PROTOSEQLPC "ncalrpc"
  79. #define RPC_PROTOSEQNP "ncacn_np"
  80. #define HLSPIPENAME "HydraLsPipe"
  81. #define LSNAMEPIPE "\\pipe\\HydraLsPipe"
  82. #define SERVERMAILSLOTNAME "HydraLsServer"
  83. #define CLIENTMAILSLOTNAME "HydraLsClient"
  84. #define MAX_MAILSLOT_MSG_SIZE MAX_COMPUTERNAME_LENGTH+_MAX_PATH+80
  85. //
  86. // Currently supported mailslot protocol
  87. //
  88. #define LSERVER_DISCOVERY "DISC"
  89. #define LSERVER_CHALLENGE "CHAL"
  90. #define LSERVER_OPEN_BLK '<'
  91. #define LSERVER_CLOSE_BLK '>'
  92. // -------------------------------------------------------------------------------
  93. //
  94. // Current database version
  95. //
  96. //
  97. #define W2K_BETA3_JETBLUE_DBVERSION 0x00000001
  98. #define W2K_RTM_JETBLUE_DBVERSION 0x00000002
  99. #define ENFORCE_JETBLUE_DBVERSION 0x80000000
  100. #ifdef ENFORCE_LICENSING
  101. #define TLS_BETA_DBVERSION ENFORCE_JETBLUE_DBVERSION | W2K_BETA3_JETBLUE_DBVERSION
  102. #define TLS_CURRENT_DBVERSION ENFORCE_JETBLUE_DBVERSION | W2K_RTM_JETBLUE_DBVERSION
  103. #else
  104. #define TLS_BETA_DBVERSION W2K_BETA3_JETBLUE_DBVERSION
  105. #define TLS_CURRENT_DBVERSION W2K_RTM_JETBLUE_DBVERSION
  106. #endif
  107. #define IS_ENFORCE_VERSION(x) (x & 0x80000000)
  108. #define DATABASE_VERSION(x) (x & 0x7FFFFFFF)
  109. #endif