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.

699 lines
31 KiB

  1. /****************************************************************************/
  2. // at120ex.h
  3. //
  4. // RDP T.120 protocol extensions
  5. //
  6. // Copyright (C) 1997-2000 Microsoft Corporation
  7. /****************************************************************************/
  8. #ifndef _H_AT120EX
  9. #define _H_AT120EX
  10. /****************************************************************************/
  11. /* TShare security constants. */
  12. /****************************************************************************/
  13. #include <tssec.h>
  14. #if !defined(OS_WINCE) && !defined(OS_WIN16)
  15. #include <winsta.h>
  16. #endif //OS_WIN16
  17. /****************************************************************************/
  18. /* */
  19. /* Definition of GCC User Data used by RDP */
  20. /* */
  21. /****************************************************************************/
  22. /****************************************************************************/
  23. /* H221 keys. */
  24. /****************************************************************************/
  25. #define H221_KEY_LEN 4
  26. #define SERVER_H221_KEY "McDn"
  27. #define CLIENT_H221_KEY "Duca"
  28. /****************************************************************************/
  29. /* User data identifiers */
  30. /****************************************************************************/
  31. /****************************************************************************/
  32. /* Client to Server IDs */
  33. /****************************************************************************/
  34. #define RNS_UD_CS_CORE_ID 0xc001
  35. #define RNS_UD_CS_SEC_ID 0xc002
  36. #define RNS_UD_CS_NET_ID 0xc003
  37. #define TS_UD_CS_CLUSTER_ID 0xC004
  38. /****************************************************************************/
  39. /* Server to Client IDs */
  40. /****************************************************************************/
  41. #define RNS_UD_SC_CORE_ID 0x0c01
  42. #define RNS_UD_SC_SEC_ID 0x0c02
  43. #define RNS_UD_SC_NET_ID 0x0c03
  44. /****************************************************************************/
  45. /* Color depths supported */
  46. /****************************************************************************/
  47. #define RNS_UD_COLOR_4BPP 0xca00
  48. #define RNS_UD_COLOR_8BPP 0xca01
  49. #define RNS_UD_COLOR_16BPP_555 0xca02
  50. #define RNS_UD_COLOR_16BPP_565 0xca03
  51. #define RNS_UD_COLOR_24BPP 0xca04
  52. #ifdef DC_HICOLOR
  53. /****************************************************************************/
  54. /* High color support */
  55. /****************************************************************************/
  56. #define RNS_UD_24BPP_SUPPORT 0x01
  57. #define RNS_UD_16BPP_SUPPORT 0x02
  58. #define RNS_UD_15BPP_SUPPORT 0x04
  59. #endif
  60. /****************************************************************************/
  61. /* SAS Sequence identifiers (incomplete). */
  62. /* Specifies the SAS sequence the client will use to access the login */
  63. /* screen in the Server. */
  64. /****************************************************************************/
  65. #define RNS_UD_SAS_NONE 0xaa01
  66. #define RNS_UD_SAS_CADEL 0xaa02
  67. #define RNS_UD_SAS_DEL 0xaa03
  68. #define RNS_UD_SAS_SYSRQ 0xaa04
  69. #define RNS_UD_SAS_ESC 0xaa05
  70. #define RNS_UD_SAS_F8 0xaa06
  71. /****************************************************************************/
  72. /* Keyboard layout identifiers. */
  73. /****************************************************************************/
  74. #define RNS_UD_KBD_DEFAULT 0
  75. /****************************************************************************/
  76. /* Version number */
  77. /* Major version Minor version */
  78. /* 0xFFFF0000 0x0000FFFF */
  79. /****************************************************************************/
  80. #define RNS_UD_VERSION 0x00080004 // Major 0008 - Minor 0004
  81. #define _RNS_MAJOR_VERSION(x) (x >> 16)
  82. #define _RNS_MINOR_VERSION(x) (x & 0x0000ffff)
  83. #define RNS_UD_MAJOR_VERSION (RNS_UD_VERSION >> 16)
  84. #define RNS_UD_MINOR_VERSION (RNS_UD_VERSION & 0x0000ffff)
  85. #define RNS_TERMSRV_40_UD_VERSION 0x00080001 // UD version used by Terminal
  86. // server 4.0 RTM
  87. #define RNS_DNS_USERNAME_UD_VERSION 0x00080004 // Usernames longer than 20 ok
  88. /****************************************************************************/
  89. // Security header flags
  90. /****************************************************************************/
  91. #define RNS_SEC_EXCHANGE_PKT 0x0001
  92. #define RNS_SEC_ENCRYPT 0x0008
  93. #define RNS_SEC_RESET_SEQNO 0x0010
  94. #define RNS_SEC_IGNORE_SEQNO 0x0020
  95. #define RNS_SEC_INFO_PKT 0x0040
  96. #define RNS_SEC_LICENSE_PKT 0x0080
  97. #define RDP_SEC_REDIRECTION_PKT 0x0100
  98. #define RDP_SEC_REDIRECTION_PKT2 0x0200
  99. #define RDP_SEC_REDIRECTION_PKT3 0x0400
  100. #define RDP_SEC_SECURE_CHECKSUM 0x0800
  101. //
  102. // If this flag is specified by the server
  103. // it means the client should encrypt all licensing
  104. // packets it sends up to the server.
  105. //
  106. // This happens at this early stage because the server
  107. // has to expose this capability before normal capability
  108. // negotiation.
  109. //
  110. #define RDP_SEC_LICENSE_ENCRYPT_CS 0x0200
  111. /****************************************************************************/
  112. /* Flags which define non-data packets */
  113. /****************************************************************************/
  114. #define RNS_SEC_NONDATA_PKT (RNS_SEC_EXCHANGE_PKT | \
  115. RNS_SEC_INFO_PKT | \
  116. RNS_SEC_LICENSE_PKT | \
  117. RDP_SEC_REDIRECTION_PKT | \
  118. RDP_SEC_REDIRECTION_PKT2 | \
  119. RDP_SEC_REDIRECTION_PKT3)
  120. /****************************************************************************/
  121. /* RNS info packet flags */
  122. /****************************************************************************/
  123. #define RNS_INFO_MOUSE 0x0001
  124. #define RNS_INFO_DISABLECTRLALTDEL 0x0002
  125. #define RNS_INFO_DOUBLECLICKDETECT 0x0004
  126. #define RNS_INFO_AUTOLOGON 0x0008
  127. #define RNS_INFO_UNICODE 0x0010
  128. #define RNS_INFO_MAXIMIZESHELL 0x0020
  129. #define RNS_INFO_LOGONNOTIFY 0x0040
  130. #define RNS_INFO_COMPRESSION 0x0080
  131. #define RNS_INFO_ENABLEWINDOWSKEY 0x0100
  132. #define RNS_INFO_REMOTECONSOLEAUDIO 0x2000
  133. // See compress.h for type values that can appear in these 4 bits.
  134. #define RNS_INFO_COMPR_TYPE_MASK 0x1E00
  135. #define RNS_INFO_COMPR_TYPE_SHIFT 9
  136. // When this flag is set, the client should only send encrypted packet to server
  137. #define RNS_INFO_FORCE_ENCRYPTED_CS_PDU 0x4000
  138. /****************************************************************************/
  139. /* Structure: RNS_SECURITY_HEADER */
  140. /* */
  141. /* Description: Security header sent with all packets if encryption is in */
  142. /* force. */
  143. /* */
  144. /* This header has the following structure: */
  145. /* - flags (one or more of the RNS_SEC_ flags above) */
  146. /****************************************************************************/
  147. typedef struct tagRNS_SECURITY_HEADER
  148. {
  149. TSUINT16 flags;
  150. TSUINT16 flagsHi;
  151. } RNS_SECURITY_HEADER, FAR *PRNS_SECURITY_HEADER;
  152. typedef RNS_SECURITY_HEADER UNALIGNED FAR *PRNS_SECURITY_HEADER_UA;
  153. /****************************************************************************/
  154. /* Structure: RNS_SECURITY_HEADER */
  155. /* */
  156. /* Description: Security header sent with all packets if encryption is in */
  157. /* force. */
  158. /* */
  159. /* This header has the following structure: */
  160. /* - flags (one or more of the RNS_SEC_ flags above) */
  161. /****************************************************************************/
  162. typedef struct tagRNS_SECURITY_HEADER1
  163. {
  164. TSUINT16 flags;
  165. TSUINT16 flagsHi;
  166. TSINT8 dataSignature[DATA_SIGNATURE_SIZE];
  167. } RNS_SECURITY_HEADER1, FAR *PRNS_SECURITY_HEADER1;
  168. typedef RNS_SECURITY_HEADER1 UNALIGNED FAR *PRNS_SECURITY_HEADER1_UA;
  169. /****************************************************************************/
  170. /* Structure: RNS_SECURITY_PACKET */
  171. /* */
  172. /* Description: Structure of security packet sent during security exchange */
  173. /* */
  174. /* The packet has the following structure */
  175. /* - flags (RNS_SEC_EXCHANGE_PKT) */
  176. /* - length length of data */
  177. /* - variable length data */
  178. /****************************************************************************/
  179. typedef struct tagRNS_SECURITY_PACKET
  180. {
  181. TSUINT32 flags;
  182. TSUINT32 length;
  183. /* data follows */
  184. } RNS_SECURITY_PACKET, FAR *PRNS_SECURITY_PACKET;
  185. typedef RNS_SECURITY_PACKET UNALIGNED FAR *PRNS_SECURITY_PACKET_UA;
  186. /****************************************************************************/
  187. // RDP_SERVER_REDIRECTION_PACKET
  188. //
  189. // Used to communicate a server redirection to the client.
  190. /****************************************************************************/
  191. typedef struct
  192. {
  193. // This corresponds to the security header flags field. We use this to
  194. // contain the "flag" RDP_SEC_REDIRECTION_PKT.
  195. TSUINT16 Flags;
  196. // Overall length of this packet, including the header fields.
  197. TSUINT16 Length;
  198. TSUINT32 SessionID;
  199. // Variable-length, zero-terminated Unicode string. No accompanying size
  200. // field is given since the size can be determined from the length above.
  201. // Up to TS_MAX_SERVERADDRESS_LENGTH Unicode characters in length (incl.
  202. // terminating null).
  203. TSUINT16 ServerAddress[1];
  204. } RDP_SERVER_REDIRECTION_PACKET, FAR *PRDP_SERVER_REDIRECTION_PACKET;
  205. typedef struct
  206. {
  207. // This corresponds to the security header flags field. We use this to
  208. // contain the "flag" RDP_SEC_REDIRECTION_PKT.
  209. TSUINT16 Flags;
  210. // Overall length of this packet, including the header fields.
  211. TSUINT16 Length;
  212. TSUINT32 SessionID;
  213. TSUINT32 RedirFlags;
  214. #define TARGET_NET_ADDRESS 0x1
  215. #define LOAD_BALANCE_INFO 0x2
  216. // Variable-length. For each field, it has the form
  217. // ULONG Length
  218. // BYTE data[]
  219. } RDP_SERVER_REDIRECTION_PACKET_V2, FAR *PRDP_SERVER_REDIRECTION_PACKET_V2;
  220. typedef struct
  221. {
  222. // This corresponds to the security header flags field. We use this to
  223. // contain the "flag" RDP_SEC_REDIRECTION_PKT.
  224. TSUINT16 Flags;
  225. // Overall length of this packet, including the header fields.
  226. TSUINT16 Length;
  227. TSUINT32 SessionID;
  228. TSUINT32 RedirFlags;
  229. #define TARGET_NET_ADDRESS 0x1
  230. #define LOAD_BALANCE_INFO 0x2
  231. #define LB_USERNAME 0x4
  232. #define LB_DOMAIN 0x8
  233. #define LB_PASSWORD 0x10
  234. // Variable-length. For each field, it has the form
  235. // ULONG Length
  236. // BYTE data[]
  237. } RDP_SERVER_REDIRECTION_PACKET_V3, FAR *PRDP_SERVER_REDIRECTION_PACKET_V3;
  238. //
  239. // Time zone packet
  240. //
  241. #ifndef _RDP_TIME_ZONE_INFORMATION_
  242. #define _RDP_TIME_ZONE_INFORMATION_
  243. typedef struct _RDP_SYSTEMTIME {
  244. TSUINT16 wYear;
  245. TSUINT16 wMonth;
  246. TSUINT16 wDayOfWeek;
  247. TSUINT16 wDay;
  248. TSUINT16 wHour;
  249. TSUINT16 wMinute;
  250. TSUINT16 wSecond;
  251. TSUINT16 wMilliseconds;
  252. } RDP_SYSTEMTIME;
  253. typedef struct _RDP_TIME_ZONE_INFORMATION {
  254. TSINT32 Bias;
  255. TSWCHAR StandardName[ 32 ];
  256. RDP_SYSTEMTIME StandardDate;
  257. TSINT32 StandardBias;
  258. TSWCHAR DaylightName[ 32 ];
  259. RDP_SYSTEMTIME DaylightDate;
  260. TSINT32 DaylightBias;
  261. } RDP_TIME_ZONE_INFORMATION;
  262. #endif //_RDP_TIME_ZONE_INFORMATION_
  263. /****************************************************************************/
  264. /* Structure: RNS_INFO_PACKET */
  265. /* */
  266. /* The packet has the following structure */
  267. /* - fMouse Mouse enabled flag */
  268. /* - fDisableCtrlAltDel CtrlAltDel disable state */
  269. /* - fDoubleClickDetect Double click detect state */
  270. /* - Domain Domain */
  271. /* - UserName UserName */
  272. /* - Password Password */
  273. /****************************************************************************/
  274. // The following fields are added post Win2000 Beta 3
  275. // Future variable length fields can be appended to this struct in similar
  276. // fashion
  277. #define RNS_INFO_INVALID_SESSION_ID LOGONID_NONE
  278. typedef struct tagRNS_EXTENDED_INFO_PACKET
  279. {
  280. TSUINT16 clientAddressFamily;
  281. TSUINT16 cbClientAddress;
  282. TSUINT8 clientAddress[TS_MAX_CLIENTADDRESS_LENGTH];
  283. TSUINT16 cbClientDir;
  284. TSUINT8 clientDir[TS_MAX_CLIENTDIR_LENGTH];
  285. //client time zone information
  286. RDP_TIME_ZONE_INFORMATION clientTimeZone;
  287. TSUINT32 clientSessionId;
  288. //
  289. // List of features to disable
  290. // (flags are defined in the protocol independent header tsperf.h)
  291. //
  292. TSUINT32 performanceFlags;
  293. //
  294. // Flags field
  295. //
  296. TSUINT16 cbAutoReconnectLen;
  297. //
  298. // Variable length portion. Only sent up if autoreconnection info
  299. // is specified
  300. //
  301. TSUINT8 autoReconnectCookie[TS_MAX_AUTORECONNECT_LEN];
  302. } RNS_EXTENDED_INFO_PACKET, FAR *PRNS_EXTENDED_INFO_PACKET;
  303. typedef RNS_EXTENDED_INFO_PACKET UNALIGNED FAR *PRNS_EXTENDED_INFO_PACKET_UA;
  304. typedef struct tagRNS_INFO_PACKET
  305. {
  306. //
  307. // In UNICODE we reuse the CodePage field to hold the active input
  308. // locale identifier (formerly called keyboard layout)
  309. //
  310. TSUINT32 CodePage;
  311. TSUINT32 flags;
  312. TSUINT16 cbDomain;
  313. TSUINT16 cbUserName;
  314. TSUINT16 cbPassword;
  315. TSUINT16 cbAlternateShell;
  316. TSUINT16 cbWorkingDir;
  317. TSUINT8 Domain[TS_MAX_DOMAIN_LENGTH];
  318. TSUINT8 UserName[TS_MAX_USERNAME_LENGTH];
  319. TSUINT8 Password[TS_MAX_PASSWORD_LENGTH];
  320. TSUINT8 AlternateShell[TS_MAX_ALTERNATESHELL_LENGTH];
  321. TSUINT8 WorkingDir[TS_MAX_WORKINGDIR_LENGTH];
  322. RNS_EXTENDED_INFO_PACKET ExtraInfo;
  323. } RNS_INFO_PACKET, FAR *PRNS_INFO_PACKET;
  324. typedef RNS_INFO_PACKET UNALIGNED FAR *PRNS_INFO_PACKET_UA;
  325. /****************************************************************************/
  326. /* User Data Structures */
  327. /****************************************************************************/
  328. /****************************************************************************/
  329. /* Structure: RNS_UD_HEADER */
  330. /* */
  331. /* Header included in all user data structures */
  332. /* - type one of the RNS_UD constants above */
  333. /* - length length of data (including this header) */
  334. /* - data one of the data structures below */
  335. /****************************************************************************/
  336. typedef struct tagRNS_UD_HEADER
  337. {
  338. TSUINT16 type;
  339. TSUINT16 length;
  340. } RNS_UD_HEADER;
  341. typedef RNS_UD_HEADER UNALIGNED FAR *PRNS_UD_HEADER;
  342. /****************************************************************************/
  343. /* Structure: RNS_UD_CS_CORE */
  344. /* */
  345. /* Client to Server core data */
  346. /* - header standard header */
  347. /* - version software version number */
  348. /* - desktopWidth width of desktop in pels */
  349. /* - desktopHeight height of desktop in pels */
  350. /* - colorDepth color depth supported - see note below */
  351. /* - SASSequence SAS sequence to use - one of the SAS constants above */
  352. /* - keyboardLayout Keyboard layout / locale */
  353. /* - clientName Name in Unicode characters */
  354. /* - keyboardType ] */
  355. /* - keyboardSubType ] FE stuff */
  356. /* - keyboardFunctionKey ] */
  357. /* - imeFileName ] */
  358. /* - postBeta2ColorDepth Color depth supported - see note below */
  359. /* - clientProductId */
  360. /* - serialNumber */
  361. #ifdef DC_HICOLOR
  362. /* - highColorDepth preferred color depth (if not 8bpp) */
  363. /* - supportedColorDepths high color depths supported by client */
  364. #endif
  365. /****************************************************************************/
  366. #ifdef DC_HICOLOR
  367. /****************************************************************************/
  368. /* Notes on color depths: */
  369. /* */
  370. /* In the NT4 TSE development, beta 2 servers would only accept connections */
  371. /* from clients requesting 8bpp - 4bpp support was only added later. To */
  372. /* get around this problem while maintaining back compatibility with beta 2 */
  373. /* servers, the postBeta2ColorDepth field was added which is recognised by */
  374. /* servers later than beta 2 */
  375. /* */
  376. /* Later, support for high color depth (15, 16, and 24bpp) connections was */
  377. /* added to the protocol. Again, for compatibility with old servers, new */
  378. /* fields are required. The highColorDepth field contains the color depth */
  379. /* the client would like (one of the RNS_UD_COLOR_XX values) while the */
  380. /* supportedColorDepths field lists the high color depths the client is */
  381. /* capable of supporting (using the RNS_UD_XXBPP_SUPPORT flags ORed */
  382. /* together). */
  383. /* */
  384. /* Thus a new client on a 24bpp system will typically advertise the */
  385. /* following color-related capabilities: */
  386. /* */
  387. /* colorDepth = RNS_UD_COLOR_8BPP - NT4 TSE Beta 2 servers look */
  388. /* at this field */
  389. /* postBeta2ColorDepth = RNS_UD_COLOR_8BPP - NT4 TSE and Win2000 servers */
  390. /* examine this field */
  391. /* highColorDepth = RNS_UD_COLOR_24BPP - post Win2000 (NT5.1?) */
  392. /* supportedColorDepths = RNS_UD_24BPP_SUPPORT servers check these fields */
  393. /* RNS_UD_16BPP_SUPPORT for preferred and supported */
  394. /* RNS_UD_15BPP_SUPPORT color depths */
  395. /* */
  396. /****************************************************************************/
  397. #else
  398. /****************************************************************************/
  399. /* A note on color depths: A beta2 Server rejects connections from a */
  400. /* Client with a color depth of 4bpp. A released Server supports this. */
  401. /* Therefore a new field, postBeta2ColorDepth, is added, which is */
  402. /* recognised by released Servers and can take the value 4bpp. Beta2 */
  403. /* Servers continue to check colorDepth only. */
  404. /****************************************************************************/
  405. #endif
  406. typedef struct tagRNS_UD_CS_CORE
  407. {
  408. RNS_UD_HEADER header;
  409. TSUINT32 version;
  410. TSUINT16 desktopWidth;
  411. TSUINT16 desktopHeight;
  412. TSUINT16 colorDepth;
  413. TSUINT16 SASSequence;
  414. TSUINT32 keyboardLayout;
  415. TSUINT32 clientBuild;
  416. // Max size same as MAX_COMPUTERNAME_LENGTH in windows.h.
  417. #define RNS_UD_CS_CLIENTNAME_LENGTH 15
  418. TSUINT16 clientName[RNS_UD_CS_CLIENTNAME_LENGTH + 1];
  419. TSUINT32 keyboardType;
  420. TSUINT32 keyboardSubType;
  421. TSUINT32 keyboardFunctionKey;
  422. TSUINT16 imeFileName[TS_MAX_IMEFILENAME]; // Unicode string, ASCII code only.
  423. TSUINT16 postBeta2ColorDepth;
  424. TSUINT16 clientProductId;
  425. TSUINT32 serialNumber;
  426. #ifdef DC_HICOLOR
  427. TSUINT16 highColorDepth;
  428. TSUINT16 supportedColorDepths;
  429. #endif
  430. //Used to specify early capability info
  431. //e.g support for error info PDU has to be
  432. //setup before licensing (which unfortunately
  433. //happens after caps negotiation)
  434. #define RNS_UD_CS_SUPPORT_ERRINFO_PDU 0x0001
  435. TSUINT16 earlyCapabilityFlags;
  436. //fix shadow loop detection
  437. //meherm 02/09/2001
  438. #define CLIENT_PRODUCT_ID_LENGTH 32
  439. TSUINT16 clientDigProductId[CLIENT_PRODUCT_ID_LENGTH];
  440. } RNS_UD_CS_CORE;
  441. typedef RNS_UD_CS_CORE UNALIGNED FAR *PRNS_UD_CS_CORE;
  442. typedef PRNS_UD_CS_CORE UNALIGNED FAR *PPRNS_UD_CS_CORE;
  443. // Original size structure used by shadowing code - do not use!
  444. typedef struct tagRNS_UD_CS_CORE_V0
  445. {
  446. RNS_UD_HEADER header;
  447. TSUINT32 version;
  448. TSUINT16 desktopWidth;
  449. TSUINT16 desktopHeight;
  450. TSUINT16 colorDepth;
  451. TSUINT16 SASSequence;
  452. TSUINT32 keyboardLayout;
  453. TSUINT32 clientBuild;
  454. // Max size same as MAX_COMPUTERNAME_LENGTH in windows.h.
  455. #define RNS_UD_CS_CLIENTNAME_LENGTH 15
  456. TSUINT16 clientName[RNS_UD_CS_CLIENTNAME_LENGTH + 1];
  457. TSUINT32 keyboardType;
  458. TSUINT32 keyboardSubType;
  459. TSUINT32 keyboardFunctionKey;
  460. TSUINT16 imeFileName[TS_MAX_IMEFILENAME]; // Unicode string, ASCII code only.
  461. TSUINT16 postBeta2ColorDepth;
  462. TSUINT16 pad;
  463. } RNS_UD_CS_CORE_V0, FAR *PRNS_UD_CS_CORE_V0;
  464. typedef PRNS_UD_CS_CORE_V0 FAR *PPRNS_UD_CS_CORE_V0;
  465. // Intermediate size structure used by shadowing code - do not use!
  466. typedef struct tagRNS_UD_CS_CORE_V1
  467. {
  468. RNS_UD_HEADER header;
  469. TSUINT32 version;
  470. TSUINT16 desktopWidth;
  471. TSUINT16 desktopHeight;
  472. TSUINT16 colorDepth;
  473. TSUINT16 SASSequence;
  474. TSUINT32 keyboardLayout;
  475. TSUINT32 clientBuild;
  476. // Max size same as MAX_COMPUTERNAME_LENGTH in windows.h.
  477. #define RNS_UD_CS_CLIENTNAME_LENGTH 15
  478. TSUINT16 clientName[RNS_UD_CS_CLIENTNAME_LENGTH + 1];
  479. TSUINT32 keyboardType;
  480. TSUINT32 keyboardSubType;
  481. TSUINT32 keyboardFunctionKey;
  482. TSUINT16 imeFileName[TS_MAX_IMEFILENAME]; // Unicode string, ASCII code only.
  483. TSUINT16 postBeta2ColorDepth;
  484. TSUINT16 clientProductId;
  485. TSUINT32 serialNumber;
  486. } RNS_UD_CS_CORE_V1, FAR *PRNS_UD_CS_CORE_V1;
  487. typedef PRNS_UD_CS_CORE_V1 FAR *PPRNS_UD_CS_CORE_V1;
  488. /****************************************************************************/
  489. /* Structure: RNS_UD_CS_SEC */
  490. /* */
  491. /* Client to Server security data */
  492. /* - header standard header */
  493. /* - encryptionMethods encryption method supported by the client */
  494. /* - extEncryptionMethods used by the French Locale system for backward */
  495. /* compatibility. */
  496. /****************************************************************************/
  497. typedef struct tagRNS_UD_CS_SEC
  498. {
  499. RNS_UD_HEADER header;
  500. TSUINT32 encryptionMethods;
  501. TSUINT32 extEncryptionMethods;
  502. } RNS_UD_CS_SEC;
  503. typedef RNS_UD_CS_SEC UNALIGNED FAR *PRNS_UD_CS_SEC;
  504. typedef PRNS_UD_CS_SEC UNALIGNED FAR *PPRNS_UD_CS_SEC;
  505. // Original size structure used by shadowing code - do not use!
  506. typedef struct tagRNS_UD_CS_SEC_V0
  507. {
  508. RNS_UD_HEADER header;
  509. TSUINT32 encryptionMethods;
  510. } RNS_UD_CS_SEC_V0, RNS_UD_CS_SEC_V1, FAR *PRNS_UD_CS_SEC_V0, FAR *PRNS_UD_CS_SEC_V1;
  511. typedef PRNS_UD_CS_SEC_V0 FAR *PPRNS_UD_CS_SEC_V0;
  512. /****************************************************************************/
  513. /* Structure: RNS_UD_CS_NET */
  514. /* */
  515. /* Description: Client to Server network data */
  516. /* - header standard header */
  517. /* - channelCount number of channel names */
  518. /* - channel names */
  519. /****************************************************************************/
  520. typedef struct tagRNS_UD_CS_NET
  521. {
  522. RNS_UD_HEADER header;
  523. TSUINT32 channelCount;
  524. /* array of CHANNEL_DEF structures follows */
  525. } RNS_UD_CS_NET;
  526. typedef RNS_UD_CS_NET UNALIGNED FAR *PRNS_UD_CS_NET;
  527. typedef PRNS_UD_CS_NET UNALIGNED FAR *PPRNS_UD_CS_NET;
  528. /****************************************************************************/
  529. // TS_UD_CS_CLUSTER
  530. //
  531. // Client-to-server information for server clustering-aware clients.
  532. /****************************************************************************/
  533. // Flag values.
  534. // Client supports basic redirection.
  535. #define TS_CLUSTER_REDIRECTION_SUPPORTED 0x01
  536. // Bits 2..5 represent the version for the PDU
  537. #define TS_CLUSTER_REDIRECTION_VERSION 0x3C
  538. #define TS_CLUSTER_REDIRECTION_VERSION1 0x0
  539. #define TS_CLUSTER_REDIRECTION_VERSION2 0x1
  540. #define TS_CLUSTER_REDIRECTION_VERSION3 0x2
  541. // Set if the client has already been redirected and the SessionID field
  542. // in the struct contains a valid value.
  543. #define TS_CLUSTER_REDIRECTED_SESSIONID_FIELD_VALID 0x02
  544. typedef struct
  545. {
  546. RNS_UD_HEADER header;
  547. TSUINT32 Flags;
  548. TSUINT32 RedirectedSessionID;
  549. } TS_UD_CS_CLUSTER;
  550. typedef TS_UD_CS_CLUSTER UNALIGNED FAR *PTS_UD_CS_CLUSTER;
  551. /****************************************************************************/
  552. /* Structure: RNS_UD_SC_CORE */
  553. /* */
  554. /* Server to Client core data */
  555. /* - header standard header */
  556. /* - version software version number */
  557. /****************************************************************************/
  558. typedef struct tagRNS_UD_SC_CORE
  559. {
  560. RNS_UD_HEADER header;
  561. TSUINT32 version;
  562. } RNS_UD_SC_CORE, FAR *PRNS_UD_SC_CORE;
  563. /****************************************************************************/
  564. /* Structure: RNS_UD_SC_SEC */
  565. /* */
  566. /* Server to Client security data */
  567. /* - header standard header */
  568. /* - encryptionMethod encryption method selected by the server */
  569. /* - encryptionLevel encryption level supported by the server */
  570. /****************************************************************************/
  571. typedef struct tagRNS_UD_SC_SEC
  572. {
  573. RNS_UD_HEADER header;
  574. TSUINT32 encryptionMethod;
  575. TSUINT32 encryptionLevel;
  576. } RNS_UD_SC_SEC, FAR *PRNS_UD_SC_SEC, FAR * FAR *PPRNS_UD_SC_SEC;
  577. /****************************************************************************/
  578. /* Structure: RNS_UD_SC_SEC1 */
  579. /* */
  580. /* Server to Client security data */
  581. /* - header standard header */
  582. /* - encryptionMethod encryption method selected by the server */
  583. /* - serverRandomLen length of the server random */
  584. /* - serverCertLen server certificate length */
  585. /* - server random data */
  586. /* - server certificate data */
  587. /****************************************************************************/
  588. typedef struct tagRNS_UD_SC_SEC1
  589. {
  590. RNS_UD_HEADER header;
  591. TSUINT32 encryptionMethod;
  592. TSUINT32 encryptionLevel;
  593. TSUINT32 serverRandomLen;
  594. TSUINT32 serverCertLen;
  595. /* server random key data follows */
  596. /* server certificate data follows */
  597. } RNS_UD_SC_SEC1, FAR *PRNS_UD_SC_SEC1;
  598. /****************************************************************************/
  599. /* Structure: RNS_UD_SC_NET */
  600. /* */
  601. /* Server to Client network data */
  602. /* - header standard header */
  603. /* - MCSChannelID T128 MCS channel ID to use */
  604. /* - pad unused */
  605. /* - channelCount number of channels */
  606. /* - channel IDs */
  607. /****************************************************************************/
  608. typedef struct tagRNS_UD_SC_NET
  609. {
  610. RNS_UD_HEADER header;
  611. TSUINT16 MCSChannelID;
  612. TSUINT16 channelCount; /* was pad, but always 0, in release 1 */
  613. /* array of 2-byte integer MCS channel IDs follows (0 = unknown) */
  614. } RNS_UD_SC_NET, FAR *PRNS_UD_SC_NET, FAR * FAR *PPRNS_UD_SC_NET;
  615. #endif /* _H_AT120EX */