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.

206 lines
7.3 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // File: TSrvExp.h
  4. //
  5. // Contents: TShareSRV public export include file
  6. //
  7. // Copyright: (c) 1992 - 1997, Microsoft Corporation.
  8. // All Rights Reserved.
  9. // Information Contained Herein is Proprietary
  10. // and Confidential.
  11. //
  12. // History: 7-JUL-97 BrianTa Created.
  13. //
  14. //---------------------------------------------------------------------------
  15. #ifndef _TSRVEXP_H_
  16. #define _TSRVEXP_H_
  17. #include <t120.h>
  18. #include <at128.h>
  19. #include <license.h>
  20. #include <tssec.h>
  21. #include <at120ex.h>
  22. /****************************************************************************/
  23. /* Defines */
  24. /****************************************************************************/
  25. #define NET_MAX_SIZE_SEND_PKT 32000
  26. /****************************************************************************/
  27. /* IOCTL definitions */
  28. /****************************************************************************/
  29. #define IOCTL_TSHARE_CONF_CONNECT _ICA_CTL_CODE(0x900, METHOD_NEITHER)
  30. #define IOCTL_TSHARE_CONF_DISCONNECT _ICA_CTL_CODE(0x901, METHOD_NEITHER)
  31. #define IOCTL_TSHARE_USER_LOGON _ICA_CTL_CODE(0x903, METHOD_NEITHER)
  32. #define IOCTL_TSHARE_GET_SEC_DATA _ICA_CTL_CODE(0x904, METHOD_NEITHER)
  33. #define IOCTL_TSHARE_SET_SEC_DATA _ICA_CTL_CODE(0x905, METHOD_NEITHER)
  34. #define IOCTL_TSHARE_SET_NO_ENCRYPT _ICA_CTL_CODE(0x906, METHOD_NEITHER)
  35. #define IOCTL_TSHARE_QUERY_CHANNELS _ICA_CTL_CODE(0x907, METHOD_NEITHER)
  36. #define IOCTL_TSHARE_CONSOLE_CONNECT _ICA_CTL_CODE(0x908, METHOD_NEITHER)
  37. #define IOCTL_TSHARE_SEND_CERT_DATA _ICA_CTL_CODE(0x909, METHOD_NEITHER)
  38. #define IOCTL_TSHARE_GET_CERT_DATA _ICA_CTL_CODE(0x90A, METHOD_NEITHER)
  39. #define IOCTL_TSHARE_SEND_CLIENT_RANDOM _ICA_CTL_CODE(0x90B, METHOD_NEITHER)
  40. #define IOCTL_TSHARE_GET_CLIENT_RANDOM _ICA_CTL_CODE(0x90C, METHOD_NEITHER)
  41. #define IOCTL_TSHARE_SHADOW_CONNECT _ICA_CTL_CODE(0x90D, METHOD_NEITHER)
  42. #define IOCTL_TSHARE_SET_ERROR_INFO _ICA_CTL_CODE(0x90E, METHOD_NEITHER)
  43. #define IOCTL_TSHARE_SEND_ARC_STATUS _ICA_CTL_CODE(0x90F, METHOD_NEITHER)
  44. //***************************************************************************
  45. // Typedefs
  46. //***************************************************************************
  47. //***************************************************************************
  48. // User data info
  49. //***************************************************************************
  50. typedef struct _USERDATAINFO
  51. {
  52. ULONG cbSize; // Structure size (incl data)
  53. TSUINT32 version; // The client version
  54. HANDLE hDomain; // Domain handle
  55. ULONG ulUserDataMembers; // Number of UserData members
  56. GCCUserData rgUserData[1]; // User data
  57. } USERDATAINFO, *PUSERDATAINFO;
  58. //***************************************************************************
  59. // Logon Info
  60. //***************************************************************************
  61. typedef struct _LOGONINFO
  62. {
  63. #define LI_USE_AUTORECONNECT 0x0001
  64. TSUINT32 Flags;
  65. TSUINT8 Domain[TS_MAX_DOMAIN_LENGTH];
  66. TSUINT8 UserName[TS_MAX_USERNAME_LENGTH];
  67. TSUINT32 SessionId;
  68. } LOGONINFO, *PLOGONINFO;
  69. //***************************************************************************
  70. // Security Info used with the IOCTL_TSHARE_SET_SEC_DATA ioctl
  71. //***************************************************************************
  72. typedef struct _SECINFO
  73. {
  74. CERT_TYPE CertType; // certificate type that was transmitted to the client
  75. RANDOM_KEYS_PAIR KeyPair; // generated key pair
  76. } SECINFO, *PSECINFO;
  77. typedef struct _SHADOWCERT
  78. {
  79. ULONG pad1; // This needs to be sizeof(RNS_UD_HEADER)
  80. ULONG encryptionMethod;
  81. ULONG encryptionLevel;
  82. ULONG shadowRandomLen;
  83. ULONG shadowCertLen;
  84. // shadow random and certificate follow
  85. BYTE data[1];
  86. } SHADOWCERT, *PSHADOWCERT;
  87. typedef struct _CLIENTRANDOM
  88. {
  89. ULONG clientRandomLen;
  90. // client random follows
  91. BYTE data[1];
  92. } CLIENTRANDOM, *PCLIENTRANDOM;
  93. typedef struct _SECURITYTIMEOUT
  94. {
  95. LONG ulTimeout;
  96. } SECURITYTIMEOUT, *PSECURITYTIMEOUT;
  97. // Winstation Driver data for shadowing. This information is passed to the
  98. // shadow stack's WD. Include all data required to validate the shadow request
  99. // such that the shadow can be rejected at this point if required.
  100. //
  101. typedef struct tagTSHARE_MODULE_DATA {
  102. // size of this structure in bytes
  103. UINT32 ulLength;
  104. // Gather sufficient data to create a conference
  105. RNS_UD_CS_CORE_V0 clientCoreData;
  106. RNS_UD_CS_SEC_V0 clientSecurityData;
  107. // Information to reestablish the MCS domain
  108. // MCS domain, channel, user, token information.
  109. DomainParameters DomParams; // This domain's negotiated parameters.
  110. unsigned MaxSendSize;
  111. // X.224 information.
  112. unsigned MaxX224DataSize; // Negotiated in X.224 connection.
  113. unsigned X224SourcePort;
  114. // Share load count
  115. LONG shareId;
  116. // Although we repeat some fields below, we have to keep the previous
  117. // junk around for backwards compatibility with B3. The only new data
  118. // added to this structure should be in the form of GCC user data so we
  119. // don't get alignment issues in the future
  120. UINT32 ulVersion;
  121. UINT32 reserved[8]; // for future extension
  122. // Start of pre-parsed variable user data
  123. ULONG userDataLen;
  124. RNS_UD_HEADER userData;
  125. } TSHARE_MODULE_DATA, *PTSHARE_MODULE_DATA;
  126. // Winstation Driver data for shadowing at Win2000 B3
  127. typedef struct tagTSHARE_MODULE_DATA_B3 {
  128. // size of this structure in bytes
  129. UINT32 ulLength;
  130. // Gather sufficient data to create a conference
  131. RNS_UD_CS_CORE_V0 clientCoreData;
  132. RNS_UD_CS_SEC_V0 clientSecurityData;
  133. // Information to reestablish the MCS domain
  134. // MCS domain, channel, user, token information.
  135. DomainParameters DomParams; // This domain's negotiated parameters.
  136. unsigned MaxSendSize;
  137. // X.224 information.
  138. unsigned MaxX224DataSize; // Negotiated in X.224 connection.
  139. unsigned X224SourcePort;
  140. // Share load count
  141. LONG shareId;
  142. } TSHARE_MODULE_DATA_B3, *PTSHARE_MODULE_DATA_B3;
  143. // Winstation Driver data for shadowing at Win2000 B3 + Ooops!
  144. typedef struct tagTSHARE_MODULE_DATA_B3_OOPS {
  145. // size of this structure in bytes
  146. UINT32 ulLength;
  147. // Gather sufficient data to create a conference
  148. RNS_UD_CS_CORE_V1 clientCoreData;
  149. RNS_UD_CS_SEC_V1 clientSecurityData;
  150. // Information to reestablish the MCS domain
  151. // MCS domain, channel, user, token information.
  152. DomainParameters DomParams; // This domain's negotiated parameters.
  153. unsigned MaxSendSize;
  154. // X.224 information.
  155. unsigned MaxX224DataSize; // Negotiated in X.224 connection.
  156. unsigned X224SourcePort;
  157. // Share load count
  158. LONG shareId;
  159. } TSHARE_MODULE_DATA_B3_OOPS, *PTSHARE_MODULE_DATA_B3_OOPS;
  160. #endif // _TSRVEXP_H_