mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Added FREERDP_LOCAL
CMake 2.8 does not support default visibility on windows. To allow building tests add the FREERDP_LOCAL define for each function that is internal to FreeRDP. When build with testing these functions are exported and available for use by tests.
This commit is contained in:
@@ -37,25 +37,39 @@
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#ifdef FREERDP_EXPORTS
|
||||
#ifdef __GNUC__
|
||||
#define FREERDP_API __attribute__((dllexport))
|
||||
#else
|
||||
#define FREERDP_API __declspec(dllexport)
|
||||
#endif
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#define FREERDP_API __attribute__((dllimport))
|
||||
#else
|
||||
#define FREERDP_API __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FREERDP_EXPORTS
|
||||
#ifdef __GNUC__
|
||||
#define FREERDP_API __attribute__((dllexport))
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define FREERDP_API __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define FREERDP_API
|
||||
#endif
|
||||
#define FREERDP_API __declspec(dllexport)
|
||||
#endif
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#define FREERDP_API __attribute__((dllimport))
|
||||
#else
|
||||
#define FREERDP_API __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define FREERDP_API __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define FREERDP_API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_TESTING
|
||||
#define FREERDP_LOCAL FREERDP_API
|
||||
#else
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define FREERDP_LOCAL
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define FREERDP_LOCAL __attribute__ ((visibility("hidden")))
|
||||
#else
|
||||
#define FREERDP_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef FREERDP_TEST_EXPORTS
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
#ifndef __NSC_ENCODE_H
|
||||
#define __NSC_ENCODE_H
|
||||
|
||||
void nsc_encode(NSC_CONTEXT* context, const BYTE* bmpdata, UINT32 rowstride);
|
||||
#include <freerdp/api.h>
|
||||
|
||||
FREERDP_LOCAL void nsc_encode(NSC_CONTEXT* context, const BYTE* bmpdata,
|
||||
UINT32 rowstride);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,13 +21,14 @@
|
||||
#define __NSC_SSE2_H
|
||||
|
||||
#include <freerdp/codec/nsc.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
void nsc_init_sse2(NSC_CONTEXT* context);
|
||||
FREERDP_LOCAL void nsc_init_sse2(NSC_CONTEXT* context);
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#ifndef NSC_INIT_SIMD
|
||||
#define NSC_INIT_SIMD(_context) nsc_init_sse2(_context)
|
||||
#endif
|
||||
#ifndef NSC_INIT_SIMD
|
||||
#define NSC_INIT_SIMD(_context) nsc_init_sse2(_context)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __NSC_SSE2_H */
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
#define __RFX_DECODE_H
|
||||
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
/* stride is bytes between rows in the output buffer. */
|
||||
BOOL rfx_decode_rgb(RFX_CONTEXT* context, RFX_TILE* tile, BYTE* rgb_buffer, int stride);
|
||||
FREERDP_LOCAL BOOL rfx_decode_rgb(RFX_CONTEXT* context, RFX_TILE* tile,
|
||||
BYTE* rgb_buffer, int stride);
|
||||
|
||||
#endif /* __RFX_DECODE_H */
|
||||
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
#define __RFX_DIFFERENTIAL_H
|
||||
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
void rfx_differential_decode(INT16* buffer, int size);
|
||||
void rfx_differential_encode(INT16* buffer, int size);
|
||||
FREERDP_LOCAL void rfx_differential_decode(INT16* buffer, int size);
|
||||
FREERDP_LOCAL void rfx_differential_encode(INT16* buffer, int size);
|
||||
|
||||
#endif /* __RFX_DIFFERENTIAL_H */
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
#define __RFX_DWT_H
|
||||
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
void rfx_dwt_2d_decode(INT16* buffer, INT16* dwt_buffer);
|
||||
void rfx_dwt_2d_encode(INT16* buffer, INT16* dwt_buffer);
|
||||
FREERDP_LOCAL void rfx_dwt_2d_decode(INT16* buffer, INT16* dwt_buffer);
|
||||
FREERDP_LOCAL void rfx_dwt_2d_encode(INT16* buffer, INT16* dwt_buffer);
|
||||
|
||||
#endif /* __RFX_DWT_H */
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
#define __RFX_ENCODE_H
|
||||
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
void rfx_encode_rgb(RFX_CONTEXT* context, RFX_TILE* tile);
|
||||
FREERDP_LOCAL void rfx_encode_rgb(RFX_CONTEXT* context, RFX_TILE* tile);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,13 +21,14 @@
|
||||
#define __RFX_NEON_H
|
||||
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
void rfx_init_neon(RFX_CONTEXT * context);
|
||||
FREERDP_LOCAL void rfx_init_neon(RFX_CONTEXT* context);
|
||||
|
||||
#ifndef RFX_INIT_SIMD
|
||||
#if defined(WITH_NEON)
|
||||
#define RFX_INIT_SIMD(_rfx_context) rfx_init_neon(_rfx_context)
|
||||
#endif
|
||||
#if defined(WITH_NEON)
|
||||
#define RFX_INIT_SIMD(_rfx_context) rfx_init_neon(_rfx_context)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __RFX_NEON_H */
|
||||
|
||||
@@ -21,10 +21,14 @@
|
||||
#define __RFX_QUANTIZATION_H
|
||||
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
void rfx_quantization_decode(INT16* buffer, const UINT32* quantization_values);
|
||||
void rfx_quantization_encode(INT16* buffer, const UINT32* quantization_values);
|
||||
FREERDP_LOCAL void rfx_quantization_decode(INT16* buffer,
|
||||
const UINT32* quantization_values);
|
||||
FREERDP_LOCAL void rfx_quantization_encode(INT16* buffer,
|
||||
const UINT32* quantization_values);
|
||||
|
||||
void rfx_quantization_decode_block(const primitives_t *prims, INT16* buffer, int buffer_size, UINT32 factor);
|
||||
FREERDP_LOCAL void rfx_quantization_decode_block(const primitives_t* prims,
|
||||
INT16* buffer, int buffer_size, UINT32 factor);
|
||||
|
||||
#endif /* __RFX_QUANTIZATION_H */
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
#define __RFX_RLGR_H
|
||||
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buffer, int buffer_size);
|
||||
FREERDP_LOCAL int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data,
|
||||
int data_size, BYTE* buffer, int buffer_size);
|
||||
|
||||
#endif /* __RFX_RLGR_H */
|
||||
|
||||
@@ -21,13 +21,14 @@
|
||||
#define __RFX_SSE2_H
|
||||
|
||||
#include <freerdp/codec/rfx.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
void rfx_init_sse2(RFX_CONTEXT* context);
|
||||
FREERDP_LOCAL void rfx_init_sse2(RFX_CONTEXT* context);
|
||||
|
||||
#ifdef WITH_SSE2
|
||||
#ifndef RFX_INIT_SIMD
|
||||
#define RFX_INIT_SIMD(_rfx_context) rfx_init_sse2(_rfx_context)
|
||||
#endif
|
||||
#ifndef RFX_INIT_SIMD
|
||||
#define RFX_INIT_SIMD(_rfx_context) rfx_init_sse2(_rfx_context)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __RFX_SSE2_H */
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "rdp.h"
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/settings.h>
|
||||
|
||||
#define SYNCMSGTYPE_SYNC 0x0001
|
||||
@@ -37,28 +38,30 @@
|
||||
#define FONTLIST_FIRST 0x0001
|
||||
#define FONTLIST_LAST 0x0002
|
||||
|
||||
BOOL rdp_recv_deactivate_all(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_deactivate_all(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_deactivate_all(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_deactivate_all(rdpRdp* rdp);
|
||||
|
||||
BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp);
|
||||
BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp);
|
||||
BOOL rdp_recv_control_pdu(wStream* s, UINT16* action);
|
||||
BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp);
|
||||
BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp);
|
||||
BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action);
|
||||
BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp);
|
||||
BOOL rdp_recv_client_font_list_pdu(wStream* s);
|
||||
BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags);
|
||||
BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_control_pdu(wStream* s, UINT16* action);
|
||||
FREERDP_LOCAL BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_client_font_list_pdu(wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags);
|
||||
FREERDP_LOCAL BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp);
|
||||
|
||||
BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
|
||||
#endif /* __ACTIVATION_H */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/autodetect.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <winpr/sysinfo.h>
|
||||
@@ -32,17 +33,22 @@
|
||||
#define TYPE_ID_AUTODETECT_REQUEST 0x00
|
||||
#define TYPE_ID_AUTODETECT_RESPONSE 0x01
|
||||
|
||||
int rdp_recv_autodetect_request_packet(rdpRdp* rdp, wStream* s);
|
||||
int rdp_recv_autodetect_response_packet(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL int rdp_recv_autodetect_request_packet(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL int rdp_recv_autodetect_response_packet(rdpRdp* rdp, wStream* s);
|
||||
|
||||
rdpAutoDetect* autodetect_new(void);
|
||||
void autodetect_free(rdpAutoDetect* autodetect);
|
||||
FREERDP_LOCAL rdpAutoDetect* autodetect_new(void);
|
||||
FREERDP_LOCAL void autodetect_free(rdpAutoDetect* autodetect);
|
||||
|
||||
void autodetect_register_server_callbacks(rdpAutoDetect* autodetect);
|
||||
BOOL autodetect_send_connecttime_rtt_measure_request(rdpContext* context, UINT16 sequenceNumber);
|
||||
BOOL autodetect_send_connecttime_bandwidth_measure_start(rdpContext* context, UINT16 sequenceNumber);
|
||||
BOOL autodetect_send_bandwidth_measure_payload(rdpContext* context, UINT16 payloadLength, UINT16 sequenceNumber);
|
||||
BOOL autodetect_send_connecttime_bandwidth_measure_stop(rdpContext* context, UINT16 payloadLength, UINT16 sequenceNumber);
|
||||
FREERDP_LOCAL void autodetect_register_server_callbacks(
|
||||
rdpAutoDetect* autodetect);
|
||||
FREERDP_LOCAL BOOL autodetect_send_connecttime_rtt_measure_request(
|
||||
rdpContext* context, UINT16 sequenceNumber);
|
||||
FREERDP_LOCAL BOOL autodetect_send_connecttime_bandwidth_measure_start(
|
||||
rdpContext* context, UINT16 sequenceNumber);
|
||||
FREERDP_LOCAL BOOL autodetect_send_bandwidth_measure_payload(
|
||||
rdpContext* context, UINT16 payloadLength, UINT16 sequenceNumber);
|
||||
FREERDP_LOCAL BOOL autodetect_send_connecttime_bandwidth_measure_stop(
|
||||
rdpContext* context, UINT16 payloadLength, UINT16 sequenceNumber);
|
||||
|
||||
#define AUTODETECT_TAG FREERDP_TAG("core.autodetect")
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ typedef struct rdp_bulk rdpBulk;
|
||||
|
||||
#include "rdp.h"
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/codec/mppc.h>
|
||||
#include <freerdp/codec/ncrush.h>
|
||||
#include <freerdp/codec/xcrush.h>
|
||||
@@ -45,15 +46,17 @@ struct rdp_bulk
|
||||
#define BULK_COMPRESSION_FLAGS_MASK 0xE0
|
||||
#define BULK_COMPRESSION_TYPE_MASK 0x0F
|
||||
|
||||
UINT32 bulk_compression_level(rdpBulk* bulk);
|
||||
UINT32 bulk_compression_max_size(rdpBulk* bulk);
|
||||
FREERDP_LOCAL UINT32 bulk_compression_level(rdpBulk* bulk);
|
||||
FREERDP_LOCAL UINT32 bulk_compression_max_size(rdpBulk* bulk);
|
||||
|
||||
int bulk_decompress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize, UINT32 flags);
|
||||
int bulk_compress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize, UINT32* pFlags);
|
||||
FREERDP_LOCAL int bulk_decompress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize,
|
||||
BYTE** ppDstData, UINT32* pDstSize, UINT32 flags);
|
||||
FREERDP_LOCAL int bulk_compress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize,
|
||||
BYTE** ppDstData, UINT32* pDstSize, UINT32* pFlags);
|
||||
|
||||
void bulk_reset(rdpBulk* bulk);
|
||||
FREERDP_LOCAL void bulk_reset(rdpBulk* bulk);
|
||||
|
||||
rdpBulk* bulk_new(rdpContext* context);
|
||||
void bulk_free(rdpBulk* bulk);
|
||||
FREERDP_LOCAL rdpBulk* bulk_new(rdpContext* context);
|
||||
FREERDP_LOCAL void bulk_free(rdpBulk* bulk);
|
||||
|
||||
#endif /* FREERDP_CORE_BULK_H */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -167,12 +168,13 @@
|
||||
#define CLW_ENTROPY_RLGR1 0x01
|
||||
#define CLW_ENTROPY_RLGR3 0x04
|
||||
|
||||
BOOL rdp_recv_get_active_header(rdpRdp* rdp, wStream* s, UINT16* pChannelId);
|
||||
BOOL rdp_recv_demand_active(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_write_demand_active(wStream* s, rdpSettings* settings);
|
||||
BOOL rdp_send_demand_active(rdpRdp* rdp);
|
||||
BOOL rdp_recv_confirm_active(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_write_confirm_active(wStream* s, rdpSettings* settings);
|
||||
BOOL rdp_send_confirm_active(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_get_active_header(rdpRdp* rdp, wStream* s,
|
||||
UINT16* pChannelId);
|
||||
FREERDP_LOCAL BOOL rdp_recv_demand_active(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_write_demand_active(wStream* s, rdpSettings* settings);
|
||||
FREERDP_LOCAL BOOL rdp_send_demand_active(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_confirm_active(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_write_confirm_active(wStream* s, rdpSettings* settings);
|
||||
FREERDP_LOCAL BOOL rdp_send_confirm_active(rdpRdp* rdp);
|
||||
|
||||
#endif /* __CAPABILITIES_H */
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/print.h>
|
||||
#include <winpr/stream.h>
|
||||
@@ -44,23 +45,30 @@
|
||||
#define BB_RSA_KEY_BLOB 6
|
||||
#define BB_RSA_SIGNATURE_BLOB 8
|
||||
|
||||
BOOL certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info);
|
||||
FREERDP_LOCAL BOOL certificate_read_x509_certificate(rdpCertBlob* cert,
|
||||
rdpCertInfo* info);
|
||||
|
||||
rdpX509CertChain* certificate_new_x509_certificate_chain(UINT32 count);
|
||||
void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain);
|
||||
FREERDP_LOCAL rdpX509CertChain* certificate_new_x509_certificate_chain(
|
||||
UINT32 count);
|
||||
FREERDP_LOCAL void certificate_free_x509_certificate_chain(
|
||||
rdpX509CertChain* x509_cert_chain);
|
||||
|
||||
BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, wStream* s);
|
||||
BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, wStream* s);
|
||||
BOOL certificate_read_server_certificate(rdpCertificate* certificate, BYTE* server_cert, int length);
|
||||
FREERDP_LOCAL BOOL certificate_read_server_proprietary_certificate(
|
||||
rdpCertificate* certificate, wStream* s);
|
||||
FREERDP_LOCAL BOOL certificate_read_server_x509_certificate_chain(
|
||||
rdpCertificate* certificate, wStream* s);
|
||||
FREERDP_LOCAL BOOL certificate_read_server_certificate(rdpCertificate*
|
||||
certificate, BYTE* server_cert, int length);
|
||||
|
||||
rdpCertificate* certificate_clone(rdpCertificate* certificate);
|
||||
FREERDP_LOCAL rdpCertificate* certificate_clone(rdpCertificate* certificate);
|
||||
|
||||
rdpCertificate* certificate_new(void);
|
||||
void certificate_free(rdpCertificate* certificate);
|
||||
FREERDP_LOCAL rdpCertificate* certificate_new(void);
|
||||
FREERDP_LOCAL void certificate_free(rdpCertificate* certificate);
|
||||
|
||||
rdpRsaKey* key_new(const char *keyfile);
|
||||
rdpRsaKey* key_new_from_content(const char *keycontent, const char *keyfile);
|
||||
void key_free(rdpRsaKey* key);
|
||||
FREERDP_LOCAL rdpRsaKey* key_new(const char* keyfile);
|
||||
FREERDP_LOCAL rdpRsaKey* key_new_from_content(const char* keycontent,
|
||||
const char* keyfile);
|
||||
FREERDP_LOCAL void key_free(rdpRsaKey* key);
|
||||
|
||||
#define CERTIFICATE_TAG FREERDP_TAG("core.certificate")
|
||||
#ifdef WITH_DEBUG_CERTIFICATE
|
||||
|
||||
@@ -20,10 +20,14 @@
|
||||
#ifndef __CHANNEL_H
|
||||
#define __CHANNEL_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include "client.h"
|
||||
|
||||
BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channelId, BYTE* data, int size);
|
||||
BOOL freerdp_channel_process(freerdp* instance, wStream* s, UINT16 channelId);
|
||||
BOOL freerdp_channel_peer_process(freerdp_peer* client, wStream* s, UINT16 channelId);
|
||||
FREERDP_LOCAL BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channelId,
|
||||
BYTE* data, int size);
|
||||
FREERDP_LOCAL BOOL freerdp_channel_process(freerdp* instance, wStream* s,
|
||||
UINT16 channelId);
|
||||
FREERDP_LOCAL BOOL freerdp_channel_peer_process(freerdp_peer* client,
|
||||
wStream* s, UINT16 channelId);
|
||||
|
||||
#endif /* __CHANNEL_H */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <freerdp/svc.h>
|
||||
#include <freerdp/peer.h>
|
||||
#include <freerdp/addin.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <freerdp/client/channels.h>
|
||||
#include <freerdp/client/drdynvc.h>
|
||||
@@ -108,11 +109,11 @@ struct rdp_channels
|
||||
wHashTable* openHandles;
|
||||
};
|
||||
|
||||
rdpChannels* freerdp_channels_new(freerdp* instance);
|
||||
UINT freerdp_channels_disconnect(rdpChannels* channels,
|
||||
freerdp* instance);
|
||||
void freerdp_channels_close(rdpChannels* channels,
|
||||
freerdp* instance);
|
||||
void freerdp_channels_free(rdpChannels* channels);
|
||||
FREERDP_LOCAL rdpChannels* freerdp_channels_new(freerdp* instance);
|
||||
FREERDP_LOCAL UINT freerdp_channels_disconnect(rdpChannels* channels,
|
||||
freerdp* instance);
|
||||
FREERDP_LOCAL void freerdp_channels_close(rdpChannels* channels,
|
||||
freerdp* instance);
|
||||
FREERDP_LOCAL void freerdp_channels_free(rdpChannels* channels);
|
||||
|
||||
#endif /* FREERDP_CORE_CLIENT_H */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "activation.h"
|
||||
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
enum CONNECTION_STATE
|
||||
{
|
||||
@@ -48,25 +49,30 @@ enum CONNECTION_STATE
|
||||
CONNECTION_STATE_ACTIVE
|
||||
};
|
||||
|
||||
BOOL rdp_client_connect(rdpRdp* rdp);
|
||||
BOOL rdp_client_disconnect(rdpRdp* rdp);
|
||||
BOOL rdp_client_reconnect(rdpRdp* rdp);
|
||||
BOOL rdp_client_redirect(rdpRdp* rdp);
|
||||
BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_client_connect_auto_detect(rdpRdp* rdp, wStream* s);
|
||||
int rdp_client_connect_license(rdpRdp* rdp, wStream* s);
|
||||
int rdp_client_connect_demand_active(rdpRdp* rdp, wStream* s);
|
||||
int rdp_client_connect_finalize(rdpRdp* rdp);
|
||||
int rdp_client_transition_to_state(rdpRdp* rdp, int state);
|
||||
FREERDP_LOCAL BOOL rdp_client_connect(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_client_disconnect(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_client_reconnect(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_client_redirect(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_client_connect_auto_detect(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL int rdp_client_connect_license(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL int rdp_client_connect_demand_active(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL int rdp_client_connect_finalize(rdpRdp* rdp);
|
||||
FREERDP_LOCAL int rdp_client_transition_to_state(rdpRdp* rdp, int state);
|
||||
|
||||
BOOL rdp_server_accept_nego(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_mcs_attach_user_request(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_server_establish_keys(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_server_reactivate(rdpRdp* rdp);
|
||||
int rdp_server_transition_to_state(rdpRdp* rdp, int state);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_nego(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_establish_keys(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_reactivate(rdpRdp* rdp);
|
||||
FREERDP_LOCAL int rdp_server_transition_to_state(rdpRdp* rdp, int state);
|
||||
|
||||
#endif /* __CONNECTION_H */
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#define __ERRINFO_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
struct _ERRINFO
|
||||
{
|
||||
@@ -30,6 +31,6 @@ struct _ERRINFO
|
||||
};
|
||||
typedef struct _ERRINFO ERRINFO;
|
||||
|
||||
void rdp_print_errinfo(UINT32 code);
|
||||
FREERDP_LOCAL void rdp_print_errinfo(UINT32 code);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,7 @@ typedef struct rdp_fastpath rdpFastPath;
|
||||
#include "rdp.h"
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
enum FASTPATH_INPUT_ACTION_TYPE
|
||||
{
|
||||
@@ -148,24 +149,29 @@ struct rdp_fastpath
|
||||
int fragmentation;
|
||||
};
|
||||
|
||||
UINT16 fastpath_header_length(wStream* s);
|
||||
UINT16 fastpath_read_header(rdpFastPath* fastpath, wStream* s);
|
||||
BOOL fastpath_read_header_rdp(rdpFastPath* fastpath, wStream* s, UINT16 *length);
|
||||
int fastpath_recv_updates(rdpFastPath* fastpath, wStream* s);
|
||||
int fastpath_recv_inputs(rdpFastPath* fastpath, wStream* s);
|
||||
FREERDP_LOCAL UINT16 fastpath_header_length(wStream* s);
|
||||
FREERDP_LOCAL UINT16 fastpath_read_header(rdpFastPath* fastpath, wStream* s);
|
||||
FREERDP_LOCAL BOOL fastpath_read_header_rdp(rdpFastPath* fastpath, wStream* s,
|
||||
UINT16* length);
|
||||
FREERDP_LOCAL int fastpath_recv_updates(rdpFastPath* fastpath, wStream* s);
|
||||
FREERDP_LOCAL int fastpath_recv_inputs(rdpFastPath* fastpath, wStream* s);
|
||||
|
||||
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, int iEventCount);
|
||||
BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, wStream* s);
|
||||
FREERDP_LOCAL wStream* fastpath_input_pdu_init_header(rdpFastPath* fastpath);
|
||||
FREERDP_LOCAL wStream* fastpath_input_pdu_init(rdpFastPath* fastpath,
|
||||
BYTE eventFlags, BYTE eventCode);
|
||||
FREERDP_LOCAL BOOL fastpath_send_multiple_input_pdu(rdpFastPath* fastpath,
|
||||
wStream* s, int iEventCount);
|
||||
FREERDP_LOCAL 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);
|
||||
FREERDP_LOCAL wStream* fastpath_update_pdu_init(rdpFastPath* fastpath);
|
||||
FREERDP_LOCAL wStream* fastpath_update_pdu_init_new(rdpFastPath* fastpath);
|
||||
FREERDP_LOCAL BOOL fastpath_send_update_pdu(rdpFastPath* fastpath,
|
||||
BYTE updateCode, wStream* s, BOOL skipCompression);
|
||||
|
||||
BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, UINT16 frameAction, UINT32 frameId);
|
||||
FREERDP_LOCAL BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath,
|
||||
UINT16 frameAction, UINT32 frameId);
|
||||
|
||||
rdpFastPath* fastpath_new(rdpRdp* rdp);
|
||||
void fastpath_free(rdpFastPath* fastpath);
|
||||
FREERDP_LOCAL rdpFastPath* fastpath_new(rdpRdp* rdp);
|
||||
FREERDP_LOCAL void fastpath_free(rdpFastPath* fastpath);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,7 @@ typedef struct _http_response HttpResponse;
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/crypto/tls.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <winpr/winhttp.h>
|
||||
@@ -43,15 +44,23 @@ struct _http_context
|
||||
char* RdgConnectionId;
|
||||
};
|
||||
|
||||
BOOL http_context_set_method(HttpContext* context, const char* Method);
|
||||
BOOL http_context_set_uri(HttpContext* context, const char* URI);
|
||||
BOOL http_context_set_user_agent(HttpContext* context, const char* UserAgent);
|
||||
BOOL http_context_set_host(HttpContext* context, const char* Host);
|
||||
BOOL http_context_set_accept(HttpContext* context, const char* Accept);
|
||||
BOOL http_context_set_cache_control(HttpContext* context, const char* CacheControl);
|
||||
BOOL http_context_set_connection(HttpContext* context, const char* Connection);
|
||||
BOOL http_context_set_pragma(HttpContext* context, const char* Pragma);
|
||||
BOOL http_context_set_rdg_connection_id(HttpContext* context, const char* RdgConnectionId);
|
||||
FREERDP_LOCAL BOOL http_context_set_method(HttpContext* context,
|
||||
const char* Method);
|
||||
FREERDP_LOCAL BOOL http_context_set_uri(HttpContext* context, const char* URI);
|
||||
FREERDP_LOCAL BOOL http_context_set_user_agent(HttpContext* context,
|
||||
const char* UserAgent);
|
||||
FREERDP_LOCAL BOOL http_context_set_host(HttpContext* context,
|
||||
const char* Host);
|
||||
FREERDP_LOCAL BOOL http_context_set_accept(HttpContext* context,
|
||||
const char* Accept);
|
||||
FREERDP_LOCAL BOOL http_context_set_cache_control(HttpContext* context,
|
||||
const char* CacheControl);
|
||||
FREERDP_LOCAL BOOL http_context_set_connection(HttpContext* context,
|
||||
const char* Connection);
|
||||
FREERDP_LOCAL BOOL http_context_set_pragma(HttpContext* context,
|
||||
const char* Pragma);
|
||||
FREERDP_LOCAL BOOL http_context_set_rdg_connection_id(HttpContext* context,
|
||||
const char* RdgConnectionId);
|
||||
|
||||
HttpContext* http_context_new(void);
|
||||
void http_context_free(HttpContext* context);
|
||||
@@ -68,16 +77,21 @@ struct _http_request
|
||||
char* TransferEncoding;
|
||||
};
|
||||
|
||||
BOOL http_request_set_method(HttpRequest* request, const char* Method);
|
||||
BOOL http_request_set_uri(HttpRequest* request, const char* URI);
|
||||
BOOL http_request_set_auth_scheme(HttpRequest* request, const char* AuthScheme);
|
||||
BOOL http_request_set_auth_param(HttpRequest* request, const char* AuthParam);
|
||||
BOOL http_request_set_transfer_encoding(HttpRequest* request, const char* TransferEncoding);
|
||||
FREERDP_LOCAL BOOL http_request_set_method(HttpRequest* request,
|
||||
const char* Method);
|
||||
FREERDP_LOCAL BOOL http_request_set_uri(HttpRequest* request, const char* URI);
|
||||
FREERDP_LOCAL BOOL http_request_set_auth_scheme(HttpRequest* request,
|
||||
const char* AuthScheme);
|
||||
FREERDP_LOCAL BOOL http_request_set_auth_param(HttpRequest* request,
|
||||
const char* AuthParam);
|
||||
FREERDP_LOCAL BOOL http_request_set_transfer_encoding(HttpRequest* request,
|
||||
const char* TransferEncoding);
|
||||
|
||||
wStream* http_request_write(HttpContext* context, HttpRequest* request);
|
||||
FREERDP_LOCAL wStream* http_request_write(HttpContext* context,
|
||||
HttpRequest* request);
|
||||
|
||||
HttpRequest* http_request_new(void);
|
||||
void http_request_free(HttpRequest* request);
|
||||
FREERDP_LOCAL HttpRequest* http_request_new(void);
|
||||
FREERDP_LOCAL void http_request_free(HttpRequest* request);
|
||||
|
||||
struct _http_response
|
||||
{
|
||||
@@ -96,11 +110,11 @@ struct _http_response
|
||||
wListDictionary* Authenticates;
|
||||
};
|
||||
|
||||
void http_response_print(HttpResponse* response);
|
||||
FREERDP_LOCAL void http_response_print(HttpResponse* response);
|
||||
|
||||
HttpResponse* http_response_recv(rdpTls* tls);
|
||||
FREERDP_LOCAL HttpResponse* http_response_recv(rdpTls* tls);
|
||||
|
||||
HttpResponse* http_response_new(void);
|
||||
void http_response_free(HttpResponse* response);
|
||||
FREERDP_LOCAL HttpResponse* http_response_new(void);
|
||||
FREERDP_LOCAL void http_response_free(HttpResponse* response);
|
||||
|
||||
#endif /* FREERDP_CORE_HTTP_H */
|
||||
|
||||
@@ -25,19 +25,24 @@
|
||||
|
||||
#include <freerdp/crypto/tls.h>
|
||||
#include <freerdp/crypto/crypto.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
#include "rpc.h"
|
||||
#include "http.h"
|
||||
|
||||
int rpc_ncacn_http_ntlm_init(rdpRpc* rpc, RpcChannel* channel);
|
||||
void rpc_ncacn_http_ntlm_uninit(rdpRpc* rpc, RpcChannel* channel);
|
||||
FREERDP_LOCAL int rpc_ncacn_http_ntlm_init(rdpRpc* rpc, RpcChannel* channel);
|
||||
FREERDP_LOCAL void rpc_ncacn_http_ntlm_uninit(rdpRpc* rpc, RpcChannel* channel);
|
||||
|
||||
int rpc_ncacn_http_send_in_channel_request(rdpRpc* rpc, RpcInChannel* inChannel);
|
||||
int rpc_ncacn_http_recv_in_channel_response(rdpRpc* rpc, RpcInChannel* inChannel, HttpResponse* response);
|
||||
FREERDP_LOCAL int rpc_ncacn_http_send_in_channel_request(rdpRpc* rpc,
|
||||
RpcInChannel* inChannel);
|
||||
FREERDP_LOCAL int rpc_ncacn_http_recv_in_channel_response(rdpRpc* rpc,
|
||||
RpcInChannel* inChannel, HttpResponse* response);
|
||||
|
||||
int rpc_ncacn_http_send_out_channel_request(rdpRpc* rpc, RpcOutChannel* outChannel, BOOL replacement);
|
||||
int rpc_ncacn_http_recv_out_channel_response(rdpRpc* rpc, RpcOutChannel* outChannel, HttpResponse* response);
|
||||
FREERDP_LOCAL int rpc_ncacn_http_send_out_channel_request(rdpRpc* rpc,
|
||||
RpcOutChannel* outChannel, BOOL replacement);
|
||||
FREERDP_LOCAL int rpc_ncacn_http_recv_out_channel_response(rdpRpc* rpc,
|
||||
RpcOutChannel* outChannel, HttpResponse* response);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,7 @@ typedef struct rdp_ntlm rdpNtlm;
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/crypto/tls.h>
|
||||
#include <freerdp/crypto/crypto.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/sspi.h>
|
||||
#include <winpr/print.h>
|
||||
@@ -64,15 +65,17 @@ struct rdp_ntlm
|
||||
SecPkgContext_Bindings* Bindings;
|
||||
};
|
||||
|
||||
BOOL ntlm_authenticate(rdpNtlm* ntlm);
|
||||
FREERDP_LOCAL BOOL ntlm_authenticate(rdpNtlm* ntlm);
|
||||
|
||||
BOOL ntlm_client_init(rdpNtlm* ntlm, BOOL confidentiality, char* user,
|
||||
char* domain, char* password, SecPkgContext_Bindings* Bindings);
|
||||
void ntlm_client_uninit(rdpNtlm* ntlm);
|
||||
FREERDP_LOCAL BOOL ntlm_client_init(rdpNtlm* ntlm, BOOL confidentiality,
|
||||
char* user,
|
||||
char* domain, char* password, SecPkgContext_Bindings* Bindings);
|
||||
FREERDP_LOCAL void ntlm_client_uninit(rdpNtlm* ntlm);
|
||||
|
||||
BOOL ntlm_client_make_spn(rdpNtlm* ntlm, LPCTSTR ServiceClass, char* hostname);
|
||||
FREERDP_LOCAL BOOL ntlm_client_make_spn(rdpNtlm* ntlm, LPCTSTR ServiceClass,
|
||||
char* hostname);
|
||||
|
||||
rdpNtlm* ntlm_new(void);
|
||||
void ntlm_free(rdpNtlm* ntlm);
|
||||
FREERDP_LOCAL rdpNtlm* ntlm_new(void);
|
||||
FREERDP_LOCAL void ntlm_free(rdpNtlm* ntlm);
|
||||
|
||||
#endif /* FREERDP_CORE_NTLM_H */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/utils/ringbuffer.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/crypto/tls.h>
|
||||
@@ -142,12 +143,14 @@ struct rdp_rdg
|
||||
};
|
||||
|
||||
|
||||
rdpRdg* rdg_new(rdpTransport* transport);
|
||||
void rdg_free(rdpRdg* rdg);
|
||||
FREERDP_LOCAL rdpRdg* rdg_new(rdpTransport* transport);
|
||||
FREERDP_LOCAL void rdg_free(rdpRdg* rdg);
|
||||
|
||||
BOOL rdg_connect(rdpRdg* rdg, const char* hostname, UINT16 port, int timeout);
|
||||
DWORD rdg_get_event_handles(rdpRdg* rdg, HANDLE* events, DWORD count);
|
||||
BOOL rdg_check_event_handles(rdpRdg* rdg);
|
||||
FREERDP_LOCAL BOOL rdg_connect(rdpRdg* rdg, const char* hostname, UINT16 port,
|
||||
int timeout);
|
||||
FREERDP_LOCAL DWORD rdg_get_event_handles(rdpRdg* rdg, HANDLE* events,
|
||||
DWORD count);
|
||||
FREERDP_LOCAL BOOL rdg_check_event_handles(rdpRdg* rdg);
|
||||
|
||||
|
||||
#endif /* FREERDP_CORE_RDG_H */
|
||||
|
||||
@@ -84,6 +84,7 @@ typedef struct _RPC_PDU
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/crypto/tls.h>
|
||||
#include <freerdp/crypto/crypto.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/print.h>
|
||||
|
||||
@@ -713,7 +714,8 @@ struct rpc_virtual_connection_cookie_entry
|
||||
UINT32 ReferenceCount;
|
||||
RpcVirtualConnection* Reference;
|
||||
};
|
||||
typedef struct rpc_virtual_connection_cookie_entry RpcVirtualConnectionCookieEntry;
|
||||
typedef struct rpc_virtual_connection_cookie_entry
|
||||
RpcVirtualConnectionCookieEntry;
|
||||
|
||||
struct rpc_client
|
||||
{
|
||||
@@ -729,7 +731,7 @@ typedef struct rpc_client RpcClient;
|
||||
struct rdp_rpc
|
||||
{
|
||||
RPC_CLIENT_STATE State;
|
||||
|
||||
|
||||
UINT32 result;
|
||||
|
||||
rdpNtlm* ntlm;
|
||||
@@ -763,35 +765,42 @@ struct rdp_rpc
|
||||
RpcVirtualConnection* VirtualConnection;
|
||||
};
|
||||
|
||||
void rpc_pdu_header_print(rpcconn_hdr_t* header);
|
||||
void rpc_pdu_header_init(rdpRpc* rpc, rpcconn_hdr_t* header);
|
||||
FREERDP_LOCAL void rpc_pdu_header_print(rpcconn_hdr_t* header);
|
||||
FREERDP_LOCAL void rpc_pdu_header_init(rdpRpc* rpc, rpcconn_hdr_t* header);
|
||||
|
||||
UINT32 rpc_offset_align(UINT32* offset, UINT32 alignment);
|
||||
UINT32 rpc_offset_pad(UINT32* offset, UINT32 pad);
|
||||
FREERDP_LOCAL UINT32 rpc_offset_align(UINT32* offset, UINT32 alignment);
|
||||
FREERDP_LOCAL UINT32 rpc_offset_pad(UINT32* offset, UINT32 pad);
|
||||
|
||||
BOOL rpc_get_stub_data_info(rdpRpc* rpc, BYTE* header, UINT32* offset, UINT32* length);
|
||||
FREERDP_LOCAL BOOL rpc_get_stub_data_info(rdpRpc* rpc, BYTE* header,
|
||||
UINT32* offset, UINT32* length);
|
||||
|
||||
int rpc_in_channel_write(RpcInChannel* inChannel, const BYTE* data, int length);
|
||||
FREERDP_LOCAL int rpc_in_channel_write(RpcInChannel* inChannel,
|
||||
const BYTE* data, int length);
|
||||
|
||||
int rpc_out_channel_read(RpcOutChannel* outChannel, BYTE* data, int length);
|
||||
int rpc_out_channel_write(RpcOutChannel* outChannel, const BYTE* data, int length);
|
||||
FREERDP_LOCAL int rpc_out_channel_read(RpcOutChannel* outChannel, BYTE* data,
|
||||
int length);
|
||||
FREERDP_LOCAL int rpc_out_channel_write(RpcOutChannel* outChannel,
|
||||
const BYTE* data, int length);
|
||||
|
||||
RpcInChannel* rpc_client_in_channel_new(rdpRpc* rpc);
|
||||
void rpc_in_channel_free(RpcInChannel* inChannel);
|
||||
FREERDP_LOCAL RpcInChannel* rpc_client_in_channel_new(rdpRpc* rpc);
|
||||
FREERDP_LOCAL void rpc_in_channel_free(RpcInChannel* inChannel);
|
||||
|
||||
RpcOutChannel* rpc_out_channel_new(rdpRpc* rpc);
|
||||
int rpc_out_channel_replacement_connect(RpcOutChannel* outChannel, int timeout);
|
||||
void rpc_out_channel_free(RpcOutChannel* outChannel);
|
||||
FREERDP_LOCAL RpcOutChannel* rpc_out_channel_new(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rpc_out_channel_replacement_connect(RpcOutChannel* outChannel,
|
||||
int timeout);
|
||||
FREERDP_LOCAL void rpc_out_channel_free(RpcOutChannel* outChannel);
|
||||
|
||||
int rpc_in_channel_transition_to_state(RpcInChannel* inChannel, CLIENT_IN_CHANNEL_STATE state);
|
||||
int rpc_out_channel_transition_to_state(RpcOutChannel* outChannel, CLIENT_OUT_CHANNEL_STATE state);
|
||||
FREERDP_LOCAL int rpc_in_channel_transition_to_state(RpcInChannel* inChannel,
|
||||
CLIENT_IN_CHANNEL_STATE state);
|
||||
FREERDP_LOCAL int rpc_out_channel_transition_to_state(RpcOutChannel* outChannel,
|
||||
CLIENT_OUT_CHANNEL_STATE state);
|
||||
|
||||
int rpc_virtual_connection_transition_to_state(rdpRpc* rpc,
|
||||
RpcVirtualConnection* connection, VIRTUAL_CONNECTION_STATE state);
|
||||
FREERDP_LOCAL int rpc_virtual_connection_transition_to_state(rdpRpc* rpc,
|
||||
RpcVirtualConnection* connection, VIRTUAL_CONNECTION_STATE state);
|
||||
|
||||
BOOL rpc_connect(rdpRpc* rpc, int timeout);
|
||||
FREERDP_LOCAL BOOL rpc_connect(rdpRpc* rpc, int timeout);
|
||||
|
||||
rdpRpc* rpc_new(rdpTransport* transport);
|
||||
void rpc_free(rdpRpc* rpc);
|
||||
FREERDP_LOCAL rdpRpc* rpc_new(rdpTransport* transport);
|
||||
FREERDP_LOCAL void rpc_free(rdpRpc* rpc);
|
||||
|
||||
#endif /* FREERDP_CORE_RPC_H */
|
||||
|
||||
@@ -23,18 +23,20 @@
|
||||
#include "rpc.h"
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
const p_uuid_t TSGU_UUID;
|
||||
FREERDP_LOCAL const p_uuid_t TSGU_UUID;
|
||||
#define TSGU_SYNTAX_IF_VERSION 0x00030001
|
||||
|
||||
const p_uuid_t NDR_UUID;
|
||||
FREERDP_LOCAL const p_uuid_t NDR_UUID;
|
||||
#define NDR_SYNTAX_IF_VERSION 0x00000002
|
||||
|
||||
const p_uuid_t BTFN_UUID;
|
||||
FREERDP_LOCAL const p_uuid_t BTFN_UUID;
|
||||
#define BTFN_SYNTAX_IF_VERSION 0x00000001
|
||||
|
||||
int rpc_send_bind_pdu(rdpRpc* rpc);
|
||||
int rpc_recv_bind_ack_pdu(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rpc_send_rpc_auth_3_pdu(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rpc_send_bind_pdu(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rpc_recv_bind_ack_pdu(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rpc_send_rpc_auth_3_pdu(rdpRpc* rpc);
|
||||
|
||||
#endif /* FREERDP_CORE_RPC_BIND_H */
|
||||
|
||||
@@ -20,23 +20,29 @@
|
||||
#ifndef FREERDP_CORE_RPC_CLIENT_H
|
||||
#define FREERDP_CORE_RPC_CLIENT_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include "rpc.h"
|
||||
|
||||
RpcClientCall* rpc_client_call_find_by_id(rdpRpc* rpc, UINT32 CallId);
|
||||
FREERDP_LOCAL RpcClientCall* rpc_client_call_find_by_id(rdpRpc* rpc,
|
||||
UINT32 CallId);
|
||||
|
||||
RpcClientCall* rpc_client_call_new(UINT32 CallId, UINT32 OpNum);
|
||||
void rpc_client_call_free(RpcClientCall* client_call);
|
||||
FREERDP_LOCAL RpcClientCall* rpc_client_call_new(UINT32 CallId, UINT32 OpNum);
|
||||
FREERDP_LOCAL void rpc_client_call_free(RpcClientCall* client_call);
|
||||
|
||||
int rpc_in_channel_send_pdu(RpcInChannel* inChannel, BYTE* buffer, UINT32 length);
|
||||
FREERDP_LOCAL int rpc_in_channel_send_pdu(RpcInChannel* inChannel, BYTE* buffer,
|
||||
UINT32 length);
|
||||
|
||||
int rpc_client_in_channel_recv(rdpRpc* rpc);
|
||||
int rpc_client_out_channel_recv(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rpc_client_in_channel_recv(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rpc_client_out_channel_recv(rdpRpc* rpc);
|
||||
|
||||
int rpc_client_receive_pipe_read(rdpRpc* rpc, BYTE* buffer, size_t length);
|
||||
FREERDP_LOCAL int rpc_client_receive_pipe_read(rdpRpc* rpc, BYTE* buffer,
|
||||
size_t length);
|
||||
|
||||
int rpc_client_write_call(rdpRpc* rpc, BYTE* data, int length, UINT16 opnum);
|
||||
FREERDP_LOCAL int rpc_client_write_call(rdpRpc* rpc, BYTE* data, int length,
|
||||
UINT16 opnum);
|
||||
|
||||
int rpc_client_new(rdpRpc* rpc);
|
||||
void rpc_client_free(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rpc_client_new(rdpRpc* rpc);
|
||||
FREERDP_LOCAL void rpc_client_free(rdpRpc* rpc);
|
||||
|
||||
#endif /* FREERDP_CORE_RPC_CLIENT_H */
|
||||
|
||||
@@ -23,8 +23,9 @@
|
||||
#include "rpc.h"
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
int rpc_recv_fault_pdu(rpcconn_hdr_t* header);
|
||||
UINT32 rpc_map_status_code_to_win32_error_code(UINT32 code);
|
||||
FREERDP_LOCAL int rpc_recv_fault_pdu(rpcconn_hdr_t* header);
|
||||
FREERDP_LOCAL UINT32 rpc_map_status_code_to_win32_error_code(UINT32 code);
|
||||
|
||||
#endif /* FREERDP_CORE_RPC_FAULT_H */
|
||||
|
||||
@@ -77,71 +77,100 @@
|
||||
#define FDServer 0x00000002
|
||||
#define FDOutProxy 0x00000003
|
||||
|
||||
void rts_generate_cookie(BYTE* cookie);
|
||||
FREERDP_LOCAL void rts_generate_cookie(BYTE* cookie);
|
||||
|
||||
int rts_command_length(rdpRpc* rpc, UINT32 CommandType, BYTE* buffer, UINT32 length);
|
||||
int rts_recv_pdu_commands(rdpRpc* rpc, rpcconn_rts_hdr_t* rts);
|
||||
FREERDP_LOCAL int rts_command_length(rdpRpc* rpc, UINT32 CommandType,
|
||||
BYTE* buffer, UINT32 length);
|
||||
FREERDP_LOCAL int rts_recv_pdu_commands(rdpRpc* rpc, rpcconn_rts_hdr_t* rts);
|
||||
|
||||
int rts_receive_window_size_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length, UINT32* ReceiveWindowSize);
|
||||
int rts_receive_window_size_command_write(BYTE* buffer, UINT32 ReceiveWindowSize);
|
||||
FREERDP_LOCAL int rts_receive_window_size_command_read(rdpRpc* rpc,
|
||||
BYTE* buffer, UINT32 length, UINT32* ReceiveWindowSize);
|
||||
FREERDP_LOCAL int rts_receive_window_size_command_write(BYTE* buffer,
|
||||
UINT32 ReceiveWindowSize);
|
||||
|
||||
int rts_flow_control_ack_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length,
|
||||
UINT32* BytesReceived, UINT32* AvailableWindow, BYTE* ChannelCookie);
|
||||
int rts_flow_control_ack_command_write(BYTE* buffer, UINT32 BytesReceived, UINT32 AvailableWindow, BYTE* ChannelCookie);
|
||||
FREERDP_LOCAL int rts_flow_control_ack_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length,
|
||||
UINT32* BytesReceived, UINT32* AvailableWindow, BYTE* ChannelCookie);
|
||||
FREERDP_LOCAL int rts_flow_control_ack_command_write(BYTE* buffer,
|
||||
UINT32 BytesReceived, UINT32 AvailableWindow, BYTE* ChannelCookie);
|
||||
|
||||
int rts_connection_timeout_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length, UINT32* ConnectionTimeout);
|
||||
int rts_connection_timeout_command_write(BYTE* buffer, UINT32 ConnectionTimeout);
|
||||
FREERDP_LOCAL int rts_connection_timeout_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length, UINT32* ConnectionTimeout);
|
||||
FREERDP_LOCAL int rts_connection_timeout_command_write(BYTE* buffer,
|
||||
UINT32 ConnectionTimeout);
|
||||
|
||||
int rts_cookie_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_cookie_command_write(BYTE* buffer, BYTE* Cookie);
|
||||
FREERDP_LOCAL int rts_cookie_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_cookie_command_write(BYTE* buffer, BYTE* Cookie);
|
||||
|
||||
int rts_channel_lifetime_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_channel_lifetime_command_write(BYTE* buffer, UINT32 ChannelLifetime);
|
||||
FREERDP_LOCAL int rts_channel_lifetime_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_channel_lifetime_command_write(BYTE* buffer,
|
||||
UINT32 ChannelLifetime);
|
||||
|
||||
int rts_client_keepalive_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_client_keepalive_command_write(BYTE* buffer, UINT32 ClientKeepalive);
|
||||
FREERDP_LOCAL int rts_client_keepalive_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_client_keepalive_command_write(BYTE* buffer,
|
||||
UINT32 ClientKeepalive);
|
||||
|
||||
int rts_version_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_version_command_write(BYTE* buffer);
|
||||
FREERDP_LOCAL int rts_version_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_version_command_write(BYTE* buffer);
|
||||
|
||||
int rts_empty_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_empty_command_write(BYTE* buffer);
|
||||
FREERDP_LOCAL int rts_empty_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_empty_command_write(BYTE* buffer);
|
||||
|
||||
int rts_padding_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_padding_command_write(BYTE* buffer, UINT32 ConformanceCount);
|
||||
FREERDP_LOCAL int rts_padding_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_padding_command_write(BYTE* buffer,
|
||||
UINT32 ConformanceCount);
|
||||
|
||||
int rts_negative_ance_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_negative_ance_command_write(BYTE* buffer);
|
||||
FREERDP_LOCAL int rts_negative_ance_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_negative_ance_command_write(BYTE* buffer);
|
||||
|
||||
int rts_ance_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_ance_command_write(BYTE* buffer);
|
||||
FREERDP_LOCAL int rts_ance_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_ance_command_write(BYTE* buffer);
|
||||
|
||||
int rts_client_address_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_client_address_command_write(BYTE* buffer, UINT32 AddressType, BYTE* ClientAddress);
|
||||
FREERDP_LOCAL int rts_client_address_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
FREERDP_LOCAL int rts_client_address_command_write(BYTE* buffer,
|
||||
UINT32 AddressType, BYTE* ClientAddress);
|
||||
|
||||
int rts_association_group_id_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_association_group_id_command_write(BYTE* buffer, BYTE* AssociationGroupId);
|
||||
FREERDP_LOCAL int rts_association_group_id_command_read(rdpRpc* rpc,
|
||||
BYTE* buffer, UINT32 length);
|
||||
FREERDP_LOCAL int rts_association_group_id_command_write(BYTE* buffer,
|
||||
BYTE* AssociationGroupId);
|
||||
|
||||
int rts_destination_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length, UINT32* Destination);
|
||||
int rts_destination_command_write(BYTE* buffer, UINT32 Destination);
|
||||
FREERDP_LOCAL int rts_destination_command_read(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length, UINT32* Destination);
|
||||
FREERDP_LOCAL int rts_destination_command_write(BYTE* buffer,
|
||||
UINT32 Destination);
|
||||
|
||||
int rts_ping_traffic_sent_notify_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
int rts_ping_traffic_sent_notify_command_write(BYTE* buffer, UINT32 PingTrafficSent);
|
||||
FREERDP_LOCAL int rts_ping_traffic_sent_notify_command_read(rdpRpc* rpc,
|
||||
BYTE* buffer, UINT32 length);
|
||||
FREERDP_LOCAL int rts_ping_traffic_sent_notify_command_write(BYTE* buffer,
|
||||
UINT32 PingTrafficSent);
|
||||
|
||||
int rts_send_CONN_A1_pdu(rdpRpc* rpc);
|
||||
int rts_recv_CONN_A3_pdu(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
FREERDP_LOCAL int rts_send_CONN_A1_pdu(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rts_recv_CONN_A3_pdu(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
|
||||
int rts_send_CONN_B1_pdu(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rts_send_CONN_B1_pdu(rdpRpc* rpc);
|
||||
|
||||
int rts_recv_CONN_C2_pdu(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
FREERDP_LOCAL int rts_recv_CONN_C2_pdu(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
|
||||
int rts_send_OUT_R1_A3_pdu(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rts_send_OUT_R1_A3_pdu(rdpRpc* rpc);
|
||||
|
||||
int rts_send_keep_alive_pdu(rdpRpc* rpc);
|
||||
int rts_send_flow_control_ack_pdu(rdpRpc* rpc);
|
||||
int rts_send_ping_pdu(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rts_send_keep_alive_pdu(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rts_send_flow_control_ack_pdu(rdpRpc* rpc);
|
||||
FREERDP_LOCAL int rts_send_ping_pdu(rdpRpc* rpc);
|
||||
|
||||
int rts_recv_out_of_sequence_pdu(rdpRpc* rpc, BYTE* buffer, UINT32 length);
|
||||
FREERDP_LOCAL int rts_recv_out_of_sequence_pdu(rdpRpc* rpc, BYTE* buffer,
|
||||
UINT32 length);
|
||||
|
||||
#include "rts_signature.h"
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ typedef struct _RTS_PDU_SIGNATURE_ENTRY RTS_PDU_SIGNATURE_ENTRY;
|
||||
#include "rts.h"
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
struct rts_pdu_signature
|
||||
{
|
||||
@@ -116,70 +117,75 @@ struct _RTS_PDU_SIGNATURE_ENTRY
|
||||
#define RTS_PDU_FLOW_CONTROL_ACK (RTS_PDU_OUT_OF_SEQUENCE | 0x00000005)
|
||||
#define RTS_PDU_FLOW_CONTROL_ACK_WITH_DESTINATION (RTS_PDU_OUT_OF_SEQUENCE | 0x00000006)
|
||||
|
||||
extern RtsPduSignature RTS_PDU_CONN_A1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_CONN_A2_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_CONN_A3_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_CONN_A1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_CONN_A2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_CONN_A3_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_CONN_B1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_CONN_B2_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_CONN_B3_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_CONN_B1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_CONN_B2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_CONN_B3_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_CONN_C1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_CONN_C2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_CONN_C1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_CONN_C2_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_IN_R1_A1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R1_A2_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R1_A3_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R1_A4_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R1_A5_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R1_A6_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R1_A1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R1_A2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R1_A3_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R1_A4_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R1_A5_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R1_A6_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_IN_R1_B1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R1_B2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R1_B1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R1_B2_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_IN_R2_A1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R2_A2_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R2_A3_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R2_A4_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_IN_R2_A5_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R2_A1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R2_A2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R2_A3_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R2_A4_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_IN_R2_A5_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A2_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A3_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A4_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A5_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A6_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A7_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A8_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A9_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A10_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R1_A11_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A3_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A4_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A5_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A6_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A7_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A8_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A9_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A10_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R1_A11_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_A1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_A2_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_A3_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_A4_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_A5_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_A6_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_A7_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_A8_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_A1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_A2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_A3_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_A4_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_A5_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_A6_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_A7_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_A8_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_B1_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_B2_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_B3_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_B1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_B2_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_B3_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_OUT_R2_C1_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_OUT_R2_C1_SIGNATURE;
|
||||
|
||||
extern RtsPduSignature RTS_PDU_KEEP_ALIVE_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_PING_TRAFFIC_SENT_NOTIFY_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_ECHO_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_PING_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_FLOW_CONTROL_ACK_SIGNATURE;
|
||||
extern RtsPduSignature RTS_PDU_FLOW_CONTROL_ACK_WITH_DESTINATION_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_KEEP_ALIVE_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_PING_TRAFFIC_SENT_NOTIFY_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_ECHO_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_PING_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature RTS_PDU_FLOW_CONTROL_ACK_SIGNATURE;
|
||||
FREERDP_LOCAL extern RtsPduSignature
|
||||
RTS_PDU_FLOW_CONTROL_ACK_WITH_DESTINATION_SIGNATURE;
|
||||
|
||||
BOOL rts_match_pdu_signature(rdpRpc* rpc, RtsPduSignature* signature, rpcconn_rts_hdr_t* rts);
|
||||
int rts_extract_pdu_signature(rdpRpc* rpc, RtsPduSignature* signature, rpcconn_rts_hdr_t* rts);
|
||||
UINT32 rts_identify_pdu_signature(rdpRpc* rpc, RtsPduSignature* signature, RTS_PDU_SIGNATURE_ENTRY** entry);
|
||||
int rts_print_pdu_signature(rdpRpc* rpc, RtsPduSignature* signature);
|
||||
FREERDP_LOCAL BOOL rts_match_pdu_signature(rdpRpc* rpc,
|
||||
RtsPduSignature* signature, rpcconn_rts_hdr_t* rts);
|
||||
FREERDP_LOCAL int rts_extract_pdu_signature(rdpRpc* rpc,
|
||||
RtsPduSignature* signature, rpcconn_rts_hdr_t* rts);
|
||||
FREERDP_LOCAL UINT32 rts_identify_pdu_signature(rdpRpc* rpc,
|
||||
RtsPduSignature* signature, RTS_PDU_SIGNATURE_ENTRY** entry);
|
||||
FREERDP_LOCAL int rts_print_pdu_signature(rdpRpc* rpc,
|
||||
RtsPduSignature* signature);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,7 @@ typedef struct rdp_tsg rdpTsg;
|
||||
#include <time.h>
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <freerdp/log.h>
|
||||
|
||||
@@ -308,27 +309,30 @@ struct rdp_tsg
|
||||
TSG_PACKET_VERSIONCAPS packetVersionCaps;
|
||||
};
|
||||
|
||||
int tsg_proxy_begin(rdpTsg* tsg);
|
||||
int tsg_proxy_reauth(rdpTsg* tsg);
|
||||
FREERDP_LOCAL int tsg_proxy_begin(rdpTsg* tsg);
|
||||
FREERDP_LOCAL int tsg_proxy_reauth(rdpTsg* tsg);
|
||||
|
||||
DWORD TsProxySendToServer(handle_t IDL_handle, BYTE pRpcMessage[], UINT32 count, UINT32* lengths);
|
||||
FREERDP_LOCAL DWORD TsProxySendToServer(handle_t IDL_handle, BYTE pRpcMessage[],
|
||||
UINT32 count, UINT32* lengths);
|
||||
|
||||
int tsg_transition_to_state(rdpTsg* tsg, TSG_STATE state);
|
||||
FREERDP_LOCAL int tsg_transition_to_state(rdpTsg* tsg, TSG_STATE state);
|
||||
|
||||
BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port, int timeout);
|
||||
BOOL tsg_disconnect(rdpTsg* tsg);
|
||||
FREERDP_LOCAL BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port,
|
||||
int timeout);
|
||||
FREERDP_LOCAL BOOL tsg_disconnect(rdpTsg* tsg);
|
||||
|
||||
int tsg_write(rdpTsg* tsg, BYTE* data, UINT32 length);
|
||||
int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length);
|
||||
FREERDP_LOCAL int tsg_write(rdpTsg* tsg, BYTE* data, UINT32 length);
|
||||
FREERDP_LOCAL int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length);
|
||||
|
||||
int tsg_recv_pdu(rdpTsg* tsg, RPC_PDU* pdu);
|
||||
FREERDP_LOCAL int tsg_recv_pdu(rdpTsg* tsg, RPC_PDU* pdu);
|
||||
|
||||
int tsg_check_event_handles(rdpTsg* tsg);
|
||||
DWORD tsg_get_event_handles(rdpTsg* tsg, HANDLE* events, DWORD count);
|
||||
FREERDP_LOCAL int tsg_check_event_handles(rdpTsg* tsg);
|
||||
FREERDP_LOCAL DWORD tsg_get_event_handles(rdpTsg* tsg, HANDLE* events,
|
||||
DWORD count);
|
||||
|
||||
rdpTsg* tsg_new(rdpTransport* transport);
|
||||
void tsg_free(rdpTsg* tsg);
|
||||
FREERDP_LOCAL rdpTsg* tsg_new(rdpTransport* transport);
|
||||
FREERDP_LOCAL void tsg_free(rdpTsg* tsg);
|
||||
|
||||
BIO_METHOD* BIO_s_tsg(void);
|
||||
FREERDP_LOCAL BIO_METHOD* BIO_s_tsg(void);
|
||||
|
||||
#endif /* FREERDP_CORE_TSG_H */
|
||||
|
||||
@@ -26,44 +26,66 @@
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
BOOL gcc_read_conference_create_request(wStream* s, rdpMcs* mcs);
|
||||
void gcc_write_conference_create_request(wStream* s, wStream* userData);
|
||||
BOOL gcc_read_conference_create_response(wStream* s, rdpMcs* mcs);
|
||||
void gcc_write_conference_create_response(wStream* s, wStream* userData);
|
||||
BOOL gcc_read_client_data_blocks(wStream* s, rdpMcs* mcs, int length);
|
||||
void gcc_write_client_data_blocks(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_server_data_blocks(wStream* s, rdpMcs* mcs, int length);
|
||||
BOOL gcc_write_server_data_blocks(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_user_data_header(wStream* s, UINT16* type, UINT16* length);
|
||||
void gcc_write_user_data_header(wStream* s, UINT16 type, UINT16 length);
|
||||
BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
void gcc_write_client_core_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_server_core_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_write_server_core_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_client_security_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
void gcc_write_client_security_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_server_security_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_client_network_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
void gcc_write_client_network_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_server_network_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_write_server_network_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_client_cluster_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
void gcc_write_client_cluster_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
void gcc_write_client_monitor_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_client_monitor_extended_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
void gcc_write_client_monitor_extended_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_client_message_channel_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
void gcc_write_client_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_server_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_write_server_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_client_multitransport_channel_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
void gcc_write_client_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
BOOL gcc_read_server_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
void gcc_write_server_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_conference_create_request(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL void gcc_write_conference_create_request(wStream* s,
|
||||
wStream* userData);
|
||||
FREERDP_LOCAL BOOL gcc_read_conference_create_response(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL void gcc_write_conference_create_response(wStream* s,
|
||||
wStream* userData);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_data_blocks(wStream* s, rdpMcs* mcs,
|
||||
int length);
|
||||
FREERDP_LOCAL void gcc_write_client_data_blocks(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_data_blocks(wStream* s, rdpMcs* mcs,
|
||||
int length);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_data_blocks(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_user_data_header(wStream* s, UINT16* type,
|
||||
UINT16* length);
|
||||
FREERDP_LOCAL void gcc_write_user_data_header(wStream* s, UINT16 type,
|
||||
UINT16 length);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_core_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_core_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_core_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_security_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_security_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_security_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_network_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_network_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_network_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_network_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_cluster_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_cluster_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_monitor_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_monitor_extended_data(wStream* s,
|
||||
rdpMcs* mcs, UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_monitor_extended_data(wStream* s,
|
||||
rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_message_channel_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_message_channel_data(wStream* s,
|
||||
rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_message_channel_data(wStream* s,
|
||||
rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_message_channel_data(wStream* s,
|
||||
rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_multitransport_channel_data(wStream* s,
|
||||
rdpMcs* mcs, UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_multitransport_channel_data(wStream* s,
|
||||
rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_multitransport_channel_data(wStream* s,
|
||||
rdpMcs* mcs);
|
||||
FREERDP_LOCAL void gcc_write_server_multitransport_channel_data(wStream* s,
|
||||
rdpMcs* mcs);
|
||||
|
||||
#endif /* FREERDP_CORE_GCC_H */
|
||||
|
||||
@@ -26,6 +26,7 @@ typedef struct rdp_heartbeat rdpHeartbeat;
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -36,8 +37,8 @@ struct rdp_heartbeat
|
||||
|
||||
int rdp_recv_heartbeat_packet(rdpRdp* rdp, wStream* s);
|
||||
|
||||
rdpHeartbeat* heartbeat_new(void);
|
||||
void heartbeat_free(rdpHeartbeat* heartbeat);
|
||||
FREERDP_LOCAL rdpHeartbeat* heartbeat_new(void);
|
||||
FREERDP_LOCAL void heartbeat_free(rdpHeartbeat* heartbeat);
|
||||
|
||||
#define HEARTBEAT_TAG FREERDP_TAG("core.heartbeat")
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "rdp.h"
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -58,16 +59,19 @@
|
||||
#define SAVE_SESSION_PDU_VERSION_ONE 0x0001
|
||||
|
||||
|
||||
BOOL rdp_read_client_auto_reconnect_cookie(rdpRdp* rdp, wStream* s);
|
||||
void rdp_write_client_auto_reconnect_cookie(rdpRdp* rdp, wStream* s);
|
||||
void rdp_write_auto_reconnect_cookie(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_read_extended_info_packet(rdpRdp* rdp, wStream* s);
|
||||
void rdp_write_extended_info_packet(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_read_info_packet(rdpRdp* rdp, wStream* s);
|
||||
void rdp_write_info_packet(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_recv_client_info(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_client_info(rdpRdp* rdp);
|
||||
BOOL rdp_recv_save_session_info(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_save_session_info(rdpContext *context, UINT32 type, void *data);
|
||||
FREERDP_LOCAL BOOL rdp_read_client_auto_reconnect_cookie(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL void rdp_write_client_auto_reconnect_cookie(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL void rdp_write_auto_reconnect_cookie(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_read_extended_info_packet(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL void rdp_write_extended_info_packet(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_read_info_packet(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL void rdp_write_info_packet(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_recv_client_info(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_info(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_save_session_info(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_save_session_info(rdpContext* context, UINT32 type,
|
||||
void* data);
|
||||
|
||||
#endif /* __INFO_H */
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <freerdp/input.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -38,24 +39,33 @@
|
||||
|
||||
#define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4
|
||||
|
||||
BOOL input_send_synchronize_event(rdpInput* input, UINT32 flags);
|
||||
BOOL input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
|
||||
BOOL input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
|
||||
BOOL input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
|
||||
BOOL input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
|
||||
FREERDP_LOCAL BOOL input_send_synchronize_event(rdpInput* input, UINT32 flags);
|
||||
FREERDP_LOCAL BOOL input_send_keyboard_event(rdpInput* input, UINT16 flags,
|
||||
UINT16 code);
|
||||
FREERDP_LOCAL BOOL input_send_unicode_keyboard_event(rdpInput* input,
|
||||
UINT16 flags, UINT16 code);
|
||||
FREERDP_LOCAL BOOL input_send_mouse_event(rdpInput* input, UINT16 flags,
|
||||
UINT16 x, UINT16 y);
|
||||
FREERDP_LOCAL BOOL input_send_extended_mouse_event(rdpInput* input,
|
||||
UINT16 flags, UINT16 x, UINT16 y);
|
||||
|
||||
BOOL input_send_fastpath_synchronize_event(rdpInput* input, UINT32 flags);
|
||||
BOOL input_send_fastpath_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
|
||||
BOOL input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
|
||||
BOOL input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
|
||||
BOOL input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
|
||||
FREERDP_LOCAL BOOL input_send_fastpath_synchronize_event(rdpInput* input,
|
||||
UINT32 flags);
|
||||
FREERDP_LOCAL BOOL input_send_fastpath_keyboard_event(rdpInput* input,
|
||||
UINT16 flags, UINT16 code);
|
||||
FREERDP_LOCAL BOOL input_send_fastpath_unicode_keyboard_event(rdpInput* input,
|
||||
UINT16 flags, UINT16 code);
|
||||
FREERDP_LOCAL BOOL input_send_fastpath_mouse_event(rdpInput* input,
|
||||
UINT16 flags, UINT16 x, UINT16 y);
|
||||
FREERDP_LOCAL BOOL input_send_fastpath_extended_mouse_event(rdpInput* input,
|
||||
UINT16 flags, UINT16 x, UINT16 y);
|
||||
|
||||
BOOL input_recv(rdpInput* input, wStream* s);
|
||||
FREERDP_LOCAL BOOL input_recv(rdpInput* input, wStream* s);
|
||||
|
||||
int input_process_events(rdpInput* input);
|
||||
BOOL input_register_client_callbacks(rdpInput* input);
|
||||
FREERDP_LOCAL int input_process_events(rdpInput* input);
|
||||
FREERDP_LOCAL BOOL input_register_client_callbacks(rdpInput* input);
|
||||
|
||||
rdpInput* input_new(rdpRdp* rdp);
|
||||
void input_free(rdpInput* input);
|
||||
FREERDP_LOCAL rdpInput* input_new(rdpRdp* rdp);
|
||||
FREERDP_LOCAL void input_free(rdpInput* input);
|
||||
|
||||
#endif /* __INPUT_H */
|
||||
|
||||
@@ -29,6 +29,7 @@ typedef struct rdp_license rdpLicense;
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -200,45 +201,54 @@ struct rdp_license
|
||||
UINT32 PacketHeaderLength;
|
||||
};
|
||||
|
||||
int license_recv(rdpLicense* license, wStream* s);
|
||||
BOOL license_send(rdpLicense* license, wStream* s, BYTE type);
|
||||
wStream* license_send_stream_init(rdpLicense* license);
|
||||
FREERDP_LOCAL int license_recv(rdpLicense* license, wStream* s);
|
||||
FREERDP_LOCAL BOOL license_send(rdpLicense* license, wStream* s, BYTE type);
|
||||
FREERDP_LOCAL wStream* license_send_stream_init(rdpLicense* license);
|
||||
|
||||
void license_generate_randoms(rdpLicense* license);
|
||||
BOOL license_generate_keys(rdpLicense* license);
|
||||
BOOL license_generate_hwid(rdpLicense* license);
|
||||
BOOL license_encrypt_premaster_secret(rdpLicense* license);
|
||||
BOOL license_decrypt_platform_challenge(rdpLicense* license);
|
||||
FREERDP_LOCAL void license_generate_randoms(rdpLicense* license);
|
||||
FREERDP_LOCAL BOOL license_generate_keys(rdpLicense* license);
|
||||
FREERDP_LOCAL BOOL license_generate_hwid(rdpLicense* license);
|
||||
FREERDP_LOCAL BOOL license_encrypt_premaster_secret(rdpLicense* license);
|
||||
FREERDP_LOCAL BOOL license_decrypt_platform_challenge(rdpLicense* license);
|
||||
|
||||
LICENSE_PRODUCT_INFO* license_new_product_info(void);
|
||||
void license_free_product_info(LICENSE_PRODUCT_INFO* productInfo);
|
||||
BOOL license_read_product_info(wStream* s, LICENSE_PRODUCT_INFO* productInfo);
|
||||
FREERDP_LOCAL LICENSE_PRODUCT_INFO* license_new_product_info(void);
|
||||
FREERDP_LOCAL void license_free_product_info(LICENSE_PRODUCT_INFO* productInfo);
|
||||
FREERDP_LOCAL BOOL license_read_product_info(wStream* s,
|
||||
LICENSE_PRODUCT_INFO* productInfo);
|
||||
|
||||
LICENSE_BLOB* license_new_binary_blob(UINT16 type);
|
||||
void license_free_binary_blob(LICENSE_BLOB* blob);
|
||||
BOOL license_read_binary_blob(wStream* s, LICENSE_BLOB* blob);
|
||||
BOOL license_write_binary_blob(wStream* s, LICENSE_BLOB* blob);
|
||||
FREERDP_LOCAL LICENSE_BLOB* license_new_binary_blob(UINT16 type);
|
||||
FREERDP_LOCAL void license_free_binary_blob(LICENSE_BLOB* blob);
|
||||
FREERDP_LOCAL BOOL license_read_binary_blob(wStream* s, LICENSE_BLOB* blob);
|
||||
FREERDP_LOCAL BOOL license_write_binary_blob(wStream* s, LICENSE_BLOB* blob);
|
||||
|
||||
SCOPE_LIST* license_new_scope_list(void);
|
||||
void license_free_scope_list(SCOPE_LIST* scopeList);
|
||||
BOOL license_read_scope_list(wStream* s, SCOPE_LIST* scopeList);
|
||||
FREERDP_LOCAL SCOPE_LIST* license_new_scope_list(void);
|
||||
FREERDP_LOCAL void license_free_scope_list(SCOPE_LIST* scopeList);
|
||||
FREERDP_LOCAL BOOL license_read_scope_list(wStream* s, SCOPE_LIST* scopeList);
|
||||
|
||||
BOOL license_read_license_request_packet(rdpLicense* license, wStream* s);
|
||||
BOOL license_read_platform_challenge_packet(rdpLicense* license, wStream* s);
|
||||
void license_read_new_license_packet(rdpLicense* license, wStream* s);
|
||||
void license_read_upgrade_license_packet(rdpLicense* license, wStream* s);
|
||||
BOOL license_read_error_alert_packet(rdpLicense* license, wStream* s);
|
||||
FREERDP_LOCAL BOOL license_read_license_request_packet(rdpLicense* license,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL license_read_platform_challenge_packet(rdpLicense* license,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL void license_read_new_license_packet(rdpLicense* license,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL void license_read_upgrade_license_packet(rdpLicense* license,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL license_read_error_alert_packet(rdpLicense* license,
|
||||
wStream* s);
|
||||
|
||||
BOOL license_write_new_license_request_packet(rdpLicense* license, wStream* s);
|
||||
BOOL license_send_new_license_request_packet(rdpLicense* license);
|
||||
FREERDP_LOCAL BOOL license_write_new_license_request_packet(rdpLicense* license,
|
||||
wStream* s);
|
||||
FREERDP_LOCAL BOOL license_send_new_license_request_packet(rdpLicense* license);
|
||||
|
||||
BOOL license_write_platform_challenge_response_packet(rdpLicense* license, wStream* s, BYTE* mac_data);
|
||||
BOOL license_send_platform_challenge_response_packet(rdpLicense* license);
|
||||
FREERDP_LOCAL BOOL license_write_platform_challenge_response_packet(
|
||||
rdpLicense* license, wStream* s, BYTE* mac_data);
|
||||
FREERDP_LOCAL BOOL license_send_platform_challenge_response_packet(
|
||||
rdpLicense* license);
|
||||
|
||||
BOOL license_send_valid_client_error_packet(rdpLicense* license);
|
||||
FREERDP_LOCAL BOOL license_send_valid_client_error_packet(rdpLicense* license);
|
||||
|
||||
rdpLicense* license_new(rdpRdp* rdp);
|
||||
void license_free(rdpLicense* license);
|
||||
FREERDP_LOCAL rdpLicense* license_new(rdpRdp* rdp);
|
||||
FREERDP_LOCAL void license_free(rdpLicense* license);
|
||||
|
||||
#define LICENSE_TAG FREERDP_TAG("core.license")
|
||||
#ifdef WITH_DEBUG_LICENSE
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct rdp_mcs rdpMcs;
|
||||
#include "transport.h"
|
||||
|
||||
#include <freerdp/crypto/ber.h>
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
@@ -163,34 +163,42 @@ struct rdp_mcs
|
||||
#define MCS_TYPE_CONNECT_INITIAL 0x65
|
||||
#define MCS_TYPE_CONNECT_RESPONSE 0x66
|
||||
|
||||
BOOL mcs_merge_domain_parameters(DomainParameters* targetParameters, DomainParameters* minimumParameters,
|
||||
DomainParameters* maximumParameters, DomainParameters* pOutParameters);
|
||||
FREERDP_LOCAL BOOL mcs_merge_domain_parameters(DomainParameters*
|
||||
targetParameters, DomainParameters* minimumParameters,
|
||||
DomainParameters* maximumParameters, DomainParameters* pOutParameters);
|
||||
|
||||
BOOL mcs_write_connect_initial(wStream* s, rdpMcs* mcs, wStream* userData);
|
||||
BOOL mcs_write_connect_response(wStream* s, rdpMcs* mcs, wStream* userData);
|
||||
FREERDP_LOCAL BOOL mcs_write_connect_initial(wStream* s, rdpMcs* mcs,
|
||||
wStream* userData);
|
||||
FREERDP_LOCAL BOOL mcs_write_connect_response(wStream* s, rdpMcs* mcs,
|
||||
wStream* userData);
|
||||
|
||||
BOOL mcs_recv_connect_initial(rdpMcs* mcs, wStream* s);
|
||||
BOOL mcs_send_connect_initial(rdpMcs* mcs);
|
||||
BOOL mcs_recv_connect_response(rdpMcs* mcs, wStream* s);
|
||||
BOOL mcs_send_connect_response(rdpMcs* mcs);
|
||||
BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, wStream* s);
|
||||
BOOL mcs_send_erect_domain_request(rdpMcs* mcs);
|
||||
BOOL mcs_recv_attach_user_request(rdpMcs* mcs, wStream* s);
|
||||
BOOL mcs_send_attach_user_request(rdpMcs* mcs);
|
||||
BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, wStream* s);
|
||||
BOOL mcs_send_attach_user_confirm(rdpMcs* mcs);
|
||||
BOOL mcs_recv_channel_join_request(rdpMcs* mcs, wStream* s, UINT16* channelId);
|
||||
BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channelId);
|
||||
BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, wStream* s, UINT16* channelId);
|
||||
BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channelId);
|
||||
BOOL mcs_recv_disconnect_provider_ultimatum(rdpMcs* mcs, wStream* s, int* reason);
|
||||
BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs);
|
||||
BOOL mcs_read_domain_mcspdu_header(wStream* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length);
|
||||
void mcs_write_domain_mcspdu_header(wStream* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options);
|
||||
FREERDP_LOCAL BOOL mcs_recv_connect_initial(rdpMcs* mcs, wStream* s);
|
||||
FREERDP_LOCAL BOOL mcs_send_connect_initial(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_recv_connect_response(rdpMcs* mcs, wStream* s);
|
||||
FREERDP_LOCAL BOOL mcs_send_connect_response(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, wStream* s);
|
||||
FREERDP_LOCAL BOOL mcs_send_erect_domain_request(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_recv_attach_user_request(rdpMcs* mcs, wStream* s);
|
||||
FREERDP_LOCAL BOOL mcs_send_attach_user_request(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, wStream* s);
|
||||
FREERDP_LOCAL BOOL mcs_send_attach_user_confirm(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_recv_channel_join_request(rdpMcs* mcs, wStream* s,
|
||||
UINT16* channelId);
|
||||
FREERDP_LOCAL BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channelId);
|
||||
FREERDP_LOCAL BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, wStream* s,
|
||||
UINT16* channelId);
|
||||
FREERDP_LOCAL BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channelId);
|
||||
FREERDP_LOCAL BOOL mcs_recv_disconnect_provider_ultimatum(rdpMcs* mcs,
|
||||
wStream* s, int* reason);
|
||||
FREERDP_LOCAL BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_read_domain_mcspdu_header(wStream* s,
|
||||
enum DomainMCSPDU* domainMCSPDU, UINT16* length);
|
||||
FREERDP_LOCAL void mcs_write_domain_mcspdu_header(wStream* s,
|
||||
enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options);
|
||||
|
||||
BOOL mcs_client_begin(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_client_begin(rdpMcs* mcs);
|
||||
|
||||
rdpMcs* mcs_new(rdpTransport* transport);
|
||||
void mcs_free(rdpMcs* mcs);
|
||||
FREERDP_LOCAL rdpMcs* mcs_new(rdpTransport* transport);
|
||||
FREERDP_LOCAL void mcs_free(rdpMcs* mcs);
|
||||
|
||||
#endif /* __MCS_H */
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/message.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
/**
|
||||
* Update Message Queue
|
||||
@@ -125,13 +126,15 @@ struct rdp_update_proxy
|
||||
HANDLE thread;
|
||||
};
|
||||
|
||||
int update_message_queue_process_message(rdpUpdate* update, wMessage* message);
|
||||
int update_message_queue_free_message(wMessage* message);
|
||||
FREERDP_LOCAL int update_message_queue_process_message(rdpUpdate* update,
|
||||
wMessage* message);
|
||||
FREERDP_LOCAL int update_message_queue_free_message(wMessage* message);
|
||||
|
||||
int update_message_queue_process_pending_messages(rdpUpdate* update);
|
||||
FREERDP_LOCAL int update_message_queue_process_pending_messages(
|
||||
rdpUpdate* update);
|
||||
|
||||
rdpUpdateProxy* update_message_proxy_new(rdpUpdate* update);
|
||||
void update_message_proxy_free(rdpUpdateProxy* message);
|
||||
FREERDP_LOCAL rdpUpdateProxy* update_message_proxy_new(rdpUpdate* update);
|
||||
FREERDP_LOCAL void update_message_proxy_free(rdpUpdateProxy* message);
|
||||
|
||||
/**
|
||||
* Input Message Queue
|
||||
@@ -154,11 +157,12 @@ struct rdp_input_proxy
|
||||
pKeyboardPauseEvent KeyboardPauseEvent;
|
||||
};
|
||||
|
||||
int input_message_queue_process_message(rdpInput* input, wMessage* message);
|
||||
int input_message_queue_free_message(wMessage* message);
|
||||
int input_message_queue_process_pending_messages(rdpInput* input);
|
||||
FREERDP_LOCAL int input_message_queue_process_message(rdpInput* input,
|
||||
wMessage* message);
|
||||
FREERDP_LOCAL int input_message_queue_free_message(wMessage* message);
|
||||
FREERDP_LOCAL int input_message_queue_process_pending_messages(rdpInput* input);
|
||||
|
||||
rdpInputProxy* input_message_proxy_new(rdpInput* input);
|
||||
void input_message_proxy_free(rdpInputProxy* proxy);
|
||||
FREERDP_LOCAL rdpInputProxy* input_message_proxy_new(rdpInput* input);
|
||||
FREERDP_LOCAL void input_message_proxy_free(rdpInputProxy* proxy);
|
||||
|
||||
#endif /* FREERDP_CORE_MESSAGE_PRIVATE_H */
|
||||
|
||||
@@ -25,6 +25,7 @@ typedef struct rdp_multitransport rdpMultitransport;
|
||||
#include "rdp.h"
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -33,9 +34,9 @@ struct rdp_multitransport
|
||||
UINT32 placeholder;
|
||||
};
|
||||
|
||||
int rdp_recv_multitransport_packet(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL int rdp_recv_multitransport_packet(rdpRdp* rdp, wStream* s);
|
||||
|
||||
rdpMultitransport* multitransport_new(void);
|
||||
void multitransport_free(rdpMultitransport* multitransport);
|
||||
FREERDP_LOCAL rdpMultitransport* multitransport_new(void);
|
||||
FREERDP_LOCAL void multitransport_free(rdpMultitransport* multitransport);
|
||||
|
||||
#endif /* __MULTITRANSPORT_H */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -119,45 +120,53 @@ struct rdp_nego
|
||||
};
|
||||
typedef struct rdp_nego rdpNego;
|
||||
|
||||
BOOL nego_connect(rdpNego* nego);
|
||||
BOOL nego_disconnect(rdpNego* nego);
|
||||
FREERDP_LOCAL BOOL nego_connect(rdpNego* nego);
|
||||
FREERDP_LOCAL BOOL nego_disconnect(rdpNego* nego);
|
||||
|
||||
BOOL nego_send_preconnection_pdu(rdpNego* nego);
|
||||
FREERDP_LOCAL BOOL nego_send_preconnection_pdu(rdpNego* nego);
|
||||
|
||||
void nego_attempt_ext(rdpNego* nego);
|
||||
void nego_attempt_nla(rdpNego* nego);
|
||||
void nego_attempt_tls(rdpNego* nego);
|
||||
void nego_attempt_rdp(rdpNego* nego);
|
||||
FREERDP_LOCAL void nego_attempt_ext(rdpNego* nego);
|
||||
FREERDP_LOCAL void nego_attempt_nla(rdpNego* nego);
|
||||
FREERDP_LOCAL void nego_attempt_tls(rdpNego* nego);
|
||||
FREERDP_LOCAL void nego_attempt_rdp(rdpNego* nego);
|
||||
|
||||
void nego_send(rdpNego* nego);
|
||||
int nego_recv(rdpTransport* transport, wStream* s, void* extra);
|
||||
BOOL nego_recv_response(rdpNego* nego);
|
||||
BOOL nego_read_request(rdpNego* nego, wStream* s);
|
||||
FREERDP_LOCAL void nego_send(rdpNego* nego);
|
||||
FREERDP_LOCAL int nego_recv(rdpTransport* transport, wStream* s, void* extra);
|
||||
FREERDP_LOCAL BOOL nego_recv_response(rdpNego* nego);
|
||||
FREERDP_LOCAL BOOL nego_read_request(rdpNego* nego, wStream* s);
|
||||
|
||||
BOOL nego_send_negotiation_request(rdpNego* nego);
|
||||
void nego_process_negotiation_request(rdpNego* nego, wStream* s);
|
||||
void nego_process_negotiation_response(rdpNego* nego, wStream* s);
|
||||
void nego_process_negotiation_failure(rdpNego* nego, wStream* s);
|
||||
BOOL nego_send_negotiation_response(rdpNego* nego);
|
||||
FREERDP_LOCAL BOOL nego_send_negotiation_request(rdpNego* nego);
|
||||
FREERDP_LOCAL void nego_process_negotiation_request(rdpNego* nego, wStream* s);
|
||||
FREERDP_LOCAL void nego_process_negotiation_response(rdpNego* nego, wStream* s);
|
||||
FREERDP_LOCAL void nego_process_negotiation_failure(rdpNego* nego, wStream* s);
|
||||
FREERDP_LOCAL BOOL nego_send_negotiation_response(rdpNego* nego);
|
||||
|
||||
rdpNego* nego_new(rdpTransport* transport);
|
||||
void nego_free(rdpNego* nego);
|
||||
FREERDP_LOCAL rdpNego* nego_new(rdpTransport* transport);
|
||||
FREERDP_LOCAL void nego_free(rdpNego* nego);
|
||||
|
||||
void nego_init(rdpNego* nego);
|
||||
void nego_set_target(rdpNego* nego, char* hostname, int port);
|
||||
void nego_set_negotiation_enabled(rdpNego* nego, BOOL NegotiateSecurityLayer);
|
||||
void nego_set_restricted_admin_mode_required(rdpNego* nego, BOOL RestrictedAdminModeRequired);
|
||||
void nego_set_gateway_enabled(rdpNego* nego, BOOL GatewayEnabled);
|
||||
void nego_set_gateway_bypass_local(rdpNego* nego, BOOL GatewayBypassLocal);
|
||||
void nego_enable_rdp(rdpNego* nego, BOOL enable_rdp);
|
||||
void nego_enable_tls(rdpNego* nego, BOOL enable_tls);
|
||||
void nego_enable_nla(rdpNego* nego, BOOL enable_nla);
|
||||
void nego_enable_ext(rdpNego* nego, BOOL enable_ext);
|
||||
BOOL nego_set_routing_token(rdpNego* nego, BYTE* RoutingToken, DWORD RoutingTokenLength);
|
||||
BOOL nego_set_cookie(rdpNego* nego, char* cookie);
|
||||
void nego_set_cookie_max_length(rdpNego* nego, UINT32 CookieMaxLength);
|
||||
void nego_set_send_preconnection_pdu(rdpNego* nego, BOOL SendPreconnectionPdu);
|
||||
void nego_set_preconnection_id(rdpNego* nego, UINT32 PreconnectionId);
|
||||
void nego_set_preconnection_blob(rdpNego* nego, char* PreconnectionBlob);
|
||||
FREERDP_LOCAL void nego_init(rdpNego* nego);
|
||||
FREERDP_LOCAL void nego_set_target(rdpNego* nego, char* hostname, int port);
|
||||
FREERDP_LOCAL void nego_set_negotiation_enabled(rdpNego* nego,
|
||||
BOOL NegotiateSecurityLayer);
|
||||
FREERDP_LOCAL void nego_set_restricted_admin_mode_required(rdpNego* nego,
|
||||
BOOL RestrictedAdminModeRequired);
|
||||
FREERDP_LOCAL void nego_set_gateway_enabled(rdpNego* nego, BOOL GatewayEnabled);
|
||||
FREERDP_LOCAL void nego_set_gateway_bypass_local(rdpNego* nego,
|
||||
BOOL GatewayBypassLocal);
|
||||
FREERDP_LOCAL void nego_enable_rdp(rdpNego* nego, BOOL enable_rdp);
|
||||
FREERDP_LOCAL void nego_enable_tls(rdpNego* nego, BOOL enable_tls);
|
||||
FREERDP_LOCAL void nego_enable_nla(rdpNego* nego, BOOL enable_nla);
|
||||
FREERDP_LOCAL void nego_enable_ext(rdpNego* nego, BOOL enable_ext);
|
||||
FREERDP_LOCAL BOOL nego_set_routing_token(rdpNego* nego, BYTE* RoutingToken,
|
||||
DWORD RoutingTokenLength);
|
||||
FREERDP_LOCAL BOOL nego_set_cookie(rdpNego* nego, char* cookie);
|
||||
FREERDP_LOCAL void nego_set_cookie_max_length(rdpNego* nego,
|
||||
UINT32 CookieMaxLength);
|
||||
FREERDP_LOCAL void nego_set_send_preconnection_pdu(rdpNego* nego,
|
||||
BOOL SendPreconnectionPdu);
|
||||
FREERDP_LOCAL void nego_set_preconnection_id(rdpNego* nego,
|
||||
UINT32 PreconnectionId);
|
||||
FREERDP_LOCAL void nego_set_preconnection_blob(rdpNego* nego,
|
||||
char* PreconnectionBlob);
|
||||
|
||||
#endif /* __NEGO_H */
|
||||
|
||||
@@ -87,13 +87,15 @@ struct rdp_nla
|
||||
SecPkgContext_Sizes ContextSizes;
|
||||
};
|
||||
|
||||
int nla_authenticate(rdpNla* nla);
|
||||
LPTSTR nla_make_spn(const char* ServiceClass, const char* hostname);
|
||||
FREERDP_LOCAL int nla_authenticate(rdpNla* nla);
|
||||
FREERDP_LOCAL LPTSTR nla_make_spn(const char* ServiceClass,
|
||||
const char* hostname);
|
||||
|
||||
int nla_client_begin(rdpNla* nla);
|
||||
int nla_recv_pdu(rdpNla* nla, wStream* s);
|
||||
FREERDP_LOCAL int nla_client_begin(rdpNla* nla);
|
||||
FREERDP_LOCAL int nla_recv_pdu(rdpNla* nla, wStream* s);
|
||||
|
||||
rdpNla* nla_new(freerdp* instance, rdpTransport* transport, rdpSettings* settings);
|
||||
void nla_free(rdpNla* nla);
|
||||
FREERDP_LOCAL rdpNla* nla_new(freerdp* instance, rdpTransport* transport,
|
||||
rdpSettings* settings);
|
||||
FREERDP_LOCAL void nla_free(rdpNla* nla);
|
||||
|
||||
#endif /* FREERDP_CORE_NLA_H */
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/update.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -188,104 +189,114 @@
|
||||
|
||||
#define CG_GLYPH_UNICODE_PRESENT 0x0010
|
||||
|
||||
extern const BYTE PRIMARY_DRAWING_ORDER_FIELD_BYTES[];
|
||||
FREERDP_LOCAL extern const BYTE PRIMARY_DRAWING_ORDER_FIELD_BYTES[];
|
||||
|
||||
BOOL update_recv_order(rdpUpdate* update, wStream* s);
|
||||
FREERDP_LOCAL BOOL update_recv_order(rdpUpdate* update, wStream* s);
|
||||
|
||||
BOOL update_write_field_flags(wStream* s, UINT32 fieldFlags, BYTE flags,
|
||||
BYTE fieldBytes);
|
||||
FREERDP_LOCAL BOOL update_write_field_flags(wStream* s, UINT32 fieldFlags,
|
||||
BYTE flags,
|
||||
BYTE fieldBytes);
|
||||
|
||||
BOOL update_write_bounds(wStream* s, ORDER_INFO* orderInfo);
|
||||
FREERDP_LOCAL BOOL update_write_bounds(wStream* s, ORDER_INFO* orderInfo);
|
||||
|
||||
int update_approximate_dstblt_order(ORDER_INFO* orderInfo,
|
||||
const DSTBLT_ORDER* dstblt);
|
||||
BOOL update_write_dstblt_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const DSTBLT_ORDER* dstblt);
|
||||
FREERDP_LOCAL int update_approximate_dstblt_order(ORDER_INFO* orderInfo,
|
||||
const DSTBLT_ORDER* dstblt);
|
||||
FREERDP_LOCAL BOOL update_write_dstblt_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const DSTBLT_ORDER* dstblt);
|
||||
|
||||
int update_approximate_patblt_order(ORDER_INFO* orderInfo,
|
||||
PATBLT_ORDER* patblt);
|
||||
BOOL update_write_patblt_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
PATBLT_ORDER* patblt);
|
||||
FREERDP_LOCAL int update_approximate_patblt_order(ORDER_INFO* orderInfo,
|
||||
PATBLT_ORDER* patblt);
|
||||
FREERDP_LOCAL BOOL update_write_patblt_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
PATBLT_ORDER* patblt);
|
||||
|
||||
int update_approximate_scrblt_order(ORDER_INFO* orderInfo,
|
||||
const SCRBLT_ORDER* scrblt);
|
||||
BOOL update_write_scrblt_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const SCRBLT_ORDER* scrblt);
|
||||
FREERDP_LOCAL int update_approximate_scrblt_order(ORDER_INFO* orderInfo,
|
||||
const SCRBLT_ORDER* scrblt);
|
||||
FREERDP_LOCAL BOOL update_write_scrblt_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const SCRBLT_ORDER* scrblt);
|
||||
|
||||
int update_approximate_opaque_rect_order(ORDER_INFO* orderInfo,
|
||||
const OPAQUE_RECT_ORDER* opaque_rect);
|
||||
BOOL update_write_opaque_rect_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const OPAQUE_RECT_ORDER* opaque_rect);
|
||||
FREERDP_LOCAL int update_approximate_opaque_rect_order(ORDER_INFO* orderInfo,
|
||||
const OPAQUE_RECT_ORDER* opaque_rect);
|
||||
FREERDP_LOCAL BOOL update_write_opaque_rect_order(wStream* s,
|
||||
ORDER_INFO* orderInfo,
|
||||
const OPAQUE_RECT_ORDER* opaque_rect);
|
||||
|
||||
int update_approximate_line_to_order(ORDER_INFO* orderInfo,
|
||||
const LINE_TO_ORDER* line_to);
|
||||
BOOL update_write_line_to_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const LINE_TO_ORDER* line_to);
|
||||
FREERDP_LOCAL int update_approximate_line_to_order(ORDER_INFO* orderInfo,
|
||||
const LINE_TO_ORDER* line_to);
|
||||
FREERDP_LOCAL BOOL update_write_line_to_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const LINE_TO_ORDER* line_to);
|
||||
|
||||
int update_approximate_memblt_order(ORDER_INFO* orderInfo,
|
||||
const MEMBLT_ORDER* memblt);
|
||||
BOOL update_write_memblt_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const MEMBLT_ORDER* memblt);
|
||||
FREERDP_LOCAL int update_approximate_memblt_order(ORDER_INFO* orderInfo,
|
||||
const MEMBLT_ORDER* memblt);
|
||||
FREERDP_LOCAL BOOL update_write_memblt_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
const MEMBLT_ORDER* memblt);
|
||||
|
||||
int update_approximate_glyph_index_order(ORDER_INFO* orderInfo,
|
||||
const GLYPH_INDEX_ORDER* glyph_index);
|
||||
BOOL update_write_glyph_index_order(wStream* s, ORDER_INFO* orderInfo,
|
||||
GLYPH_INDEX_ORDER* glyph_index);
|
||||
FREERDP_LOCAL int update_approximate_glyph_index_order(ORDER_INFO* orderInfo,
|
||||
const GLYPH_INDEX_ORDER* glyph_index);
|
||||
FREERDP_LOCAL BOOL update_write_glyph_index_order(wStream* s,
|
||||
ORDER_INFO* orderInfo,
|
||||
GLYPH_INDEX_ORDER* glyph_index);
|
||||
|
||||
int update_approximate_cache_bitmap_order(const CACHE_BITMAP_ORDER* cache_bitmap,
|
||||
BOOL compressed, UINT16* flags);
|
||||
BOOL update_write_cache_bitmap_order(wStream* s, const CACHE_BITMAP_ORDER* cache_bitmap_order,
|
||||
BOOL compressed, UINT16* flags);
|
||||
FREERDP_LOCAL int update_approximate_cache_bitmap_order(
|
||||
const CACHE_BITMAP_ORDER* cache_bitmap,
|
||||
BOOL compressed, UINT16* flags);
|
||||
FREERDP_LOCAL BOOL update_write_cache_bitmap_order(wStream* s,
|
||||
const CACHE_BITMAP_ORDER* cache_bitmap_order,
|
||||
BOOL compressed, UINT16* flags);
|
||||
|
||||
int update_approximate_cache_bitmap_v2_order(CACHE_BITMAP_V2_ORDER* cache_bitmap_v2,
|
||||
BOOL compressed, UINT16* flags);
|
||||
BOOL update_write_cache_bitmap_v2_order(wStream* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order,
|
||||
BOOL compressed, UINT16* flags);
|
||||
FREERDP_LOCAL int update_approximate_cache_bitmap_v2_order(
|
||||
CACHE_BITMAP_V2_ORDER* cache_bitmap_v2,
|
||||
BOOL compressed, UINT16* flags);
|
||||
FREERDP_LOCAL BOOL update_write_cache_bitmap_v2_order(wStream* s,
|
||||
CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order,
|
||||
BOOL compressed, UINT16* flags);
|
||||
|
||||
int update_approximate_cache_bitmap_v3_order(CACHE_BITMAP_V3_ORDER* cache_bitmap_v3,
|
||||
UINT16* flags);
|
||||
BOOL update_write_cache_bitmap_v3_order(wStream* s,
|
||||
CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL int update_approximate_cache_bitmap_v3_order(
|
||||
CACHE_BITMAP_V3_ORDER* cache_bitmap_v3,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL BOOL update_write_cache_bitmap_v3_order(wStream* s,
|
||||
CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order,
|
||||
UINT16* flags);
|
||||
|
||||
int update_approximate_cache_color_table_order(const CACHE_COLOR_TABLE_ORDER* cache_color_table,
|
||||
UINT16* flags);
|
||||
BOOL update_write_cache_color_table_order(wStream* s,
|
||||
const CACHE_COLOR_TABLE_ORDER* cache_color_table_order,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL int update_approximate_cache_color_table_order(
|
||||
const CACHE_COLOR_TABLE_ORDER* cache_color_table,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL BOOL update_write_cache_color_table_order(wStream* s,
|
||||
const CACHE_COLOR_TABLE_ORDER* cache_color_table_order,
|
||||
UINT16* flags);
|
||||
|
||||
int update_approximate_cache_glyph_order(const CACHE_GLYPH_ORDER* cache_glyph,
|
||||
UINT16* flags);
|
||||
BOOL update_write_cache_glyph_order(wStream* s,
|
||||
const CACHE_GLYPH_ORDER* cache_glyph_order,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL int update_approximate_cache_glyph_order(const CACHE_GLYPH_ORDER*
|
||||
cache_glyph,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL BOOL update_write_cache_glyph_order(wStream* s,
|
||||
const CACHE_GLYPH_ORDER* cache_glyph_order,
|
||||
UINT16* flags);
|
||||
|
||||
int update_approximate_cache_glyph_v2_order(
|
||||
const CACHE_GLYPH_V2_ORDER* cache_glyph_v2,
|
||||
UINT16* flags);
|
||||
BOOL update_write_cache_glyph_v2_order(
|
||||
wStream* s,
|
||||
const CACHE_GLYPH_V2_ORDER* cache_glyph_v2,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL int update_approximate_cache_glyph_v2_order(
|
||||
const CACHE_GLYPH_V2_ORDER* cache_glyph_v2,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL BOOL update_write_cache_glyph_v2_order(
|
||||
wStream* s,
|
||||
const CACHE_GLYPH_V2_ORDER* cache_glyph_v2,
|
||||
UINT16* flags);
|
||||
|
||||
int update_approximate_cache_brush_order(
|
||||
const CACHE_BRUSH_ORDER* cache_brush,
|
||||
UINT16* flags);
|
||||
BOOL update_write_cache_brush_order(
|
||||
wStream* s,
|
||||
const CACHE_BRUSH_ORDER* cache_brush_order,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL int update_approximate_cache_brush_order(
|
||||
const CACHE_BRUSH_ORDER* cache_brush,
|
||||
UINT16* flags);
|
||||
FREERDP_LOCAL BOOL update_write_cache_brush_order(
|
||||
wStream* s,
|
||||
const CACHE_BRUSH_ORDER* cache_brush_order,
|
||||
UINT16* flags);
|
||||
|
||||
int update_approximate_create_offscreen_bitmap_order(
|
||||
const CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
|
||||
BOOL update_write_create_offscreen_bitmap_order(
|
||||
wStream* s,
|
||||
const CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
|
||||
FREERDP_LOCAL int update_approximate_create_offscreen_bitmap_order(
|
||||
const CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
|
||||
FREERDP_LOCAL BOOL update_write_create_offscreen_bitmap_order(
|
||||
wStream* s,
|
||||
const CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
|
||||
|
||||
int update_approximate_switch_surface_order(
|
||||
const SWITCH_SURFACE_ORDER* switch_surface);
|
||||
BOOL update_write_switch_surface_order(
|
||||
wStream* s,
|
||||
const SWITCH_SURFACE_ORDER* switch_surface);
|
||||
FREERDP_LOCAL int update_approximate_switch_surface_order(
|
||||
const SWITCH_SURFACE_ORDER* switch_surface);
|
||||
FREERDP_LOCAL BOOL update_write_switch_surface_order(
|
||||
wStream* s,
|
||||
const SWITCH_SURFACE_ORDER* switch_surface);
|
||||
|
||||
#endif /* __ORDERS_H */
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <winpr/crypto.h>
|
||||
@@ -178,52 +179,65 @@ struct rdp_rdp
|
||||
rdpSettings* settingsCopy;
|
||||
};
|
||||
|
||||
BOOL rdp_read_security_header(wStream* s, UINT16* flags);
|
||||
void rdp_write_security_header(wStream* s, UINT16 flags);
|
||||
FREERDP_LOCAL BOOL rdp_read_security_header(wStream* s, UINT16* flags);
|
||||
FREERDP_LOCAL void rdp_write_security_header(wStream* s, UINT16 flags);
|
||||
|
||||
BOOL rdp_read_share_control_header(wStream* s, UINT16* length, UINT16* type, UINT16* channel_id);
|
||||
void rdp_write_share_control_header(wStream* s, UINT16 length, UINT16 type, UINT16 channel_id);
|
||||
FREERDP_LOCAL BOOL rdp_read_share_control_header(wStream* s, UINT16* length,
|
||||
UINT16* type, UINT16* channel_id);
|
||||
FREERDP_LOCAL void rdp_write_share_control_header(wStream* s, UINT16 length,
|
||||
UINT16 type, UINT16 channel_id);
|
||||
|
||||
BOOL rdp_read_share_data_header(wStream* s, UINT16* length, BYTE* type, UINT32* share_id,
|
||||
BYTE *compressed_type, UINT16 *compressed_len);
|
||||
FREERDP_LOCAL BOOL rdp_read_share_data_header(wStream* s, UINT16* length,
|
||||
BYTE* type, UINT32* share_id,
|
||||
BYTE* compressed_type, UINT16* compressed_len);
|
||||
|
||||
void rdp_write_share_data_header(wStream* s, UINT16 length, BYTE type, UINT32 share_id);
|
||||
FREERDP_LOCAL void rdp_write_share_data_header(wStream* s, UINT16 length,
|
||||
BYTE type, UINT32 share_id);
|
||||
|
||||
int rdp_init_stream(rdpRdp* rdp, wStream* s);
|
||||
wStream* rdp_send_stream_init(rdpRdp* rdp);
|
||||
FREERDP_LOCAL int rdp_init_stream(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL wStream* rdp_send_stream_init(rdpRdp* rdp);
|
||||
|
||||
BOOL rdp_read_header(rdpRdp* rdp, wStream* s, UINT16* length, UINT16* channel_id);
|
||||
void rdp_write_header(rdpRdp* rdp, wStream* s, UINT16 length, UINT16 channel_id);
|
||||
FREERDP_LOCAL BOOL rdp_read_header(rdpRdp* rdp, wStream* s, UINT16* length,
|
||||
UINT16* channel_id);
|
||||
FREERDP_LOCAL void rdp_write_header(rdpRdp* rdp, wStream* s, UINT16 length,
|
||||
UINT16 channel_id);
|
||||
|
||||
int rdp_init_stream_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_pdu(rdpRdp* rdp, wStream* s, UINT16 type, UINT16 channel_id);
|
||||
FREERDP_LOCAL int rdp_init_stream_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_pdu(rdpRdp* rdp, wStream* s, UINT16 type,
|
||||
UINT16 channel_id);
|
||||
|
||||
wStream* rdp_data_pdu_init(rdpRdp* rdp);
|
||||
int rdp_init_stream_data_pdu(rdpRdp* rdp, wStream* s);
|
||||
BOOL rdp_send_data_pdu(rdpRdp* rdp, wStream* s, BYTE type, UINT16 channel_id);
|
||||
int rdp_recv_data_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL wStream* rdp_data_pdu_init(rdpRdp* rdp);
|
||||
FREERDP_LOCAL int rdp_init_stream_data_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_data_pdu(rdpRdp* rdp, wStream* s, BYTE type,
|
||||
UINT16 channel_id);
|
||||
FREERDP_LOCAL int rdp_recv_data_pdu(rdpRdp* rdp, wStream* s);
|
||||
|
||||
BOOL rdp_send(rdpRdp* rdp, wStream* s, UINT16 channelId);
|
||||
FREERDP_LOCAL BOOL rdp_send(rdpRdp* rdp, wStream* s, UINT16 channelId);
|
||||
|
||||
int rdp_send_channel_data(rdpRdp* rdp, UINT16 channelId, BYTE* data, int size);
|
||||
FREERDP_LOCAL int rdp_send_channel_data(rdpRdp* rdp, UINT16 channelId,
|
||||
BYTE* data, int size);
|
||||
|
||||
wStream* rdp_message_channel_pdu_init(rdpRdp* rdp);
|
||||
BOOL rdp_send_message_channel_pdu(rdpRdp* rdp, wStream* s, UINT16 sec_flags);
|
||||
int rdp_recv_message_channel_pdu(rdpRdp* rdp, wStream* s, UINT16 securityFlags);
|
||||
FREERDP_LOCAL wStream* rdp_message_channel_pdu_init(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_send_message_channel_pdu(rdpRdp* rdp, wStream* s,
|
||||
UINT16 sec_flags);
|
||||
FREERDP_LOCAL int rdp_recv_message_channel_pdu(rdpRdp* rdp, wStream* s,
|
||||
UINT16 securityFlags);
|
||||
|
||||
int rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL int rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, wStream* s);
|
||||
|
||||
void rdp_read_flow_control_pdu(wStream* s, UINT16* type);
|
||||
FREERDP_LOCAL void rdp_read_flow_control_pdu(wStream* s, UINT16* type);
|
||||
|
||||
BOOL rdp_write_monitor_layout_pdu(wStream* s, UINT32 monitorCount, const rdpMonitor* monitorDefArray);
|
||||
FREERDP_LOCAL BOOL rdp_write_monitor_layout_pdu(wStream* s, UINT32 monitorCount,
|
||||
const rdpMonitor* monitorDefArray);
|
||||
|
||||
int rdp_recv_callback(rdpTransport* transport, wStream* s, void* extra);
|
||||
FREERDP_LOCAL int rdp_recv_callback(rdpTransport* transport, wStream* s,
|
||||
void* extra);
|
||||
|
||||
int rdp_check_fds(rdpRdp* rdp);
|
||||
FREERDP_LOCAL int rdp_check_fds(rdpRdp* rdp);
|
||||
|
||||
rdpRdp* rdp_new(rdpContext* context);
|
||||
void rdp_reset(rdpRdp* rdp);
|
||||
void rdp_free(rdpRdp* rdp);
|
||||
FREERDP_LOCAL rdpRdp* rdp_new(rdpContext* context);
|
||||
FREERDP_LOCAL void rdp_reset(rdpRdp* rdp);
|
||||
FREERDP_LOCAL void rdp_free(rdpRdp* rdp);
|
||||
|
||||
#define RDP_TAG FREERDP_TAG("core.rdp")
|
||||
#ifdef WITH_DEBUG_RDP
|
||||
|
||||
@@ -26,6 +26,7 @@ typedef struct rdp_redirection rdpRedirection;
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/wlog.h>
|
||||
#include <winpr/stream.h>
|
||||
@@ -49,12 +50,13 @@ struct rdp_redirection
|
||||
char** TargetNetAddresses;
|
||||
};
|
||||
|
||||
int rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL int rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp,
|
||||
wStream* s);
|
||||
|
||||
int rdp_redirection_apply_settings(rdpRdp* rdp);
|
||||
FREERDP_LOCAL int rdp_redirection_apply_settings(rdpRdp* rdp);
|
||||
|
||||
rdpRedirection* redirection_new(void);
|
||||
void redirection_free(rdpRedirection* redirection);
|
||||
FREERDP_LOCAL rdpRedirection* redirection_new(void);
|
||||
FREERDP_LOCAL void redirection_free(rdpRedirection* redirection);
|
||||
|
||||
#define REDIR_TAG FREERDP_TAG("core.redirection")
|
||||
#ifdef WITH_DEBUG_REDIR
|
||||
|
||||
@@ -24,25 +24,34 @@
|
||||
#include <freerdp/crypto/crypto.h>
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
BOOL security_master_secret(const BYTE* premaster_secret, const BYTE* client_random, const BYTE* server_random, BYTE* output);
|
||||
BOOL security_session_key_blob(const BYTE* master_secret, const BYTE* client_random, const BYTE* server_random, BYTE* output);
|
||||
void security_mac_salt_key(const BYTE* session_key_blob, const BYTE* client_random, const BYTE* server_random, BYTE* output);
|
||||
BOOL security_licensing_encryption_key(const BYTE* session_key_blob, const BYTE* client_random, const BYTE* server_random, BYTE* output);
|
||||
BOOL security_mac_data(const BYTE* mac_salt_key, const BYTE* data, UINT32 length, BYTE* output);
|
||||
|
||||
BOOL security_mac_signature(rdpRdp *rdp, const BYTE* data, UINT32 length, BYTE* output);
|
||||
BOOL security_salted_mac_signature(rdpRdp *rdp, const BYTE* data, UINT32 length, BOOL encryption, BYTE* output);
|
||||
BOOL security_establish_keys(const BYTE* client_random, rdpRdp* rdp);
|
||||
|
||||
BOOL security_encrypt(BYTE* data, int length, rdpRdp* rdp);
|
||||
BOOL security_decrypt(BYTE* data, int length, rdpRdp* rdp);
|
||||
|
||||
BOOL security_hmac_signature(const BYTE* data, int length, BYTE* output, rdpRdp* rdp);
|
||||
BOOL security_fips_encrypt(BYTE* data, int length, rdpRdp* rdp);
|
||||
BOOL security_fips_decrypt(BYTE* data, int length, rdpRdp* rdp);
|
||||
BOOL security_fips_check_signature(const BYTE* data, int length, const BYTE* sig, rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL security_master_secret(const BYTE* premaster_secret,
|
||||
const BYTE* client_random, const BYTE* server_random, BYTE* output);
|
||||
FREERDP_LOCAL BOOL security_session_key_blob(const BYTE* master_secret,
|
||||
const BYTE* client_random, const BYTE* server_random, BYTE* output);
|
||||
FREERDP_LOCAL void security_mac_salt_key(const BYTE* session_key_blob,
|
||||
const BYTE* client_random, const BYTE* server_random, BYTE* output);
|
||||
FREERDP_LOCAL BOOL security_licensing_encryption_key(const BYTE*
|
||||
session_key_blob, const BYTE* client_random, const BYTE* server_random,
|
||||
BYTE* output);
|
||||
FREERDP_LOCAL BOOL security_mac_data(const BYTE* mac_salt_key, const BYTE* data,
|
||||
UINT32 length, BYTE* output);
|
||||
FREERDP_LOCAL BOOL security_mac_signature(rdpRdp* rdp, const BYTE* data,
|
||||
UINT32 length, BYTE* output);
|
||||
FREERDP_LOCAL BOOL security_salted_mac_signature(rdpRdp* rdp, const BYTE* data,
|
||||
UINT32 length, BOOL encryption, BYTE* output);
|
||||
FREERDP_LOCAL BOOL security_establish_keys(const BYTE* client_random,
|
||||
rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL security_encrypt(BYTE* data, int length, rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL security_decrypt(BYTE* data, int length, rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL security_hmac_signature(const BYTE* data, int length,
|
||||
BYTE* output, rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL security_fips_encrypt(BYTE* data, int length, rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL security_fips_decrypt(BYTE* data, int length, rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL security_fips_check_signature(const BYTE* data, int length,
|
||||
const BYTE* sig, rdpRdp* rdp);
|
||||
|
||||
#endif /* __SECURITY_H */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define FREERDP_CORE_SERVER_H
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/channels/wtsvc.h>
|
||||
|
||||
#include <winpr/synch.h>
|
||||
@@ -89,87 +89,162 @@ struct WTSVirtualChannelManager
|
||||
wArrayList* dynamicVirtualChannels;
|
||||
};
|
||||
|
||||
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionW(LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers);
|
||||
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionA(LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers);
|
||||
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionExW(LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers, DWORD flags);
|
||||
BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionExA(LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk, USHORT HotkeyModifiers, DWORD flags);
|
||||
BOOL WINAPI FreeRDP_WTSStopRemoteControlSession(ULONG LogonId);
|
||||
BOOL WINAPI FreeRDP_WTSConnectSessionW(ULONG LogonId, ULONG TargetLogonId, PWSTR pPassword, BOOL bWait);
|
||||
BOOL WINAPI FreeRDP_WTSConnectSessionA(ULONG LogonId, ULONG TargetLogonId, PSTR pPassword, BOOL bWait);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateServersW(LPWSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOW* ppServerInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateServersA(LPSTR pDomainName, DWORD Reserved, DWORD Version, PWTS_SERVER_INFOA* ppServerInfo, DWORD* pCount);
|
||||
HANDLE WINAPI FreeRDP_WTSOpenServerW(LPWSTR pServerName);
|
||||
HANDLE WINAPI FreeRDP_WTSOpenServerA(LPSTR pServerName);
|
||||
HANDLE WINAPI FreeRDP_WTSOpenServerExW(LPWSTR pServerName);
|
||||
HANDLE WINAPI FreeRDP_WTSOpenServerExA(LPSTR pServerName);
|
||||
VOID WINAPI FreeRDP_WTSCloseServer(HANDLE hServer);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_SESSION_INFOW* ppSessionInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateSessionsA(HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_SESSION_INFOA* ppSessionInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateSessionsExW(HANDLE hServer, DWORD* pLevel, DWORD Filter, PWTS_SESSION_INFO_1W* ppSessionInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateSessionsExA(HANDLE hServer, DWORD* pLevel, DWORD Filter, PWTS_SESSION_INFO_1A* ppSessionInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_PROCESS_INFOW* ppProcessInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateProcessesA(HANDLE hServer, DWORD Reserved, DWORD Version, PWTS_PROCESS_INFOA* ppProcessInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSTerminateProcess(HANDLE hServer, DWORD ProcessId, DWORD ExitCode);
|
||||
BOOL WINAPI FreeRDP_WTSQuerySessionInformationW(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, LPWSTR* ppBuffer, DWORD* pBytesReturned);
|
||||
BOOL WINAPI FreeRDP_WTSQuerySessionInformationA(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, LPSTR* ppBuffer, DWORD* pBytesReturned);
|
||||
BOOL WINAPI FreeRDP_WTSQueryUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR* ppBuffer, DWORD* pBytesReturned);
|
||||
BOOL WINAPI FreeRDP_WTSQueryUserConfigA(LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR* ppBuffer, DWORD* pBytesReturned);
|
||||
BOOL WINAPI FreeRDP_WTSSetUserConfigW(LPWSTR pServerName, LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR pBuffer, DWORD DataLength);
|
||||
BOOL WINAPI FreeRDP_WTSSetUserConfigA(LPSTR pServerName, LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR pBuffer, DWORD DataLength);
|
||||
BOOL WINAPI FreeRDP_WTSSendMessageW(HANDLE hServer, DWORD SessionId, LPWSTR pTitle, DWORD TitleLength,
|
||||
LPWSTR pMessage, DWORD MessageLength, DWORD Style, DWORD Timeout, DWORD* pResponse, BOOL bWait);
|
||||
BOOL WINAPI FreeRDP_WTSSendMessageA(HANDLE hServer, DWORD SessionId, LPSTR pTitle, DWORD TitleLength,
|
||||
LPSTR pMessage, DWORD MessageLength, DWORD Style, DWORD Timeout, DWORD* pResponse, BOOL bWait);
|
||||
BOOL WINAPI FreeRDP_WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait);
|
||||
BOOL WINAPI FreeRDP_WTSLogoffSession(HANDLE hServer, DWORD SessionId, BOOL bWait);
|
||||
BOOL WINAPI FreeRDP_WTSShutdownSystem(HANDLE hServer, DWORD ShutdownFlag);
|
||||
BOOL WINAPI FreeRDP_WTSWaitSystemEvent(HANDLE hServer, DWORD EventMask, DWORD* pEventFlags);
|
||||
HANDLE WINAPI FreeRDP_WTSVirtualChannelOpen(HANDLE hServer, DWORD SessionId, LPSTR pVirtualName);
|
||||
HANDLE WINAPI FreeRDP_WTSVirtualChannelOpenEx(DWORD SessionId, LPSTR pVirtualName, DWORD flags);
|
||||
BOOL WINAPI FreeRDP_WTSVirtualChannelClose(HANDLE hChannelHandle);
|
||||
BOOL WINAPI FreeRDP_WTSVirtualChannelRead(HANDLE hChannelHandle, ULONG TimeOut, PCHAR Buffer, ULONG BufferSize, PULONG pBytesRead);
|
||||
BOOL WINAPI FreeRDP_WTSVirtualChannelWrite(HANDLE hChannelHandle, PCHAR Buffer, ULONG Length, PULONG pBytesWritten);
|
||||
BOOL WINAPI FreeRDP_WTSVirtualChannelPurgeInput(HANDLE hChannelHandle);
|
||||
BOOL WINAPI FreeRDP_WTSVirtualChannelPurgeOutput(HANDLE hChannelHandle);
|
||||
BOOL WINAPI FreeRDP_WTSVirtualChannelQuery(HANDLE hChannelHandle, WTS_VIRTUAL_CLASS WtsVirtualClass, PVOID* ppBuffer, DWORD* pBytesReturned);
|
||||
VOID WINAPI FreeRDP_WTSFreeMemory(PVOID pMemory);
|
||||
BOOL WINAPI FreeRDP_WTSFreeMemoryExW(WTS_TYPE_CLASS WTSTypeClass, PVOID pMemory, ULONG NumberOfEntries);
|
||||
BOOL WINAPI FreeRDP_WTSFreeMemoryExA(WTS_TYPE_CLASS WTSTypeClass, PVOID pMemory, ULONG NumberOfEntries);
|
||||
BOOL WINAPI FreeRDP_WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags);
|
||||
BOOL WINAPI FreeRDP_WTSUnRegisterSessionNotification(HWND hWnd);
|
||||
BOOL WINAPI FreeRDP_WTSRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd, DWORD dwFlags);
|
||||
BOOL WINAPI FreeRDP_WTSUnRegisterSessionNotificationEx(HANDLE hServer, HWND hWnd);
|
||||
BOOL WINAPI FreeRDP_WTSQueryUserToken(ULONG SessionId, PHANDLE phToken);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateProcessesExW(HANDLE hServer, DWORD* pLevel, DWORD SessionId, LPWSTR* ppProcessInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateProcessesExA(HANDLE hServer, DWORD* pLevel, DWORD SessionId, LPSTR* ppProcessInfo, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateListenersW(HANDLE hServer, PVOID pReserved, DWORD Reserved, PWTSLISTENERNAMEW pListeners, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSEnumerateListenersA(HANDLE hServer, PVOID pReserved, DWORD Reserved, PWTSLISTENERNAMEA pListeners, DWORD* pCount);
|
||||
BOOL WINAPI FreeRDP_WTSQueryListenerConfigW(HANDLE hServer, PVOID pReserved, DWORD Reserved, LPWSTR pListenerName, PWTSLISTENERCONFIGW pBuffer);
|
||||
BOOL WINAPI FreeRDP_WTSQueryListenerConfigA(HANDLE hServer, PVOID pReserved, DWORD Reserved, LPSTR pListenerName, PWTSLISTENERCONFIGA pBuffer);
|
||||
BOOL WINAPI FreeRDP_WTSCreateListenerW(HANDLE hServer, PVOID pReserved, DWORD Reserved,
|
||||
LPWSTR pListenerName, PWTSLISTENERCONFIGW pBuffer, DWORD flag);
|
||||
BOOL WINAPI FreeRDP_WTSCreateListenerA(HANDLE hServer, PVOID pReserved, DWORD Reserved,
|
||||
LPSTR pListenerName, PWTSLISTENERCONFIGA pBuffer, DWORD flag);
|
||||
BOOL WINAPI FreeRDP_WTSSetListenerSecurityW(HANDLE hServer, PVOID pReserved, DWORD Reserved,
|
||||
LPWSTR pListenerName, SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR pSecurityDescriptor);
|
||||
BOOL WINAPI FreeRDP_WTSSetListenerSecurityA(HANDLE hServer, PVOID pReserved, DWORD Reserved,
|
||||
LPSTR pListenerName, SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR pSecurityDescriptor);
|
||||
BOOL WINAPI FreeRDP_WTSGetListenerSecurityW(HANDLE hServer, PVOID pReserved, DWORD Reserved,
|
||||
LPWSTR pListenerName, SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded);
|
||||
BOOL WINAPI FreeRDP_WTSGetListenerSecurityA(HANDLE hServer, PVOID pReserved, DWORD Reserved,
|
||||
LPSTR pListenerName, SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionW(
|
||||
LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk,
|
||||
USHORT HotkeyModifiers);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionA(
|
||||
LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk,
|
||||
USHORT HotkeyModifiers);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionExW(
|
||||
LPWSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk,
|
||||
USHORT HotkeyModifiers, DWORD flags);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSStartRemoteControlSessionExA(
|
||||
LPSTR pTargetServerName, ULONG TargetLogonId, BYTE HotkeyVk,
|
||||
USHORT HotkeyModifiers, DWORD flags);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSStopRemoteControlSession(ULONG LogonId);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSConnectSessionW(ULONG LogonId,
|
||||
ULONG TargetLogonId, PWSTR pPassword, BOOL bWait);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSConnectSessionA(ULONG LogonId,
|
||||
ULONG TargetLogonId, PSTR pPassword, BOOL bWait);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateServersW(LPWSTR pDomainName,
|
||||
DWORD Reserved, DWORD Version, PWTS_SERVER_INFOW* ppServerInfo, DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateServersA(LPSTR pDomainName,
|
||||
DWORD Reserved, DWORD Version, PWTS_SERVER_INFOA* ppServerInfo, DWORD* pCount);
|
||||
FREERDP_LOCAL HANDLE WINAPI FreeRDP_WTSOpenServerW(LPWSTR pServerName);
|
||||
FREERDP_LOCAL HANDLE WINAPI FreeRDP_WTSOpenServerA(LPSTR pServerName);
|
||||
FREERDP_LOCAL HANDLE WINAPI FreeRDP_WTSOpenServerExW(LPWSTR pServerName);
|
||||
FREERDP_LOCAL HANDLE WINAPI FreeRDP_WTSOpenServerExA(LPSTR pServerName);
|
||||
FREERDP_LOCAL VOID WINAPI FreeRDP_WTSCloseServer(HANDLE hServer);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateSessionsW(HANDLE hServer,
|
||||
DWORD Reserved, DWORD Version, PWTS_SESSION_INFOW* ppSessionInfo,
|
||||
DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateSessionsA(HANDLE hServer,
|
||||
DWORD Reserved, DWORD Version, PWTS_SESSION_INFOA* ppSessionInfo,
|
||||
DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateSessionsExW(HANDLE hServer,
|
||||
DWORD* pLevel, DWORD Filter, PWTS_SESSION_INFO_1W* ppSessionInfo,
|
||||
DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateSessionsExA(HANDLE hServer,
|
||||
DWORD* pLevel, DWORD Filter, PWTS_SESSION_INFO_1A* ppSessionInfo,
|
||||
DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateProcessesW(HANDLE hServer,
|
||||
DWORD Reserved, DWORD Version, PWTS_PROCESS_INFOW* ppProcessInfo,
|
||||
DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateProcessesA(HANDLE hServer,
|
||||
DWORD Reserved, DWORD Version, PWTS_PROCESS_INFOA* ppProcessInfo,
|
||||
DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSTerminateProcess(HANDLE hServer,
|
||||
DWORD ProcessId, DWORD ExitCode);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSQuerySessionInformationW(HANDLE hServer,
|
||||
DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, LPWSTR* ppBuffer,
|
||||
DWORD* pBytesReturned);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSQuerySessionInformationA(HANDLE hServer,
|
||||
DWORD SessionId, WTS_INFO_CLASS WTSInfoClass, LPSTR* ppBuffer,
|
||||
DWORD* pBytesReturned);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSQueryUserConfigW(LPWSTR pServerName,
|
||||
LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR* ppBuffer,
|
||||
DWORD* pBytesReturned);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSQueryUserConfigA(LPSTR pServerName,
|
||||
LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR* ppBuffer,
|
||||
DWORD* pBytesReturned);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSSetUserConfigW(LPWSTR pServerName,
|
||||
LPWSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPWSTR pBuffer,
|
||||
DWORD DataLength);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSSetUserConfigA(LPSTR pServerName,
|
||||
LPSTR pUserName, WTS_CONFIG_CLASS WTSConfigClass, LPSTR pBuffer,
|
||||
DWORD DataLength);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSSendMessageW(HANDLE hServer,
|
||||
DWORD SessionId, LPWSTR pTitle, DWORD TitleLength,
|
||||
LPWSTR pMessage, DWORD MessageLength, DWORD Style,
|
||||
DWORD Timeout, DWORD* pResponse, BOOL bWait);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSSendMessageA(HANDLE hServer,
|
||||
DWORD SessionId, LPSTR pTitle, DWORD TitleLength,
|
||||
LPSTR pMessage, DWORD MessageLength, DWORD Style, DWORD Timeout,
|
||||
DWORD* pResponse, BOOL bWait);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSDisconnectSession(HANDLE hServer,
|
||||
DWORD SessionId, BOOL bWait);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSLogoffSession(HANDLE hServer,
|
||||
DWORD SessionId, BOOL bWait);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSShutdownSystem(HANDLE hServer,
|
||||
DWORD ShutdownFlag);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSWaitSystemEvent(HANDLE hServer,
|
||||
DWORD EventMask, DWORD* pEventFlags);
|
||||
FREERDP_LOCAL HANDLE WINAPI FreeRDP_WTSVirtualChannelOpen(HANDLE hServer,
|
||||
DWORD SessionId, LPSTR pVirtualName);
|
||||
FREERDP_LOCAL HANDLE WINAPI FreeRDP_WTSVirtualChannelOpenEx(DWORD SessionId,
|
||||
LPSTR pVirtualName, DWORD flags);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSVirtualChannelClose(HANDLE hChannelHandle);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSVirtualChannelRead(HANDLE hChannelHandle,
|
||||
ULONG TimeOut, PCHAR Buffer, ULONG BufferSize, PULONG pBytesRead);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSVirtualChannelWrite(HANDLE hChannelHandle,
|
||||
PCHAR Buffer, ULONG Length, PULONG pBytesWritten);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSVirtualChannelPurgeInput(
|
||||
HANDLE hChannelHandle);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSVirtualChannelPurgeOutput(
|
||||
HANDLE hChannelHandle);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSVirtualChannelQuery(HANDLE hChannelHandle,
|
||||
WTS_VIRTUAL_CLASS WtsVirtualClass, PVOID* ppBuffer, DWORD* pBytesReturned);
|
||||
FREERDP_LOCAL VOID WINAPI FreeRDP_WTSFreeMemory(PVOID pMemory);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSFreeMemoryExW(WTS_TYPE_CLASS WTSTypeClass,
|
||||
PVOID pMemory, ULONG NumberOfEntries);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSFreeMemoryExA(WTS_TYPE_CLASS WTSTypeClass,
|
||||
PVOID pMemory, ULONG NumberOfEntries);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSRegisterSessionNotification(HWND hWnd,
|
||||
DWORD dwFlags);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSUnRegisterSessionNotification(HWND hWnd);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSRegisterSessionNotificationEx(
|
||||
HANDLE hServer, HWND hWnd, DWORD dwFlags);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSUnRegisterSessionNotificationEx(
|
||||
HANDLE hServer, HWND hWnd);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSQueryUserToken(ULONG SessionId,
|
||||
PHANDLE phToken);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateProcessesExW(HANDLE hServer,
|
||||
DWORD* pLevel, DWORD SessionId, LPWSTR* ppProcessInfo, DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateProcessesExA(HANDLE hServer,
|
||||
DWORD* pLevel, DWORD SessionId, LPSTR* ppProcessInfo, DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateListenersW(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved, PWTSLISTENERNAMEW pListeners, DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSEnumerateListenersA(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved, PWTSLISTENERNAMEA pListeners, DWORD* pCount);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSQueryListenerConfigW(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved, LPWSTR pListenerName,
|
||||
PWTSLISTENERCONFIGW pBuffer);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSQueryListenerConfigA(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved, LPSTR pListenerName,
|
||||
PWTSLISTENERCONFIGA pBuffer);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSCreateListenerW(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved,
|
||||
LPWSTR pListenerName, PWTSLISTENERCONFIGW pBuffer, DWORD flag);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSCreateListenerA(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved,
|
||||
LPSTR pListenerName, PWTSLISTENERCONFIGA pBuffer, DWORD flag);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSSetListenerSecurityW(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved,
|
||||
LPWSTR pListenerName, SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR pSecurityDescriptor);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSSetListenerSecurityA(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved,
|
||||
LPSTR pListenerName, SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR pSecurityDescriptor);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSGetListenerSecurityW(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved,
|
||||
LPWSTR pListenerName, SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength,
|
||||
LPDWORD lpnLengthNeeded);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSGetListenerSecurityA(HANDLE hServer,
|
||||
PVOID pReserved, DWORD Reserved,
|
||||
LPSTR pListenerName, SECURITY_INFORMATION SecurityInformation,
|
||||
PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength,
|
||||
LPDWORD lpnLengthNeeded);
|
||||
|
||||
BOOL CDECL FreeRDP_WTSEnableChildSessions(BOOL bEnable);
|
||||
BOOL CDECL FreeRDP_WTSIsChildSessionsEnabled(PBOOL pbEnabled);
|
||||
BOOL CDECL FreeRDP_WTSGetChildSessionId(PULONG pSessionId);
|
||||
FREERDP_LOCAL BOOL CDECL FreeRDP_WTSEnableChildSessions(BOOL bEnable);
|
||||
FREERDP_LOCAL BOOL CDECL FreeRDP_WTSIsChildSessionsEnabled(PBOOL pbEnabled);
|
||||
FREERDP_LOCAL BOOL CDECL FreeRDP_WTSGetChildSessionId(PULONG pSessionId);
|
||||
|
||||
DWORD WINAPI FreeRDP_WTSGetActiveConsoleSessionId(void);
|
||||
FREERDP_LOCAL DWORD WINAPI FreeRDP_WTSGetActiveConsoleSessionId(void);
|
||||
|
||||
BOOL WINAPI FreeRDP_WTSLogoffUser(HANDLE hServer);
|
||||
BOOL WINAPI FreeRDP_WTSLogonUser(HANDLE hServer, LPCSTR username, LPCSTR password, LPCSTR domain);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSLogoffUser(HANDLE hServer);
|
||||
FREERDP_LOCAL BOOL WINAPI FreeRDP_WTSLogonUser(HANDLE hServer, LPCSTR username,
|
||||
LPCSTR password, LPCSTR domain);
|
||||
|
||||
#endif /* FREERDP_CORE_SERVER_H */
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "rdp.h"
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#define SURFCMD_SURFACE_BITS_HEADER_LENGTH 22
|
||||
#define SURFCMD_FRAME_MARKER_LENGTH 8
|
||||
@@ -34,11 +35,13 @@ enum SURFCMD_CMDTYPE
|
||||
CMDTYPE_STREAM_SURFACE_BITS = 0x0006
|
||||
};
|
||||
|
||||
int update_recv_surfcmds(rdpUpdate* update, UINT32 size, wStream* s);
|
||||
FREERDP_LOCAL int update_recv_surfcmds(rdpUpdate* update, UINT32 size,
|
||||
wStream* s);
|
||||
|
||||
BOOL update_write_surfcmd_surface_bits_header(wStream* s,
|
||||
const SURFACE_BITS_COMMAND* cmd);
|
||||
BOOL update_write_surfcmd_frame_marker(wStream* s, UINT16 frameAction, UINT32 frameId);
|
||||
FREERDP_LOCAL BOOL update_write_surfcmd_surface_bits_header(wStream* s,
|
||||
const SURFACE_BITS_COMMAND* cmd);
|
||||
FREERDP_LOCAL BOOL update_write_surfcmd_frame_marker(wStream* s,
|
||||
UINT16 frameAction, UINT32 frameId);
|
||||
|
||||
#endif /* __SURFACE */
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/settings.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/synch.h>
|
||||
@@ -58,10 +59,11 @@
|
||||
#define BIO_wait_read(b, c) BIO_ctrl(b, BIO_C_WAIT_READ, c, NULL)
|
||||
#define BIO_wait_write(b, c) BIO_ctrl(b, BIO_C_WAIT_WRITE, c, NULL)
|
||||
|
||||
BIO_METHOD* BIO_s_simple_socket(void);
|
||||
BIO_METHOD* BIO_s_buffered_socket(void);
|
||||
FREERDP_LOCAL BIO_METHOD* BIO_s_simple_socket(void);
|
||||
FREERDP_LOCAL BIO_METHOD* BIO_s_buffered_socket(void);
|
||||
|
||||
int freerdp_tcp_connect(rdpContext* context, rdpSettings* settings,
|
||||
const char* hostname, int port, int timeout);
|
||||
FREERDP_LOCAL int freerdp_tcp_connect(rdpContext* context,
|
||||
rdpSettings* settings,
|
||||
const char* hostname, int port, int timeout);
|
||||
|
||||
#endif /* __TCP_H */
|
||||
|
||||
@@ -28,11 +28,13 @@
|
||||
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
BOOL rdp_read_client_time_zone(wStream* s, rdpSettings* settings);
|
||||
BOOL rdp_write_client_time_zone(wStream* s, rdpSettings* settings);
|
||||
FREERDP_LOCAL BOOL rdp_read_client_time_zone(wStream* s, rdpSettings* settings);
|
||||
FREERDP_LOCAL BOOL rdp_write_client_time_zone(wStream* s,
|
||||
rdpSettings* settings);
|
||||
|
||||
#define TIMEZONE_TAG FREERDP_TAG("core.timezone")
|
||||
#ifdef WITH_DEBUG_TIMEZONE
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#define __TPDU_H
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
enum X224_TPDU_TYPE
|
||||
{
|
||||
@@ -41,14 +42,14 @@ enum X224_TPDU_TYPE
|
||||
#define TPDU_CONNECTION_CONFIRM_LENGTH (TPKT_HEADER_LENGTH + TPDU_CONNECTION_CONFIRM_HEADER_LENGTH)
|
||||
#define TPDU_DISCONNECT_REQUEST_LENGTH (TPKT_HEADER_LENGTH + TPDU_DISCONNECT_REQUEST_HEADER_LENGTH)
|
||||
|
||||
BOOL tpdu_read_header(wStream* s, BYTE* code, BYTE* li);
|
||||
void tpdu_write_header(wStream* s, UINT16 length, BYTE code);
|
||||
BOOL tpdu_read_connection_request(wStream* s, BYTE* li);
|
||||
void tpdu_write_connection_request(wStream* s, UINT16 length);
|
||||
BOOL tpdu_read_connection_confirm(wStream* s, BYTE* li);
|
||||
void tpdu_write_connection_confirm(wStream* s, UINT16 length);
|
||||
void tpdu_write_disconnect_request(wStream* s, UINT16 length);
|
||||
BOOL tpdu_read_data(wStream* s, UINT16* li);
|
||||
void tpdu_write_data(wStream* s);
|
||||
FREERDP_LOCAL BOOL tpdu_read_header(wStream* s, BYTE* code, BYTE* li);
|
||||
FREERDP_LOCAL void tpdu_write_header(wStream* s, UINT16 length, BYTE code);
|
||||
FREERDP_LOCAL BOOL tpdu_read_connection_request(wStream* s, BYTE* li);
|
||||
FREERDP_LOCAL void tpdu_write_connection_request(wStream* s, UINT16 length);
|
||||
FREERDP_LOCAL BOOL tpdu_read_connection_confirm(wStream* s, BYTE* li);
|
||||
FREERDP_LOCAL void tpdu_write_connection_confirm(wStream* s, UINT16 length);
|
||||
FREERDP_LOCAL void tpdu_write_disconnect_request(wStream* s, UINT16 length);
|
||||
FREERDP_LOCAL BOOL tpdu_read_data(wStream* s, UINT16* li);
|
||||
FREERDP_LOCAL void tpdu_write_data(wStream* s);
|
||||
|
||||
#endif /* __TPDU_H */
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
#include "transport.h"
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#define TPKT_HEADER_LENGTH 4
|
||||
|
||||
BOOL tpkt_verify_header(wStream* s);
|
||||
UINT16 tpkt_read_header(wStream* s);
|
||||
void tpkt_write_header(wStream* s, UINT16 length);
|
||||
FREERDP_LOCAL BOOL tpkt_verify_header(wStream* s);
|
||||
FREERDP_LOCAL UINT16 tpkt_read_header(wStream* s);
|
||||
FREERDP_LOCAL void tpkt_write_header(wStream* s, UINT16 length);
|
||||
|
||||
#endif /* __TPKT_H */
|
||||
|
||||
@@ -44,6 +44,7 @@ typedef struct rdp_transport rdpTransport;
|
||||
#include <winpr/stream.h>
|
||||
#include <winpr/collections.h>
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/crypto/tls.h>
|
||||
|
||||
#include <time.h>
|
||||
@@ -51,7 +52,8 @@ typedef struct rdp_transport rdpTransport;
|
||||
#include <freerdp/settings.h>
|
||||
|
||||
|
||||
typedef int (*TransportRecv) (rdpTransport* transport, wStream* stream, void* extra);
|
||||
typedef int (*TransportRecv)(rdpTransport* transport, wStream* stream,
|
||||
void* extra);
|
||||
|
||||
struct rdp_transport
|
||||
{
|
||||
@@ -79,35 +81,43 @@ struct rdp_transport
|
||||
ULONG written;
|
||||
};
|
||||
|
||||
wStream* transport_send_stream_init(rdpTransport* transport, int size);
|
||||
BOOL transport_connect(rdpTransport* transport, const char* hostname, UINT16 port, int timeout);
|
||||
BOOL transport_attach(rdpTransport* transport, int sockfd);
|
||||
BOOL transport_disconnect(rdpTransport* transport);
|
||||
BOOL transport_connect_rdp(rdpTransport* transport);
|
||||
BOOL transport_connect_tls(rdpTransport* transport);
|
||||
BOOL transport_connect_nla(rdpTransport* transport);
|
||||
BOOL transport_accept_rdp(rdpTransport* transport);
|
||||
BOOL transport_accept_tls(rdpTransport* transport);
|
||||
BOOL transport_accept_nla(rdpTransport* transport);
|
||||
void transport_stop(rdpTransport* transport);
|
||||
int transport_read_pdu(rdpTransport* transport, wStream* s);
|
||||
int transport_write(rdpTransport* transport, wStream* s);
|
||||
FREERDP_LOCAL wStream* transport_send_stream_init(rdpTransport* transport,
|
||||
int size);
|
||||
FREERDP_LOCAL BOOL transport_connect(rdpTransport* transport,
|
||||
const char* hostname, UINT16 port, int timeout);
|
||||
FREERDP_LOCAL BOOL transport_attach(rdpTransport* transport, int sockfd);
|
||||
FREERDP_LOCAL BOOL transport_disconnect(rdpTransport* transport);
|
||||
FREERDP_LOCAL BOOL transport_connect_rdp(rdpTransport* transport);
|
||||
FREERDP_LOCAL BOOL transport_connect_tls(rdpTransport* transport);
|
||||
FREERDP_LOCAL BOOL transport_connect_nla(rdpTransport* transport);
|
||||
FREERDP_LOCAL BOOL transport_accept_rdp(rdpTransport* transport);
|
||||
FREERDP_LOCAL BOOL transport_accept_tls(rdpTransport* transport);
|
||||
FREERDP_LOCAL BOOL transport_accept_nla(rdpTransport* transport);
|
||||
FREERDP_LOCAL void transport_stop(rdpTransport* transport);
|
||||
FREERDP_LOCAL int transport_read_pdu(rdpTransport* transport, wStream* s);
|
||||
FREERDP_LOCAL int transport_write(rdpTransport* transport, wStream* s);
|
||||
|
||||
void transport_get_fds(rdpTransport* transport, void** rfds, int* rcount);
|
||||
int transport_check_fds(rdpTransport* transport);
|
||||
FREERDP_LOCAL void transport_get_fds(rdpTransport* transport, void** rfds,
|
||||
int* rcount);
|
||||
FREERDP_LOCAL int transport_check_fds(rdpTransport* transport);
|
||||
|
||||
DWORD transport_get_event_handles(rdpTransport* transport, HANDLE* events, DWORD nCount);
|
||||
FREERDP_LOCAL DWORD transport_get_event_handles(rdpTransport* transport,
|
||||
HANDLE* events, DWORD nCount);
|
||||
|
||||
BOOL transport_set_blocking_mode(rdpTransport* transport, BOOL blocking);
|
||||
void transport_set_gateway_enabled(rdpTransport* transport, BOOL GatewayEnabled);
|
||||
void transport_set_nla_mode(rdpTransport* transport, BOOL NlaMode);
|
||||
BOOL transport_is_write_blocked(rdpTransport* transport);
|
||||
int transport_drain_output_buffer(rdpTransport* transport);
|
||||
FREERDP_LOCAL BOOL transport_set_blocking_mode(rdpTransport* transport,
|
||||
BOOL blocking);
|
||||
FREERDP_LOCAL void transport_set_gateway_enabled(rdpTransport* transport,
|
||||
BOOL GatewayEnabled);
|
||||
FREERDP_LOCAL void transport_set_nla_mode(rdpTransport* transport,
|
||||
BOOL NlaMode);
|
||||
FREERDP_LOCAL BOOL transport_is_write_blocked(rdpTransport* transport);
|
||||
FREERDP_LOCAL int transport_drain_output_buffer(rdpTransport* transport);
|
||||
|
||||
wStream* transport_receive_pool_take(rdpTransport* transport);
|
||||
int transport_receive_pool_return(rdpTransport* transport, wStream* pdu);
|
||||
FREERDP_LOCAL wStream* transport_receive_pool_take(rdpTransport* transport);
|
||||
FREERDP_LOCAL int transport_receive_pool_return(rdpTransport* transport,
|
||||
wStream* pdu);
|
||||
|
||||
rdpTransport* transport_new(rdpContext* context);
|
||||
void transport_free(rdpTransport* transport);
|
||||
FREERDP_LOCAL rdpTransport* transport_new(rdpContext* context);
|
||||
FREERDP_LOCAL void transport_free(rdpTransport* transport);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/update.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
#include <winpr/stream.h>
|
||||
|
||||
@@ -37,33 +38,33 @@
|
||||
#define BITMAP_COMPRESSION 0x0001
|
||||
#define NO_BITMAP_COMPRESSION_HDR 0x0400
|
||||
|
||||
rdpUpdate* update_new(rdpRdp* rdp);
|
||||
void update_free(rdpUpdate* update);
|
||||
|
||||
void update_free_bitmap(BITMAP_UPDATE* bitmap_update);
|
||||
|
||||
void update_reset_state(rdpUpdate* update);
|
||||
BOOL update_post_connect(rdpUpdate* update);
|
||||
void update_post_disconnect(rdpUpdate* update);
|
||||
|
||||
BOOL update_read_bitmap_update(rdpUpdate* update, wStream* s, BITMAP_UPDATE* bitmapUpdate);
|
||||
BOOL update_read_palette(rdpUpdate* update, wStream* s, PALETTE_UPDATE* palette_update);
|
||||
BOOL update_recv_play_sound(rdpUpdate* update, wStream* s);
|
||||
BOOL update_recv_pointer(rdpUpdate* update, wStream* s);
|
||||
BOOL update_recv(rdpUpdate* update, wStream* s);
|
||||
|
||||
BOOL update_read_pointer_position(wStream* s, POINTER_POSITION_UPDATE* pointer_position);
|
||||
BOOL update_read_pointer_system(wStream* s, POINTER_SYSTEM_UPDATE* pointer_system);
|
||||
BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color, int xorBpp);
|
||||
BOOL update_read_pointer_new(wStream* s, POINTER_NEW_UPDATE* pointer_new);
|
||||
BOOL update_read_pointer_cached(wStream* s, POINTER_CACHED_UPDATE* pointer_cached);
|
||||
|
||||
BOOL update_read_refresh_rect(rdpUpdate* update, wStream* s);
|
||||
BOOL update_read_suppress_output(rdpUpdate* update, wStream* s);
|
||||
|
||||
void update_register_server_callbacks(rdpUpdate* update);
|
||||
void update_register_client_callbacks(rdpUpdate* update);
|
||||
|
||||
int update_process_messages(rdpUpdate* update);
|
||||
FREERDP_LOCAL rdpUpdate* update_new(rdpRdp* rdp);
|
||||
FREERDP_LOCAL void update_free(rdpUpdate* update);
|
||||
FREERDP_LOCAL void update_free_bitmap(BITMAP_UPDATE* bitmap_update);
|
||||
FREERDP_LOCAL void update_reset_state(rdpUpdate* update);
|
||||
FREERDP_LOCAL BOOL update_post_connect(rdpUpdate* update);
|
||||
FREERDP_LOCAL void update_post_disconnect(rdpUpdate* update);
|
||||
FREERDP_LOCAL BOOL update_read_bitmap_update(rdpUpdate* update, wStream* s,
|
||||
BITMAP_UPDATE* bitmapUpdate);
|
||||
FREERDP_LOCAL BOOL update_read_palette(rdpUpdate* update, wStream* s,
|
||||
PALETTE_UPDATE* palette_update);
|
||||
FREERDP_LOCAL BOOL update_recv_play_sound(rdpUpdate* update, wStream* s);
|
||||
FREERDP_LOCAL BOOL update_recv_pointer(rdpUpdate* update, wStream* s);
|
||||
FREERDP_LOCAL BOOL update_recv(rdpUpdate* update, wStream* s);
|
||||
FREERDP_LOCAL BOOL update_read_pointer_position(wStream* s,
|
||||
POINTER_POSITION_UPDATE* pointer_position);
|
||||
FREERDP_LOCAL BOOL update_read_pointer_system(wStream* s,
|
||||
POINTER_SYSTEM_UPDATE* pointer_system);
|
||||
FREERDP_LOCAL BOOL update_read_pointer_color(wStream* s,
|
||||
POINTER_COLOR_UPDATE* pointer_color, int xorBpp);
|
||||
FREERDP_LOCAL BOOL update_read_pointer_new(wStream* s,
|
||||
POINTER_NEW_UPDATE* pointer_new);
|
||||
FREERDP_LOCAL BOOL update_read_pointer_cached(wStream* s,
|
||||
POINTER_CACHED_UPDATE* pointer_cached);
|
||||
FREERDP_LOCAL BOOL update_read_refresh_rect(rdpUpdate* update, wStream* s);
|
||||
FREERDP_LOCAL BOOL update_read_suppress_output(rdpUpdate* update, wStream* s);
|
||||
FREERDP_LOCAL void update_register_server_callbacks(rdpUpdate* update);
|
||||
FREERDP_LOCAL void update_register_client_callbacks(rdpUpdate* update);
|
||||
FREERDP_LOCAL int update_process_messages(rdpUpdate* update);
|
||||
|
||||
#endif /* __UPDATE_H */
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
|
||||
#include <winpr/stream.h>
|
||||
#include <freerdp/log.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
BOOL update_recv_altsec_window_order(rdpUpdate* update, wStream* s);
|
||||
FREERDP_LOCAL BOOL update_recv_altsec_window_order(rdpUpdate* update,
|
||||
wStream* s);
|
||||
|
||||
#define WND_TAG FREERDP_TAG("core.wnd")
|
||||
#ifdef WITH_DEBUG_WND
|
||||
|
||||
@@ -330,7 +330,7 @@ static BOOL BitBlt_write(HGDI_DC hdcDest, HGDI_DC hdcSrc, UINT32 nXDest,
|
||||
}
|
||||
|
||||
dstColor = process_rop(colorC, colorA, colorB, rop, hdcDest->format);
|
||||
WriteColor(dstp, hdcDest->format, dstColor);
|
||||
return WriteColor(dstp, hdcDest->format, dstColor);
|
||||
}
|
||||
|
||||
static BOOL BitBlt_process(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const char* gdi_rop_to_string(UINT32 code);
|
||||
FREERDP_LOCAL const char* gdi_rop_to_string(UINT32 code);
|
||||
|
||||
HGDI_BRUSH gdi_CreateSolidBrush(UINT32 crColor);
|
||||
HGDI_BRUSH gdi_CreatePatternBrush(HGDI_BITMAP hbmp);
|
||||
HGDI_BRUSH gdi_CreateHatchBrush(HGDI_BITMAP hbmp);
|
||||
UINT32 gdi_GetBrushStyle(HGDI_DC hdc);
|
||||
FREERDP_LOCAL HGDI_BRUSH gdi_CreateSolidBrush(UINT32 crColor);
|
||||
FREERDP_LOCAL HGDI_BRUSH gdi_CreatePatternBrush(HGDI_BITMAP hbmp);
|
||||
FREERDP_LOCAL HGDI_BRUSH gdi_CreateHatchBrush(HGDI_BITMAP hbmp);
|
||||
FREERDP_LOCAL UINT32 gdi_GetBrushStyle(HGDI_DC hdc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -26,17 +26,18 @@
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL gdi_SetClipRgn(HGDI_DC hdc, UINT32 nXLeft, UINT32 nYLeft, UINT32 nWidth, UINT32 nHeight);
|
||||
HGDI_RGN gdi_GetClipRgn(HGDI_DC hdc);
|
||||
BOOL gdi_SetNullClipRgn(HGDI_DC hdc);
|
||||
BOOL gdi_ClipCoords(HGDI_DC hdc, UINT32 *x, UINT32 *y,
|
||||
UINT32 *w, UINT32 *h, UINT32 *srcx, UINT32 *srcy);
|
||||
FREERDP_LOCAL BOOL gdi_SetClipRgn(HGDI_DC hdc, UINT32 nXLeft, UINT32 nYLeft,
|
||||
UINT32 nWidth, UINT32 nHeight);
|
||||
FREERDP_LOCAL HGDI_RGN gdi_GetClipRgn(HGDI_DC hdc);
|
||||
FREERDP_LOCAL BOOL gdi_SetNullClipRgn(HGDI_DC hdc);
|
||||
FREERDP_LOCAL BOOL gdi_ClipCoords(HGDI_DC hdc, UINT32* x, UINT32* y,
|
||||
UINT32* w, UINT32* h, UINT32* srcx, UINT32* srcy);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_GDI_CLIPPING_H */
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
UINT32 gdi_GetROP2(HGDI_DC hdc);
|
||||
UINT32 gdi_SetROP2(HGDI_DC hdc, int fnDrawMode);
|
||||
UINT32 gdi_GetBkColor(HGDI_DC hdc);
|
||||
UINT32 gdi_SetBkColor(HGDI_DC hdc, UINT32 crColor);
|
||||
UINT32 gdi_GetBkMode(HGDI_DC hdc);
|
||||
BOOL gdi_SetBkMode(HGDI_DC hdc, int iBkMode);
|
||||
UINT32 gdi_SetTextColor(HGDI_DC hdc, UINT32 crColor);
|
||||
FREERDP_LOCAL UINT32 gdi_GetROP2(HGDI_DC hdc);
|
||||
FREERDP_LOCAL UINT32 gdi_SetROP2(HGDI_DC hdc, int fnDrawMode);
|
||||
FREERDP_LOCAL UINT32 gdi_GetBkColor(HGDI_DC hdc);
|
||||
FREERDP_LOCAL UINT32 gdi_SetBkColor(HGDI_DC hdc, UINT32 crColor);
|
||||
FREERDP_LOCAL UINT32 gdi_GetBkMode(HGDI_DC hdc);
|
||||
FREERDP_LOCAL BOOL gdi_SetBkMode(HGDI_DC hdc, int iBkMode);
|
||||
FREERDP_LOCAL UINT32 gdi_SetTextColor(HGDI_DC hdc, UINT32 crColor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -22,11 +22,14 @@
|
||||
|
||||
#include "graphics.h"
|
||||
|
||||
BOOL gdi_bitmap_update(rdpContext* context,
|
||||
const BITMAP_UPDATE* bitmapUpdate);
|
||||
#include <freerdp/api.h>
|
||||
|
||||
gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp,
|
||||
BYTE* data);
|
||||
void gdi_bitmap_free_ex(gdiBitmap* gdi_bmp);
|
||||
FREERDP_LOCAL BOOL gdi_bitmap_update(rdpContext* context,
|
||||
const BITMAP_UPDATE* bitmapUpdate);
|
||||
|
||||
FREERDP_LOCAL gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height,
|
||||
int bpp,
|
||||
BYTE* data);
|
||||
FREERDP_LOCAL void gdi_bitmap_free_ex(gdiBitmap* gdi_bmp);
|
||||
|
||||
#endif /* __GDI_CORE_H */
|
||||
|
||||
@@ -24,10 +24,12 @@
|
||||
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
#include <freerdp/graphics.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, UINT32 width, UINT32 height,
|
||||
UINT32 format, BYTE* data);
|
||||
FREERDP_LOCAL HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, UINT32 width,
|
||||
UINT32 height,
|
||||
UINT32 format, BYTE* data);
|
||||
|
||||
BOOL gdi_register_graphics(rdpGraphics* graphics);
|
||||
FREERDP_LOCAL BOOL gdi_register_graphics(rdpGraphics* graphics);
|
||||
|
||||
#endif /* __GDI_GRAPHICS_H */
|
||||
|
||||
@@ -26,17 +26,19 @@
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL gdi_LineTo(HGDI_DC hdc, UINT32 nXEnd, UINT32 nYEnd);
|
||||
BOOL gdi_PolylineTo(HGDI_DC hdc, GDI_POINT *lppt, DWORD cCount);
|
||||
BOOL gdi_Polyline(HGDI_DC hdc, GDI_POINT *lppt, UINT32 cPoints);
|
||||
BOOL gdi_PolyPolyline(HGDI_DC hdc, GDI_POINT *lppt, UINT32 *lpdwPolyPoints, DWORD cCount);
|
||||
BOOL gdi_MoveToEx(HGDI_DC hdc, UINT32 X, UINT32 Y, HGDI_POINT lpPoint);
|
||||
FREERDP_LOCAL BOOL gdi_LineTo(HGDI_DC hdc, UINT32 nXEnd, UINT32 nYEnd);
|
||||
FREERDP_LOCAL BOOL gdi_PolylineTo(HGDI_DC hdc, GDI_POINT* lppt, DWORD cCount);
|
||||
FREERDP_LOCAL BOOL gdi_Polyline(HGDI_DC hdc, GDI_POINT* lppt, UINT32 cPoints);
|
||||
FREERDP_LOCAL BOOL gdi_PolyPolyline(HGDI_DC hdc, GDI_POINT* lppt,
|
||||
UINT32* lpdwPolyPoints, DWORD cCount);
|
||||
FREERDP_LOCAL BOOL gdi_MoveToEx(HGDI_DC hdc, UINT32 X, UINT32 Y,
|
||||
HGDI_POINT lpPoint);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_GDI_LINE_H */
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef FREERDP_LOCALE_KEYBOARD_SUN_H
|
||||
#define FREERDP_LOCALE_KEYBOARD_SUN_H
|
||||
|
||||
DWORD freerdp_detect_solaris_keyboard_layout();
|
||||
#include <freerdp/api.h>
|
||||
|
||||
FREERDP_LOCAL DWORD freerdp_detect_solaris_keyboard_layout();
|
||||
|
||||
#endif /* FREERDP_LOCALE_KEYBOARD_SUN_H */
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
#ifndef FREERDP_LOCALE_KEYBOARD_X11_H
|
||||
#define FREERDP_LOCALE_KEYBOARD_X11_H
|
||||
|
||||
int freerdp_detect_keyboard_layout_from_xkb(DWORD* keyboardLayoutId);
|
||||
#include <freerdp/api.h>
|
||||
|
||||
FREERDP_LOCAL int freerdp_detect_keyboard_layout_from_xkb(
|
||||
DWORD* keyboardLayoutId);
|
||||
|
||||
#endif /* FREERDP_LOCALE_KEYBOARD_X11_H */
|
||||
|
||||
@@ -22,10 +22,14 @@
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/locale/keyboard.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
int freerdp_keyboard_init_xkbfile(DWORD* keyboardLayoutId, DWORD x11_keycode_to_rdp_scancode[256]);
|
||||
FREERDP_LOCAL int freerdp_keyboard_init_xkbfile(DWORD* keyboardLayoutId,
|
||||
DWORD x11_keycode_to_rdp_scancode[256]);
|
||||
|
||||
int detect_keyboard_layout_from_xkbfile(void* display, DWORD* keyboardLayoutId);
|
||||
int freerdp_keyboard_load_map_from_xkbfile(void* display, DWORD x11_keycode_to_rdp_scancode[256]);
|
||||
FREERDP_LOCAL int detect_keyboard_layout_from_xkbfile(void* display,
|
||||
DWORD* keyboardLayoutId);
|
||||
FREERDP_LOCAL int freerdp_keyboard_load_map_from_xkbfile(void* display,
|
||||
DWORD x11_keycode_to_rdp_scancode[256]);
|
||||
|
||||
#endif /* __LOCALE_KEYBOARD_XKB_H */
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
#define __FREERDP_XKB_LAYOUT_IDS_H
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/api.h>
|
||||
|
||||
UINT32 find_keyboard_layout_in_xorg_rules(char* layout, char* variant);
|
||||
FREERDP_LOCAL UINT32 find_keyboard_layout_in_xorg_rules(char* layout,
|
||||
char* variant);
|
||||
|
||||
#endif /* __FREERDP_XKB_LAYOUT_IDS_H */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#endif
|
||||
|
||||
#include <freerdp/primitives.h>
|
||||
|
||||
#include <freerdp/api.h>
|
||||
|
||||
/* Use lddqu for unaligned; load for 16-byte aligned. */
|
||||
#define LOAD_SI128(_ptr_) \
|
||||
@@ -35,26 +35,26 @@
|
||||
: _mm_load_si128((__m128i *) (_ptr_)))
|
||||
|
||||
/* Function prototypes for all the init/deinit routines. */
|
||||
extern void primitives_init_copy(primitives_t* prims);
|
||||
extern void primitives_init_set(primitives_t* prims);
|
||||
extern void primitives_init_add(primitives_t* prims);
|
||||
extern void primitives_init_andor(primitives_t* prims);
|
||||
extern void primitives_init_shift(primitives_t* prims);
|
||||
extern void primitives_init_sign(primitives_t* prims);
|
||||
extern void primitives_init_alphaComp(primitives_t* prims);
|
||||
extern void primitives_init_colors(primitives_t* prims);
|
||||
extern void primitives_init_YCoCg(primitives_t* prims);
|
||||
extern void primitives_init_YUV(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_copy(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_set(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_add(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_andor(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_shift(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_sign(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_alphaComp(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_colors(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_YCoCg(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_YUV(primitives_t* prims);
|
||||
|
||||
extern void primitives_init_copy_opt(primitives_t* prims);
|
||||
extern void primitives_init_set_opt(primitives_t* prims);
|
||||
extern void primitives_init_add_opt(primitives_t* prims);
|
||||
extern void primitives_init_andor_opt(primitives_t* prims);
|
||||
extern void primitives_init_shift_opt(primitives_t* prims);
|
||||
extern void primitives_init_sign_opt(primitives_t* prims);
|
||||
extern void primitives_init_alphaComp_opt(primitives_t* prims);
|
||||
extern void primitives_init_colors_opt(primitives_t* prims);
|
||||
extern void primitives_init_YCoCg_opt(primitives_t* prims);
|
||||
extern void primitives_init_YUV_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_copy_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_set_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_add_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_andor_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_shift_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_sign_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_alphaComp_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_colors_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_YCoCg_opt(primitives_t* prims);
|
||||
FREERDP_LOCAL void primitives_init_YUV_opt(primitives_t* prims);
|
||||
|
||||
#endif /* !__PRIM_INTERNAL_H_INCLUDED__ */
|
||||
|
||||
Reference in New Issue
Block a user