20 #ifndef FREERDP_LIB_CORE_FASTPATH_H
21 #define FREERDP_LIB_CORE_FASTPATH_H
29 #define FASTPATH_MAX_PACKET_SIZE 0x3FFF
37 #define FASTPATH_FRAGMENT_SAFE_SIZE 0x3F80
39 typedef struct rdp_fastpath rdpFastPath;
43 #include <winpr/stream.h>
44 #include <freerdp/api.h>
46 enum FASTPATH_INPUT_ACTION_TYPE
48 FASTPATH_INPUT_ACTION_FASTPATH = 0x0,
49 FASTPATH_INPUT_ACTION_X224 = 0x3
52 enum FASTPATH_OUTPUT_ACTION_TYPE
54 FASTPATH_OUTPUT_ACTION_FASTPATH = 0x0,
55 FASTPATH_OUTPUT_ACTION_X224 = 0x3
58 enum FASTPATH_UPDATETYPE
60 FASTPATH_UPDATETYPE_ORDERS = 0x0,
61 FASTPATH_UPDATETYPE_BITMAP = 0x1,
62 FASTPATH_UPDATETYPE_PALETTE = 0x2,
63 FASTPATH_UPDATETYPE_SYNCHRONIZE = 0x3,
64 FASTPATH_UPDATETYPE_SURFCMDS = 0x4,
65 FASTPATH_UPDATETYPE_PTR_NULL = 0x5,
66 FASTPATH_UPDATETYPE_PTR_DEFAULT = 0x6,
67 FASTPATH_UPDATETYPE_PTR_POSITION = 0x8,
68 FASTPATH_UPDATETYPE_COLOR = 0x9,
69 FASTPATH_UPDATETYPE_CACHED = 0xA,
70 FASTPATH_UPDATETYPE_POINTER = 0xB,
71 FASTPATH_UPDATETYPE_LARGE_POINTER = 0xC
74 enum FASTPATH_FRAGMENT
76 FASTPATH_FRAGMENT_SINGLE = 0x0,
77 FASTPATH_FRAGMENT_LAST = 0x1,
78 FASTPATH_FRAGMENT_FIRST = 0x2,
79 FASTPATH_FRAGMENT_NEXT = 0x3
82 enum FASTPATH_OUTPUT_COMPRESSION
84 FASTPATH_OUTPUT_COMPRESSION_USED = 0x2
88 enum FASTPATH_INPUT_EVENT_CODE
90 FASTPATH_INPUT_EVENT_SCANCODE = 0x0,
91 FASTPATH_INPUT_EVENT_MOUSE = 0x1,
92 FASTPATH_INPUT_EVENT_MOUSEX = 0x2,
93 FASTPATH_INPUT_EVENT_SYNC = 0x3,
94 FASTPATH_INPUT_EVENT_UNICODE = 0x4,
95 TS_FP_RELPOINTER_EVENT = 0x5,
96 TS_FP_QOETIMESTAMP_EVENT = 0x6
100 enum FASTPATH_INPUT_KBDFLAGS
102 FASTPATH_INPUT_KBDFLAGS_RELEASE = 0x01,
103 FASTPATH_INPUT_KBDFLAGS_EXTENDED = 0x02,
104 FASTPATH_INPUT_KBDFLAGS_PREFIX_E1 = 0x04
111 BYTE fipsInformation[4];
112 BYTE dataSignature[8];
121 BYTE compressionFlags;
129 FREERDP_LOCAL BOOL fastpath_read_header_rdp(rdpFastPath* fastpath,
wStream* s, UINT16* length);
130 FREERDP_LOCAL state_run_t fastpath_recv_updates(rdpFastPath* fastpath,
wStream* s);
131 FREERDP_LOCAL state_run_t fastpath_recv_inputs(rdpFastPath* fastpath,
wStream* s);
133 FREERDP_LOCAL BOOL fastpath_decrypt(rdpFastPath* fastpath,
wStream* s, UINT16* length);
135 FREERDP_LOCAL
wStream* fastpath_input_pdu_init_header(rdpFastPath* fastpath);
136 FREERDP_LOCAL
wStream* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags,
138 FREERDP_LOCAL BOOL fastpath_send_multiple_input_pdu(rdpFastPath* fastpath,
wStream* s,
140 FREERDP_LOCAL BOOL fastpath_send_input_pdu(rdpFastPath* fastpath,
wStream* s);
142 WINPR_ATTR_MALLOC(Stream_Release, 1)
143 FREERDP_LOCAL
wStream* fastpath_update_pdu_init(rdpFastPath* fastpath);
145 WINPR_ATTR_MALLOC(Stream_Free, 1)
146 FREERDP_LOCAL
wStream* fastpath_update_pdu_init_new(rdpFastPath* fastpath);
147 FREERDP_LOCAL BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode,
wStream* s,
148 BOOL skipCompression);
150 FREERDP_LOCAL BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, UINT16 frameAction,
152 FREERDP_LOCAL BYTE fastpath_get_encryption_flags(rdpFastPath* fastpath);
154 FREERDP_LOCAL rdpFastPath* fastpath_new(rdpRdp* rdp);
155 FREERDP_LOCAL
void fastpath_free(rdpFastPath* fastpath);