Revision Summary Date Revision History Revision Class Comments 2/22/2007 0.01 New Version 0.01 release 6/1/2007 1.0 Major Updated and revised the technical content. 7/3/2007 1.0.1 Editorial Changed language and formatting in the technical content. 7/20/2007 1.1 Clarified the meaning of the technical content. 8/10/2007 2.0 Updated and revised the technical content. 9/28/2007 3.0 Major Updated and revised the technical content. 10/23/2007 4.0 Major Updated and revised the technical content. 11/30/2007 4.0.1 Editorial Changed language and formatting in the technical content. 1/25/2008 5.0 Major Updated and revised the technical content. 3/14/2008 6.0 Major Updated and revised the
technical content. 5/16/2008 6.0.1 Editorial Changed language and formatting in the technical content. 6/20/2008 6.0.2 Editorial Changed language and formatting in the technical content. 7/25/2008 6.0.3 Editorial Changed language and formatting in the technical content. 8/29/2008 7.0 Major Updated and revised the technical content. 10/24/2008 8.0 Major Updated and revised the technical content. 12/5/2008 9.0 Major Updated and revised the technical content. 1/16/2009 10.0 Major Updated and revised the technical content. 2/27/2009 11.0 Major Updated and revised the technical content. 4/10/2009 12.0 Updated and revised the technical content.
5/22/2009 13.0 Major Updated and revised the technical content. 7/2/2009 14.0 Major Updated and revised the technical content. 8/14/2009 15.0 Major Updated and revised the technical content. 9/25/2009 16.0 Major Updated and revised the technical content. 11/6/2009 17.0 Major Updated and revised the technical content. 12/18/2009 18.0 Major Updated and revised the technical content. 1/29/2010 19.0 Major Updated and revised the technical content. 3/12/2010 20.0 Major Updated and revised the technical content. 4/23/2010 21.0 Major Updated and revised the technical content. 6/4/2010 22.0 Major Updated and revised the technical content. 7/16/2010 23.0 Major Updated and revised
the technical content. 8/27/2010 24.0 Major Updated and revised the technical content. 10/8/2010 25.0 Major Updated and revised the technical content. 11/19/2010 25.0 None No changes to the meaning, language, or formatting of the technical content. 1/7/2011 25.0 None No changes to the meaning, language, or formatting of the technical content. 2/11/2011 26.0 Major Updated and revised the technical content. 3/25/2011 27.0 Major Updated and revised the technical content. 5/6/2011 27.0 None No changes to the meaning, language, or formatting of the technical content. 6/17/2011 28.0 Major Updated and revised the
technical content. 9/23/2011 28.0 None No changes to the meaning, language, or formatting of the technical content. 12/16/2011 29.0 Major Updated and revised the technical content. 3/30/2012 30.0 Major Updated and revised the technical content. 7/12/2012 30.1 Minor Clarified the meaning of the technical content. 10/25/2012 30.1 None No changes to the meaning, language, or formatting of the technical content. 1/31/2013 30.1 None No changes to the meaning, language, or formatting of the technical content. 8/8/2013 31.0 Major Updated and revised the technical content. 11/14/2013 32.0 Updated and revised the technical content.
2/13/2014 33.0 Major Updated and revised the technical content. 5/15/2014 34.0 Major Updated and revised the technical content. 6/30/2015 35.0 Major Significantly changed the technical content. 10/16/2015 35.0 None No changes to the meaning, language, or formatting of the technical content. 7/14/2016 36.0 Major Significantly changed the technical content.
HTTP Transport The RDGHTTP Protocol uses the HTTP transport by creating two for use as communication channels to and from the RDG server. Each channel is protected by (HTTPS).<4> RDGHTTP Protocol Phases Using HTTP Transport The RDGHTTP Protocol uses HTTP transport by operating in four phases: connection setup and authentication, tunnel and channel creation, data and server message transfer, and connection close. The following sections provide an overview of these phases. For specific details about each phase, see section . Connection and Authentication Phase The connection setup and authentication phase only involves the exchange of HTTP header information and consists of three operations: Create : An HTTP 1.1 connection is established. If the RDG server and client both support the WebSocket protocol (), then this connection is used for duplex communication between the RDG client and server; otherwise, this connection is used only for outbound communication from the RDG server.<5> WebSocket support is negotiated using the Opening Handshake as specified in [RFC6455] section 1.3. Create : A second HTTP 1.1 connection is established for inbound communication to the RDG server if the RDG server and client don't support the WebSocket protocol. In this case, the OUT channel is used only for outbound communication. Authenticate user. Figure 5: Message sequence between RDG client and RDG server during connection setup and authentication phase Tunnel and Channel Creation Phase In the tunnel (2) and channel creation the RDG client and RDG server exchange protocol messages as HTTP request and response entity bodies. The exchange of messages is in a strict predefined order. At the end of this phase, the RDG client and RDG server are ready to start exchanging data. The phase consists of four operations: Exchange version and capability negotiation information. Create tunnel. Authorize tunnel. Create channel. Figure 6: Message sequence between RDG client and RDG server during tunnel and channel creation phase RDG clients are permitted to close and create channels on an existing tunnel. However, only one channel can be associated with a tunnel at any given time. Due to server-side race conditions, channel creation can fail on a tunnel that was previously associated with a channel. In the case of such a failure, the RDG client closes the connection and reconnects to the RDG server using the steps outlined in sections 1.3.2.1.1 and 1.3.2.1.2.
the packet type is a tunnel (2) authorization request. PKT_TYPE_TUNNEL_AUTH_RESPONSE 0x7 This constant represents that the packet type is a tunnel (2) authorization response. PKT_TYPE_CHANNEL_CREATE 0x8 This constant represents that the packet type is a channel create request. PKT_TYPE_CHANNEL_RESPONSE 0x9 This constant represents that the packet type is a channel create response. PKT_TYPE_DATA 0xA This constant represents that the packet type is RDP data. PKT_TYPE_SERVICE_MESSAGE 0xB This constant represents that the packet type is a service message. PKT_TYPE_REAUTH_MESSAGE 0xC This constant represents that the packet type is reauthentication message. PKT_TYPE_KEEPALIVE 0xD This constant represents that the packet type is keep-alive packet. PKT_TYPE_CLOSE_CHANNEL 0x10 This constant represents that the packet type is close channel request. PKT_TYPE_CLOSE_CHANNEL_RESPONSE 0x11 This constant represents that the packet type is close channel response.
that device redirection is enabled for all devices HTTP_TUNNEL_REDIR_DISABLE_ALL 0x40000000 This constant represents that device redirection is disabled for all devices HTTP_TUNNEL_REDIR_DISABLE_DRIVE 0x1 This constant represents that drive redirection is disabled. HTTP_TUNNEL_REDIR_DISABLE_PRINTER 0x2 This constant represents that printer redirection is disabled. HTTP_TUNNEL_REDIR_DISABLE_PORT 0x4 This constant represents that port redirection is disabled. HTTP_TUNNEL_REDIR_DISABLE_CLIPBOARD 0x8 This constant represents that clibboard redirection is disabled. HTTP_TUNNEL_REDIR_DISABLE_PNP 0x10 This constant represents that PnP redirection is disabled. HTTP_TUNNEL_RESPONSE_FIELDS_PRESENT_FLAGS Enumeration Constant/value Description HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID 0x1 This constant represents that contains the tunnelId field.
TSG_NAP_CAPABILITY_IDLE_TIMEOUT and any one of the following happens: Session timeout occurs and disconnect on session timeout is configured at the RDG server. Reauthentication attempt by the client has failed because the user credentials are no longer valid. Reauthentication attempt by the client has failed because the user is not authorized to connect through the RDG server anymore. Reauthentication attempt by the client has failed because the user is not authorized to connect to the given end resource anymore. Reauthentication attempt by the RDG client has failed because the health of the user's computer is no longer compliant with the RDG server configuration. 0x000000A0 ERROR_BAD_ARGUMENTS Returned when the target server unexpectedly closes the connection between the RDG server and the target server. RPC Transport Return Return value/code Description 0x8007071A HRESULT_FROM_WIN32(RPC_S_CALL_CANCELLED) Returned when a pending call is canceled by the RDG client or the call is canceled because a shutdown sequence is initiated. In addition to the preceding HRESULTs, which are defined by the [MS-TSGU] protocol, the following DWORDs are returned in an rpc_fault packet when an exception is raised on the RDG server. Return value/code Description
CONNECT_PKT_RESP Structure The CONNECT_PKT_RESP structure is sent from the RDG server as a response to UDP channel authentication. 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 6 7 8 9 2 0 1 2 3 4 5 6 7 8 9 3 0 1 hdr SynResponse ... result ... hdr (4 bytes): A . SynResponse (8 bytes): An . result (8 bytes): A LONG specifying whether the connection was established successfully. DATA_PKT Structure This structure contains RDP UDP data. 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 6 7 8 9 2 0 1 2 3 4 5 6 7 8 9 3 0 1 hdr data (variable) ... hdr (4 bytes): A . data (variable): An array of BYTE containing the RDP UDP data. DISC_PKT Structure This structure contains an error code or reason for a UDP disconnect. 0 1 2 3 4 5 6 7 8 9 1 0 1 2 3 4 5 6 7 8 9 2 0 1 2 3 4 5 6 7 8 9 3 0 1 hdr discReason ...
Protocol syntax refers to data elements (such as packets, structures, enumerations, and methods) as well as interfaces. Protocol revision refers to changes made to a protocol that affect the bits that are sent over the wire. The changes made to this document are listed in the following table. For more information, please contact . Section Tracking number (if applicable) and description Major change (Y or N) Change type TSG_PACKET_QUARENC_RESPONSE 73078 : Updated the description of the versionCaps member as a pointer to a TSG_PACKET_VERSIONCAPS structure. N Content update. TSG_PACKET_CAPS_RESPONSE 72869 : Added a leading underline in the first line of the structure declaration to match the IDL. Y Protocol syntax updated. TSG_PACKET_MSG_REQUEST 72869 : Added a leading underline in the first line of the structure declaration to match the IDL. Y Protocol syntax updated. TSG_PACKET_TYPE_MESSAGE_UNION 73078 : Updated the descriptions of the structure members as pointers to structures. N Content update. TSG_PACKET_STRING_MESSAGE 72869 : Added a leading underline in the first line of the structure declaration to match the IDL and italicized n of the msgBuffer member to clarify that it is a determined by context. Y Protocol syntax updated. TSG_PACKET_REAUTH_MESSAGE 72869 : Added a leading underline in the first line of the structure declaration to match the IDL. Y Protocol syntax updated. TSG_INITIAL_PACKET_TYPE_UNION 73078 : Updated the descriptions of the structure members as pointers to structures. N Content update. Establishing a Connection 72870 : Clarified that the Authentication Cookie is generated by the RDP server, provided to the client, and then returned to the RDP server. N Content update.
Index A 71 72 Abstract data model 121 77 81 27 74 C 27 165 Client 121 123 122 124 121 124 122 123 30 72 73 15 D Data model - abstract 121 77 81 Data representation 127 127 17 Data types 30 31 32 31 32 31 73 73 E Examples 136 143 146 F 28 153 G 59 58 9 H 61 41 41 41 41 41 41 61 61 62 38 38 38 62 71 63 38 38 63 38 64 65 64 64 65 66 40 66 67 67 40 40 40 68 HTTP_TUNNEL_PACKET packet ( 68, 69) 40 40 40 40 40 40 40 40 40 69 41 41 41 41 70 70 I
153 152 152 14 Initialization 123 83 9 L events 122 80 109 M 34 Message processing 124 server 84 104 Messages 30 30 31 32 31 32 31 42 30 N 136 13 O Overview 15 17 15 18 14 14 P 152 31 32 39 39 39 39 42 42 39 42 39 39 39 39 42 39 39 39 39 39 39 143 26 26 158 Protocol Details 77 46 49 46 57 49 54 48 55 55 50 54 50 57 57 51 56 48 52 31 32 R 60 60 60 146 13 14 13 26 31 51 42 15 S Security 152 152 152 Sequencing 124 server 84 104 Server
77 81 83 80 109 message processing 84 104 81 sequencing rules 84 104 timer events 108 108 107 timers 83 79 18 28 T Timer events 122 server 108 108 107 Timers 123 server 83 79 165 30 46 36 36 36 49 35 37 38 38 37 37 46 57 49 54 48 55 55 50 54 50 57 57 51 56 36 35 34 35 35 34 35 34 36 34 34 48 52 37 37 88 104 105 95 85 91 127 97 127 128 127 98 129 128 129 U 75 74 V 28 27