FreeRDP
|
#include <winpr/stream.h>
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/error.h>
#include <freerdp/event.h>
#include <freerdp/settings.h>
#include <freerdp/gdi/gdi.h>
#include <freerdp/codecs.h>
#include <freerdp/metrics.h>
#include <freerdp/extension.h>
#include <freerdp/heartbeat.h>
#include <freerdp/message.h>
#include <freerdp/autodetect.h>
#include <freerdp/streamdump.h>
#include <freerdp/utils/smartcardlogon.h>
#include <freerdp/update.h>
#include <freerdp/input.h>
#include <freerdp/graphics.h>
#include <freerdp/client.h>
Data Structures | |
struct | rdpContext |
struct | freerdp |
struct | rdpChannelHandles |
Macros | |
#define | MCS_BASE_CHANNEL_ID 1001 |
#define | MCS_GLOBAL_CHANNEL_ID 1003 |
#define | VERIFY_CERT_FLAG_NONE 0x00 |
#define | VERIFY_CERT_FLAG_LEGACY 0x02 |
#define | VERIFY_CERT_FLAG_REDIRECT 0x10 |
#define | VERIFY_CERT_FLAG_GATEWAY 0x20 |
#define | VERIFY_CERT_FLAG_CHANGED 0x40 |
#define | VERIFY_CERT_FLAG_MISMATCH 0x80 |
#define | VERIFY_CERT_FLAG_MATCH_LEGACY_SHA1 0x100 |
#define | VERIFY_CERT_FLAG_FP_IS_PEM 0x200 |
#define | GATEWAY_MESSAGE_CONSENT 1 |
#define | GATEWAY_MESSAGE_SERVICE 2 |
#define | freerdp_set_last_error(context, lastError) freerdp_set_last_error_ex((context), (lastError), __func__, __FILE__, __LINE__) |
#define | freerdp_set_last_error_if_not(context, lastError) |
#define | freerdp_set_last_error_log(context, lastError) freerdp_set_last_error_ex((context), (lastError), __func__, __FILE__, __LINE__) |
Typedefs | |
typedef struct rdp_rail | rdpRail |
typedef RDP_CLIENT_ENTRY_POINTS_V1 | RDP_CLIENT_ENTRY_POINTS |
typedef BOOL(* | pContextNew) (freerdp *instance, rdpContext *context) |
typedef void(* | pContextFree) (freerdp *instance, rdpContext *context) |
typedef BOOL(* | pConnectCallback) (freerdp *instance) |
typedef void(* | pPostDisconnect) (freerdp *instance) |
typedef BOOL(* | pAuthenticate) (freerdp *instance, char **username, char **password, char **domain) |
Authentication callback function pointer definition. More... | |
typedef BOOL(* | pAuthenticateEx) (freerdp *instance, char **username, char **password, char **domain, rdp_auth_reason reason) |
Extended authentication callback function pointer definition. More... | |
typedef BOOL(* | pChooseSmartcard) (freerdp *instance, SmartcardCertInfo **cert_list, DWORD count, DWORD *choice, BOOL gateway) |
typedef BOOL(* | pGetAccessToken) (freerdp *instance, AccessTokenType tokenType, char **token, size_t count,...) |
typedef SSIZE_T(* | pRetryDialog) (freerdp *instance, const char *what, size_t current, void *userarg) |
Callback used to inform about a reconnection attempt. More... | |
typedef DWORD(* | pVerifyCertificateEx) (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *fingerprint, DWORD flags) |
Callback used if user interaction is required to accept an unknown certificate. More... | |
typedef DWORD(* | pVerifyChangedCertificateEx) (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *new_fingerprint, const char *old_subject, const char *old_issuer, const char *old_fingerprint, DWORD flags) |
Callback used if user interaction is required to accept a changed certificate. More... | |
typedef int(* | pVerifyX509Certificate) (freerdp *instance, const BYTE *data, size_t length, const char *hostname, UINT16 port, DWORD flags) |
Callback used if user interaction is required to accept a certificate. More... | |
typedef int(* | pLogonErrorInfo) (freerdp *instance, UINT32 data, UINT32 type) |
typedef BOOL(* | pSendChannelData) (freerdp *instance, UINT16 channelId, const BYTE *data, size_t size) |
typedef BOOL(* | pSendChannelPacket) (freerdp *instance, UINT16 channelId, size_t totalSize, UINT32 flags, const BYTE *data, size_t chunkSize) |
typedef BOOL(* | pReceiveChannelData) (freerdp *instance, UINT16 channelId, const BYTE *data, size_t size, UINT32 flags, size_t totalSize) |
typedef BOOL(* | pPresentGatewayMessage) (freerdp *instance, UINT32 type, BOOL isDisplayMandatory, BOOL isConsentMandatory, size_t length, const WCHAR *message) |
Enumerations | |
enum | rdp_auth_reason { AUTH_NLA , AUTH_TLS , AUTH_RDP , GW_AUTH_HTTP , GW_AUTH_RDG , GW_AUTH_RPC , AUTH_SMARTCARD_PIN } |
enum | AccessTokenType { ACCESS_TOKEN_TYPE_AAD , ACCESS_TOKEN_TYPE_AVD } |
enum | Disconnect_Ultimatum { Disconnect_Ultimatum_domain_disconnected = 0 , Disconnect_Ultimatum_provider_initiated = 1 , Disconnect_Ultimatum_token_purged = 2 , Disconnect_Ultimatum_user_requested = 3 , Disconnect_Ultimatum_channel_purged = 4 } |
#define freerdp_set_last_error | ( | context, | |
lastError | |||
) | freerdp_set_last_error_ex((context), (lastError), __func__, __FILE__, __LINE__) |
#define freerdp_set_last_error_if_not | ( | context, | |
lastError | |||
) |
#define freerdp_set_last_error_log | ( | context, | |
lastError | |||
) | freerdp_set_last_error_ex((context), (lastError), __func__, __FILE__, __LINE__) |
#define GATEWAY_MESSAGE_CONSENT 1 |
#define GATEWAY_MESSAGE_SERVICE 2 |
#define MCS_BASE_CHANNEL_ID 1001 |
#define MCS_GLOBAL_CHANNEL_ID 1003 |
#define VERIFY_CERT_FLAG_CHANGED 0x40 |
#define VERIFY_CERT_FLAG_FP_IS_PEM 0x200 |
#define VERIFY_CERT_FLAG_GATEWAY 0x20 |
#define VERIFY_CERT_FLAG_LEGACY 0x02 |
#define VERIFY_CERT_FLAG_MATCH_LEGACY_SHA1 0x100 |
#define VERIFY_CERT_FLAG_MISMATCH 0x80 |
#define VERIFY_CERT_FLAG_NONE 0x00 |
#define VERIFY_CERT_FLAG_REDIRECT 0x10 |
typedef BOOL(* pAuthenticate) (freerdp *instance, char **username, char **password, char **domain) |
Authentication callback function pointer definition.
instance | A pointer to the instance to work on |
username | A pointer to the username string. On input the current username, on output the username that should be used. Must not be NULL. |
password | A pointer to the password string. On input the current password, on output the password that sohould be used. Must not be NULL. |
domain | A pointer to the domain string. On input the current domain, on output the domain that sohould be used. Must not be NULL. |
typedef BOOL(* pAuthenticateEx) (freerdp *instance, char **username, char **password, char **domain, rdp_auth_reason reason) |
Extended authentication callback function pointer definition.
instance | A pointer to the instance to work on |
username | A pointer to the username string. On input the current username, on output the username that should be used. Must not be NULL. |
password | A pointer to the password string. On input the current password, on output the password that sohould be used. Must not be NULL. |
domain | A pointer to the domain string. On input the current domain, on output the domain that sohould be used. Must not be NULL. |
reason | The reason the callback was called. (e.g. NLA, TLS, RDP, GATEWAY, ...) |
typedef BOOL(* pChooseSmartcard) (freerdp *instance, SmartcardCertInfo **cert_list, DWORD count, DWORD *choice, BOOL gateway) |
typedef BOOL(* pConnectCallback) (freerdp *instance) |
typedef BOOL(* pGetAccessToken) (freerdp *instance, AccessTokenType tokenType, char **token, size_t count,...) |
typedef void(* pPostDisconnect) (freerdp *instance) |
typedef BOOL(* pPresentGatewayMessage) (freerdp *instance, UINT32 type, BOOL isDisplayMandatory, BOOL isConsentMandatory, size_t length, const WCHAR *message) |
typedef BOOL(* pReceiveChannelData) (freerdp *instance, UINT16 channelId, const BYTE *data, size_t size, UINT32 flags, size_t totalSize) |
typedef SSIZE_T(* pRetryDialog) (freerdp *instance, const char *what, size_t current, void *userarg) |
Callback used to inform about a reconnection attempt.
instance | The instance the information is for |
what | A '\0' terminated string describing the module attempting to retry an operation |
current | The current reconnection attempt, the first attempt will always have the value 0 |
userarg | An optional custom argument |
typedef BOOL(* pSendChannelData) (freerdp *instance, UINT16 channelId, const BYTE *data, size_t size) |
typedef BOOL(* pSendChannelPacket) (freerdp *instance, UINT16 channelId, size_t totalSize, UINT32 flags, const BYTE *data, size_t chunkSize) |
typedef DWORD(* pVerifyCertificateEx) (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *fingerprint, DWORD flags) |
Callback used if user interaction is required to accept an unknown certificate.
common_name | The certificate registered hostname. |
subject | The common name of the certificate. |
issuer | The issuer of the certificate. |
fingerprint | The fingerprint of the certificate (old) or the certificate in PEM format |
host_mismatch | A flag indicating the certificate subject does not match the host connecting to. |
Callback used if user interaction is required to accept an unknown certificate.
host | The hostname connecting to. |
port | The port connecting to. |
common_name | The certificate registered hostname. |
subject | The common name of the certificate. |
issuer | The issuer of the certificate. |
fingerprint | The fingerprint of the certificate (old) or the certificate in PEM format (VERIFY_CERT_FLAG_FP_IS_PEM set) |
flags | Flags of type VERIFY_CERT_FLAG* |
typedef DWORD(* pVerifyChangedCertificateEx) (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *new_fingerprint, const char *old_subject, const char *old_issuer, const char *old_fingerprint, DWORD flags) |
Callback used if user interaction is required to accept a changed certificate.
common_name | The certificate registered hostname. |
subject | The common name of the new certificate. |
issuer | The issuer of the new certificate. |
new_fingerprint | The fingerprint of the new certificate. |
old_subject | The common name of the old certificate. |
old_issuer | The issuer of the new certificate. |
old_fingerprint | The fingerprint of the old certificate. |
Callback used if user interaction is required to accept a changed certificate.
host | The hostname connecting to. |
port | The port connecting to. |
common_name | The certificate registered hostname. |
subject | The common name of the new certificate. |
issuer | The issuer of the new certificate. |
new_fingerprint | The fingerprint of the new certificate (old) or the certificate in PEM format (VERIFY_CERT_FLAG_FP_IS_PEM set) |
old_subject | The common name of the old certificate. |
old_issuer | The issuer of the new certificate. |
old_fingerprint | The fingerprint of the old certificate (old) or the certificate in PEM format (VERIFY_CERT_FLAG_FP_IS_PEM set) |
flags | Flags of type VERIFY_CERT_FLAG* |
typedef int(* pVerifyX509Certificate) (freerdp *instance, const BYTE *data, size_t length, const char *hostname, UINT16 port, DWORD flags) |
Callback used if user interaction is required to accept a certificate.
instance | Pointer to the freerdp instance. |
data | Pointer to certificate data (full chain) in PEM format. |
length | The length of the certificate data. |
hostname | The hostname connecting to. |
port | The port connecting to. |
flags | Flags of type VERIFY_CERT_FLAG* |
typedef RDP_CLIENT_ENTRY_POINTS_V1 RDP_CLIENT_ENTRY_POINTS |
typedef struct rdp_rail rdpRail |
enum AccessTokenType |
enum Disconnect_Ultimatum |
enum rdp_auth_reason |
FREERDP_API BOOL checkChannelErrorEvent | ( | rdpContext * | context | ) |
FREERDP_API void clearChannelError | ( | rdpContext * | context | ) |
FREERDP_API BOOL freerdp_abort_connect_context | ( | rdpContext * | context | ) |
FREERDP_API HANDLE freerdp_abort_event | ( | rdpContext * | context | ) |
FREERDP_API UINT freerdp_channels_attach | ( | freerdp * | instance | ) |
FREERDP_API UINT freerdp_channels_detach | ( | freerdp * | instance | ) |
FREERDP_API BOOL freerdp_channels_from_mcs | ( | rdpSettings * | settings, |
const rdpContext * | context | ||
) |
FREERDP_API BOOL freerdp_check_event_handles | ( | rdpContext * | context | ) |
FREERDP_API BOOL freerdp_check_fds | ( | freerdp * | instance | ) |
FREERDP_API BOOL freerdp_connect | ( | freerdp * | instance | ) |
FREERDP_API void freerdp_context_free | ( | freerdp * | instance | ) |
Deallocator function for a rdp context. The function will deallocate the resources from the 'instance' parameter that were allocated from a call to freerdp_context_new(). If the ContextFree callback is set in the 'instance' parameter, it will be called before deallocation occurs.
instance | - Pointer to the rdp_freerdp structure that was initialized by a call to freerdp_context_new(). On return, the fields associated to the context are invalid. |
FREERDP_API BOOL freerdp_context_new | ( | freerdp * | instance | ) |
Allocator function for a rdp context. The function will allocate a rdpRdp structure using rdp_new(), then copy its contents to the appropriate fields in the rdp_freerdp structure given in parameters. It will also initialize the 'context' field in the rdp_freerdp structure as needed. If the caller has set the ContextNew callback in the 'instance' parameter, it will be called at the end of the function.
instance | - Pointer to the rdp_freerdp structure that will be initialized with the new context. |
FREERDP_API BOOL freerdp_context_new_ex | ( | freerdp * | instance, |
rdpSettings * | settings | ||
) |
FREERDP_API BOOL freerdp_context_reset | ( | freerdp * | instance | ) |
FREERDP_API BOOL freerdp_disconnect | ( | freerdp * | instance | ) |
FREERDP_API BOOL freerdp_disconnect_before_reconnect_context | ( | rdpContext * | context | ) |
FREERDP_API UINT32 freerdp_error_info | ( | freerdp * | instance | ) |
FREERDP_API BOOL freerdp_focus_required | ( | freerdp * | instance | ) |
FREERDP_API void freerdp_free | ( | freerdp * | instance | ) |
Deallocator function for the rdp_freerdp structure.
instance | - pointer to the rdp_freerdp structure to deallocate. On return, this pointer is not valid anymore. |
FREERDP_API const char* freerdp_get_build_config | ( | void | ) |
FREERDP_API const char* freerdp_get_build_revision | ( | void | ) |
FREERDP_API int freerdp_get_disconnect_ultimatum | ( | rdpContext * | context | ) |
FREERDP_API DWORD freerdp_get_event_handles | ( | rdpContext * | context, |
HANDLE * | events, | ||
DWORD | count | ||
) |
FREERDP_API UINT32 freerdp_get_last_error | ( | rdpContext * | context | ) |
FREERDP_API const char* freerdp_get_last_error_category | ( | UINT32 | error | ) |
FREERDP_API const char* freerdp_get_last_error_name | ( | UINT32 | error | ) |
FREERDP_API const char* freerdp_get_last_error_string | ( | UINT32 | error | ) |
FREERDP_API const char* freerdp_get_logon_error_info_data | ( | UINT32 | data | ) |
FREERDP_API const char* freerdp_get_logon_error_info_data_ex | ( | UINT32 | data, |
char * | buffer, | ||
size_t | size | ||
) |
FREERDP_API const char* freerdp_get_logon_error_info_type | ( | UINT32 | type | ) |
FREERDP_API const char* freerdp_get_logon_error_info_type_ex | ( | UINT32 | type, |
char * | buffer, | ||
size_t | size | ||
) |
FREERDP_API wMessageQueue* freerdp_get_message_queue | ( | freerdp * | instance, |
DWORD | id | ||
) |
FREERDP_API HANDLE freerdp_get_message_queue_event_handle | ( | freerdp * | instance, |
DWORD | id | ||
) |
FREERDP_API UINT32 freerdp_get_nla_sspi_error | ( | rdpContext * | context | ) |
FREERDP_API CONNECTION_STATE freerdp_get_state | ( | const rdpContext * | context | ) |
returns the current CONNECTION_STATE of the context.
context | A pointer to the context to query state |
FREERDP_API BOOL freerdp_get_stats | ( | rdpRdp * | rdp, |
UINT64 * | inBytes, | ||
UINT64 * | outBytes, | ||
UINT64 * | inPackets, | ||
UINT64 * | outPackets | ||
) |
FREERDP_API ULONG freerdp_get_transport_sent | ( | rdpContext * | context, |
BOOL | resetCount | ||
) |
FREERDP_API void freerdp_get_version | ( | int * | major, |
int * | minor, | ||
int * | revision | ||
) |
FREERDP_API const char* freerdp_get_version_string | ( | void | ) |
FREERDP_API BOOL freerdp_is_active_state | ( | const rdpContext * | context | ) |
Queries if the current CONNECTION_STATE of the context is an active connection.
A connection is active, if the connection sequence has been passed, no disconnection requests have been received and no network or other errors have forced a disconnect.
context | A pointer to the context to query state |
FREERDP_API BOOL freerdp_is_valid_mcs_create_request | ( | const BYTE * | data, |
size_t | size | ||
) |
FREERDP_API BOOL freerdp_is_valid_mcs_create_response | ( | const BYTE * | data, |
size_t | size | ||
) |
FREERDP_API int freerdp_message_queue_process_message | ( | freerdp * | instance, |
DWORD | id, | ||
wMessage * | message | ||
) |
FREERDP_API int freerdp_message_queue_process_pending_messages | ( | freerdp * | instance, |
DWORD | id | ||
) |
FREERDP_API const char* freerdp_nego_get_routing_token | ( | rdpContext * | context, |
DWORD * | length | ||
) |
FREERDP_API freerdp* freerdp_new | ( | void | ) |
Allocator function for the rdp_freerdp structure.
FREERDP_API BOOL freerdp_nla_impersonate | ( | rdpContext * | context | ) |
FREERDP_API BOOL freerdp_nla_revert_to_self | ( | rdpContext * | context | ) |
FREERDP_API BOOL freerdp_reconnect | ( | freerdp * | instance | ) |
FREERDP_API BOOL freerdp_send_error_info | ( | rdpRdp * | rdp | ) |
FREERDP_API void freerdp_set_error_info | ( | rdpRdp * | rdp, |
UINT32 | error | ||
) |
FREERDP_API void freerdp_set_focus | ( | freerdp * | instance | ) |
FREERDP_API void freerdp_set_last_error_ex | ( | rdpContext * | context, |
UINT32 | lastError, | ||
const char * | fkt, | ||
const char * | file, | ||
int | line | ||
) |
FREERDP_API BOOL freerdp_shall_disconnect_context | ( | const rdpContext * | context | ) |
FREERDP_API const char* freerdp_state_string | ( | CONNECTION_STATE | state | ) |
returns a string representation of a CONNECTION_STATE
state | the CONNECTION_STATE to stringify |
FREERDP_API UINT getChannelError | ( | rdpContext * | context | ) |
Function description
FREERDP_API const char* getChannelErrorDescription | ( | rdpContext * | context | ) |
FREERDP_API HANDLE getChannelErrorEventHandle | ( | rdpContext * | context | ) |
FREERDP_API void setChannelError | ( | rdpContext * | context, |
UINT | errorNum, | ||
const char * | format, | ||
... | |||
) |
WINPR_DEPRECATED_VAR | ( | "use freerdp_abort_connect_context instead" | , |
FREERDP_API BOOL | freerdp_abort_connectfreerdp *instance | ||
) |
WINPR_DEPRECATED_VAR | ( | "use freerdp_disconnect_before_reconnect_context instead" | , |
FREERDP_API BOOL | freerdp_disconnect_before_reconnectfreerdp *instance | ||
) |
WINPR_DEPRECATED_VAR | ( | "use freerdp_shall_disconnect_context instead" | , |
FREERDP_API BOOL | freerdp_shall_disconnectfreerdp *instance | ||
) |