FreeRDP
|
#include <freerdp/config.h>
#include "settings.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/stream.h>
#include <freerdp/api.h>
#include <freerdp/log.h>
#include <freerdp/crypto/per.h>
#include "orders.h"
#include "update.h"
#include "surface.h"
#include "fastpath.h"
#include "rdp.h"
#include "../cache/pointer.h"
#include "../cache/palette.h"
#include "../cache/bitmap.h"
Macros | |
#define | TAG FREERDP_TAG("core.fastpath") |
Enumerations | |
enum | FASTPATH_INPUT_ENCRYPTION_FLAGS { FASTPATH_INPUT_SECURE_CHECKSUM = 0x1 , FASTPATH_INPUT_ENCRYPTED = 0x2 } |
enum | FASTPATH_OUTPUT_ENCRYPTION_FLAGS { FASTPATH_OUTPUT_SECURE_CHECKSUM = 0x1 , FASTPATH_OUTPUT_ENCRYPTED = 0x2 } |
Functions | |
static const char * | fastpath_update_to_string (UINT8 update) |
static BOOL | fastpath_read_update_header (wStream *s, BYTE *updateCode, BYTE *fragmentation, BYTE *compression) |
static BOOL | fastpath_write_update_header (wStream *s, const FASTPATH_UPDATE_HEADER *fpUpdateHeader) |
static UINT32 | fastpath_get_update_header_size (FASTPATH_UPDATE_HEADER *fpUpdateHeader) |
static BOOL | fastpath_write_update_pdu_header (wStream *s, const FASTPATH_UPDATE_PDU_HEADER *fpUpdatePduHeader, rdpRdp *rdp) |
static UINT32 | fastpath_get_update_pdu_header_size (FASTPATH_UPDATE_PDU_HEADER *fpUpdatePduHeader, rdpRdp *rdp) |
BOOL | fastpath_read_header_rdp (rdpFastPath *fastpath, wStream *s, UINT16 *length) |
static BOOL | fastpath_recv_orders (rdpFastPath *fastpath, wStream *s) |
static BOOL | fastpath_recv_update_common (rdpFastPath *fastpath, wStream *s) |
static BOOL | fastpath_recv_update_synchronize (rdpFastPath *fastpath, wStream *s) |
static int | fastpath_recv_update (rdpFastPath *fastpath, BYTE updateCode, wStream *s) |
static int | fastpath_recv_update_data (rdpFastPath *fastpath, wStream *s) |
state_run_t | fastpath_recv_updates (rdpFastPath *fastpath, wStream *s) |
static BOOL | fastpath_read_input_event_header (wStream *s, BYTE *eventFlags, BYTE *eventCode) |
static BOOL | fastpath_recv_input_event_scancode (rdpFastPath *fastpath, wStream *s, BYTE eventFlags) |
static BOOL | fastpath_recv_input_event_mouse (rdpFastPath *fastpath, wStream *s, BYTE eventFlags) |
static BOOL | fastpath_recv_input_event_relmouse (rdpFastPath *fastpath, wStream *s, BYTE eventFlags) |
static BOOL | fastpath_recv_input_event_qoe (rdpFastPath *fastpath, wStream *s, BYTE eventFlags) |
static BOOL | fastpath_recv_input_event_mousex (rdpFastPath *fastpath, wStream *s, BYTE eventFlags) |
static BOOL | fastpath_recv_input_event_sync (rdpFastPath *fastpath, wStream *s, BYTE eventFlags) |
static BOOL | fastpath_recv_input_event_unicode (rdpFastPath *fastpath, wStream *s, BYTE eventFlags) |
static BOOL | fastpath_recv_input_event (rdpFastPath *fastpath, wStream *s) |
state_run_t | fastpath_recv_inputs (rdpFastPath *fastpath, wStream *s) |
static UINT32 | fastpath_get_sec_bytes (rdpRdp *rdp) |
wStream * | fastpath_input_pdu_init_header (rdpFastPath *fastpath) |
wStream * | fastpath_input_pdu_init (rdpFastPath *fastpath, BYTE eventFlags, BYTE eventCode) |
BOOL | fastpath_send_multiple_input_pdu (rdpFastPath *fastpath, wStream *s, size_t iNumEvents) |
BOOL | fastpath_send_input_pdu (rdpFastPath *fastpath, wStream *s) |
wStream * | fastpath_update_pdu_init (rdpFastPath *fastpath) |
wStream * | fastpath_update_pdu_init_new (rdpFastPath *fastpath) |
BOOL | fastpath_send_update_pdu (rdpFastPath *fastpath, BYTE updateCode, wStream *s, BOOL skipCompression) |
rdpFastPath * | fastpath_new (rdpRdp *rdp) |
void | fastpath_free (rdpFastPath *fastpath) |
BYTE | fastpath_get_encryption_flags (rdpFastPath *fastpath) |
BOOL | fastpath_decrypt (rdpFastPath *fastpath, wStream *s, UINT16 *length) |
Variables | |
static const char *const | FASTPATH_UPDATETYPE_STRINGS [] |
#define TAG FREERDP_TAG("core.fastpath") |
FreeRDP: A Remote Desktop Protocol Implementation Fast Path
Copyright 2011 Vic Lee Copyright 2014 Norbert Federa norbe Copyright 2017 Armin Novak rt.f edera @thi ncast .comarmin Copyright 2017 Thincast Technologies GmbH .nov ak@th inca st.co m
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
void fastpath_free | ( | rdpFastPath * | fastpath | ) |
BYTE fastpath_get_encryption_flags | ( | rdpFastPath * | fastpath | ) |
|
static |
|
static |
|
static |
wStream* fastpath_input_pdu_init_header | ( | rdpFastPath * | fastpath | ) |
rdpFastPath* fastpath_new | ( | rdpRdp * | rdp | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
state_run_t fastpath_recv_inputs | ( | rdpFastPath * | fastpath, |
wStream * | s | ||
) |
If numberEvents is not provided in fpInputHeader, it will be provided as one additional byte here.
|
static |
|
static |
|
static |
|
static |
state_run_t fastpath_recv_updates | ( | rdpFastPath * | fastpath, |
wStream * | s | ||
) |
BOOL fastpath_send_input_pdu | ( | rdpFastPath * | fastpath, |
wStream * | s | ||
) |
BOOL fastpath_send_multiple_input_pdu | ( | rdpFastPath * | fastpath, |
wStream * | s, | ||
size_t | iNumEvents | ||
) |
BOOL fastpath_send_update_pdu | ( | rdpFastPath * | fastpath, |
BYTE | updateCode, | ||
wStream * | s, | ||
BOOL | skipCompression | ||
) |
wStream* fastpath_update_pdu_init | ( | rdpFastPath * | fastpath | ) |
wStream* fastpath_update_pdu_init_new | ( | rdpFastPath * | fastpath | ) |
|
static |
|
static |
|
static |
|
static |
Fast-Path packet format is defined in [MS-RDPBCGR] 2.2.9.1.2, which revises server output packets from the first byte with the goal of improving bandwidth.
Slow-Path packet always starts with TPKT header, which has the first byte 0x03, while Fast-Path packet starts with 2 zero bits in the first two less significant bits of the first byte.