FreeRDP
|
#include <freerdp/config.h>
#include "settings.h"
#include "info.h"
#include "input.h"
#include "rdp.h"
#include "peer.h"
#include "connection.h"
#include "transport.h"
#include <winpr/crt.h>
#include <winpr/crypto.h>
#include <winpr/ssl.h>
#include <freerdp/log.h>
#include <freerdp/error.h>
#include <freerdp/listener.h>
#include "../cache/pointer.h"
#include "../crypto/crypto.h"
#include "../crypto/privatekey.h"
#include "../crypto/certificate.h"
#include "gateway/arm.h"
#include "utils.h"
Macros | |
#define | TAG FREERDP_TAG("core.connection") |
Variables | |
static const BYTE | fips_ivec [8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF } |
#define TAG FREERDP_TAG("core.connection") |
BOOL rdp_channels_from_mcs | ( | rdpSettings * | settings, |
const rdpRdp * | rdp | ||
) |
BOOL rdp_client_connect | ( | rdpRdp * | rdp | ) |
Establish RDP Connection based on the settings given in the 'rdp' parameter. msdn{cc240452}
rdp | RDP module |
BOOL rdp_client_connect_auto_detect | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
state_run_t rdp_client_connect_confirm_active | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
The server may request a different desktop size during Deactivation-Reactivation sequence. In this case, the UI should be informed and do actual window resizing at this point.
state_run_t rdp_client_connect_demand_active | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
state_run_t rdp_client_connect_finalize | ( | rdpRdp * | rdp | ) |
[MS-RDPBCGR] 1.3.1.1 - 8. The client-to-server PDUs sent during this phase have no dependencies on any of the server-to- client PDUs; they may be sent as a single batch, provided that sequencing is maintained.
[MS-RDPBCGR] 2.2.1.17 Client persistent key list must be sent if a bitmap is stored in persistent bitmap cache or the server has advertised support for bitmap host cache and a deactivation reactivation sequence is not in progress.
state_run_t rdp_client_connect_license | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
BOOL rdp_client_connect_mcs_channel_join_confirm | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
const char* rdp_client_connection_state_string | ( | int | state | ) |
BOOL rdp_client_disconnect | ( | rdpRdp * | rdp | ) |
BOOL rdp_client_disconnect_and_clear | ( | rdpRdp * | rdp | ) |
|
static |
|
static |
BOOL rdp_client_reconnect | ( | rdpRdp * | rdp | ) |
|
static |
BOOL rdp_client_redirect | ( | rdpRdp * | rdp | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
BOOL rdp_client_skip_mcs_channel_join | ( | rdpRdp * | rdp | ) |
BOOL rdp_client_transition_to_state | ( | rdpRdp * | rdp, |
CONNECTION_STATE | state | ||
) |
|
static |
CONNECTION_STATE rdp_get_state | ( | const rdpRdp * | rdp | ) |
const char* rdp_get_state_string | ( | const rdpRdp * | rdp | ) |
|
static |
|
static |
BOOL rdp_is_active_state | ( | const rdpRdp * | rdp | ) |
BOOL rdp_server_accept_mcs_attach_user_request | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
BOOL rdp_server_accept_mcs_channel_join_request | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
BOOL rdp_server_accept_mcs_connect_initial | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
BOOL rdp_server_accept_mcs_erect_domain_request | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
BOOL rdp_server_accept_nego | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
BOOL rdp_server_establish_keys | ( | rdpRdp * | rdp, |
wStream * | s | ||
) |
BOOL rdp_server_reactivate | ( | rdpRdp * | rdp | ) |
|
static |
|
static |
BOOL rdp_server_transition_to_state | ( | rdpRdp * | rdp, |
CONNECTION_STATE | state | ||
) |
|
static |
Connection Sequence
client server | | |--------------------—X.224 Connection Request PDU------------------—>| |<-------------------—X.224 Connection Confirm PDU-------------------—| |----—MCS Connect-Initial PDU with GCC Conference Create Request----—>| |<--—MCS Connect-Response PDU with GCC Conference Create Response----—| |---------------------—MCS Erect Domain Request PDU-----------------—>| |---------------------—MCS Attach User Request PDU------------------—>| |<--------------------—MCS Attach User Confirm PDU-------------------—| |---------------------—MCS Channel Join Request PDU-----------------—>| |<--------------------—MCS Channel Join Confirm PDU------------------—| |-------------------------—Security Exchange PDU--------------------—>| |----------------------------—Client Info PDU-----------------------—>| |<------------------—License Error PDU - Valid Client----------------—| |<--------------------------—Demand Active PDU-----------------------—| |---------------------------—Confirm Active PDU---------------------—>| |----------------------------—Synchronize PDU-----------------------—>| |------------------------—Control PDU - Cooperate-------------------—>| |---------------------—Control PDU - Request Control----------------—>| |-----------------------—Persistent Key List PDU(s)-----------------—>| |-----------------------------—Font List PDU------------------------—>| |<---------------------------—Synchronize PDU------------------------—| |<-----------------------—Control PDU - Cooperate--------------------—| |<--------------------—Control PDU - Granted Control-----------------—| |<----------------------------—Font Map PDU--------------------------—| Connection Sequence
From this point, all subsequent data sent from the client to the server is wrapped in an MCSSend Data Request PDU, while data sent from the server to the client is wrapped in an MCS Send Data Indication PDU. This is in addition to the data being wrapped by an X.224 Data PDU.
From this point, all subsequent RDP traffic can be encrypted and a security header is includedwith the data if encryption is in force. (The Client Info PDU (section 2.2.1.11) and licensing PDUs ([MS-RDPELE] section 2.2.2) are an exception in that they always have a security header). The Security Header follows the X.224 and MCS Headers and indicates whether the attached data is encrypted. Even if encryption is in force, server-to-client traffic may not always be encrypted, while client-to-server traffic must always be encrypted (encryption of licensing PDUs is optional, however).
Connection Finalization: The client and server exchange PDUs to finalize the connection details. The client-to-server PDUs sent during this phase have no dependencies on any of the server-to-client PDUs; they may be sent as a single batch, provided that sequencing is maintained.
- The Client Synchronize PDU (section 2.2.1.14) is sent after transmitting the Confirm Active
PDU.
The server-to-client PDUs sent during the Connection Finalization Phase have dependencies on theclient-to-server PDUs.
- The optional Monitor Layout PDU (section 2.2.12.1) has no dependency on any client-to-serverPDUs and is sent after the Demand Active PDU.
Once the client has sent the Confirm Active PDU, it can start sending mouse and keyboard input to the server, and upon receipt of the Font List PDU the server can start sending graphics output to the client.
Besides input and graphics data, other data that can be exchanged between client and server
after the connection has been finalized includes connection management information and virtual channel messages (exchanged between client-side plug-ins and server-side applications).
const char* rdp_state_string | ( | CONNECTION_STATE | state | ) |
|
static |
|
static |
Re: settings->EncryptionLevel: This is configured/set by the server implementation and serves the same purpose as the "Encryption Level" setting in the RDP-Tcp configuration dialog of Microsoft's Remote Desktop Session Host Configuration. Re: settings->EncryptionMethods: at this point this setting contains the client's supported encryption methods we've received in gcc_read_client_security_data()
|
static |