FreeRDP
|
#include <freerdp/config.h>
#include <string.h>
#include <stdarg.h>
#include "rdp.h"
#include "input.h"
#include "update.h"
#include "surface.h"
#include "transport.h"
#include "connection.h"
#include "message.h"
#include <freerdp/buildflags.h>
#include "gateway/rpc_fault.h"
#include <winpr/assert.h>
#include <winpr/crt.h>
#include <winpr/string.h>
#include <winpr/stream.h>
#include <winpr/wtsapi.h>
#include <winpr/ssl.h>
#include <winpr/debug.h>
#include <freerdp/freerdp.h>
#include <freerdp/streamdump.h>
#include <freerdp/error.h>
#include <freerdp/event.h>
#include <freerdp/locale/keyboard.h>
#include <freerdp/channels/channels.h>
#include <freerdp/version.h>
#include <freerdp/log.h>
#include <freerdp/utils/signal.h>
#include "../cache/pointer.h"
#include "settings.h"
#include "utils.h"
Macros | |
#define | TAG FREERDP_TAG("core") |
Functions | |
static void | sig_abort_connect (int signum, const char *signame, void *ctx) |
static int | freerdp_connect_begin (freerdp *instance) |
BOOL | freerdp_connect (freerdp *instance) |
BOOL | freerdp_abort_connect (freerdp *instance) |
BOOL | freerdp_abort_connect_context (rdpContext *context) |
BOOL | freerdp_check_fds (freerdp *instance) |
DWORD | freerdp_get_event_handles (rdpContext *context, HANDLE *events, DWORD count) |
BOOL | freerdp_check_event_handles (rdpContext *context) |
wMessageQueue * | freerdp_get_message_queue (freerdp *instance, DWORD id) |
HANDLE | freerdp_get_message_queue_event_handle (freerdp *instance, DWORD id) |
int | freerdp_message_queue_process_message (freerdp *instance, DWORD id, wMessage *message) |
int | freerdp_message_queue_process_pending_messages (freerdp *instance, DWORD id) |
static BOOL | freerdp_send_channel_data (freerdp *instance, UINT16 channelId, const BYTE *data, size_t size) |
static BOOL | freerdp_send_channel_packet (freerdp *instance, UINT16 channelId, size_t totalSize, UINT32 flags, const BYTE *data, size_t chunkSize) |
BOOL | freerdp_disconnect (freerdp *instance) |
BOOL | freerdp_disconnect_before_reconnect (freerdp *instance) |
BOOL | freerdp_disconnect_before_reconnect_context (rdpContext *context) |
BOOL | freerdp_reconnect (freerdp *instance) |
BOOL | freerdp_shall_disconnect (freerdp *instance) |
BOOL | freerdp_shall_disconnect_context (rdpContext *context) |
BOOL | freerdp_focus_required (freerdp *instance) |
void | freerdp_set_focus (freerdp *instance) |
void | freerdp_get_version (int *major, int *minor, int *revision) |
const char * | freerdp_get_version_string (void) |
const char * | freerdp_get_build_config (void) |
const char * | freerdp_get_build_revision (void) |
BOOL | freerdp_context_new (freerdp *instance) |
BOOL | freerdp_context_new_ex (freerdp *instance, rdpSettings *settings) |
BOOL | freerdp_context_reset (freerdp *instance) |
void | freerdp_context_free (freerdp *instance) |
int | freerdp_get_disconnect_ultimatum (rdpContext *context) |
UINT32 | freerdp_error_info (freerdp *instance) |
void | freerdp_set_error_info (rdpRdp *rdp, UINT32 error) |
BOOL | freerdp_send_error_info (rdpRdp *rdp) |
UINT32 | freerdp_get_last_error (rdpContext *context) |
const char * | freerdp_get_last_error_name (UINT32 code) |
const char * | freerdp_get_last_error_string (UINT32 code) |
const char * | freerdp_get_last_error_category (UINT32 code) |
void | freerdp_set_last_error_ex (rdpContext *context, UINT32 lastError, const char *fkt, const char *file, int line) |
const char * | freerdp_get_logon_error_info_type (UINT32 type) |
const char * | freerdp_get_logon_error_info_data (UINT32 data) |
freerdp * | freerdp_new (void) |
void | freerdp_free (freerdp *instance) |
ULONG | freerdp_get_transport_sent (rdpContext *context, BOOL resetCount) |
BOOL | freerdp_nla_impersonate (rdpContext *context) |
BOOL | freerdp_nla_revert_to_self (rdpContext *context) |
UINT32 | freerdp_get_nla_sspi_error (rdpContext *context) |
HANDLE | getChannelErrorEventHandle (rdpContext *context) |
BOOL | checkChannelErrorEvent (rdpContext *context) |
UINT | getChannelError (rdpContext *context) |
const char * | getChannelErrorDescription (rdpContext *context) |
void | clearChannelError (rdpContext *context) |
void | setChannelError (rdpContext *context, UINT errorNum, const char *format,...) |
const char * | freerdp_nego_get_routing_token (rdpContext *context, DWORD *length) |
BOOL | freerdp_io_callback_set_event (rdpContext *context, BOOL set) |
const rdpTransportIo * | freerdp_get_io_callbacks (rdpContext *context) |
BOOL | freerdp_set_io_callbacks (rdpContext *context, const rdpTransportIo *io_callbacks) |
BOOL | freerdp_set_io_callback_context (rdpContext *context, void *usercontext) |
void * | freerdp_get_io_callback_context (rdpContext *context) |
CONNECTION_STATE | freerdp_get_state (const rdpContext *context) |
returns the current CONNECTION_STATE of the context. More... | |
const char * | freerdp_state_string (CONNECTION_STATE state) |
returns a string representation of a CONNECTION_STATE More... | |
BOOL | freerdp_is_active_state (const rdpContext *context) |
Queries if the current CONNECTION_STATE of the context is an active connection. More... | |
BOOL | freerdp_channels_from_mcs (rdpSettings *settings, const rdpContext *context) |
HANDLE | freerdp_abort_event (rdpContext *context) |
static void | test_mcs_free (rdpMcs *mcs) |
static rdpMcs * | test_mcs_new (void) |
BOOL | freerdp_is_valid_mcs_create_request (const BYTE *data, size_t size) |
BOOL | freerdp_is_valid_mcs_create_response (const BYTE *data, size_t size) |
Variables | |
static wEventType | FreeRDP_Events [] |
#define TAG FREERDP_TAG("core") |
FreeRDP: A Remote Desktop Protocol Implementation FreeRDP Core
Copyright 2011 Marc-Andre Moreau marca Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger ndre .more au@g mail. commarti n.ha imber ger@ thinc ast. com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
BOOL checkChannelErrorEvent | ( | rdpContext * | context | ) |
void clearChannelError | ( | rdpContext * | context | ) |
BOOL freerdp_abort_connect | ( | freerdp * | instance | ) |
BOOL freerdp_abort_connect_context | ( | rdpContext * | context | ) |
HANDLE freerdp_abort_event | ( | rdpContext * | context | ) |
BOOL freerdp_channels_from_mcs | ( | rdpSettings * | settings, |
const rdpContext * | context | ||
) |
BOOL freerdp_check_event_handles | ( | rdpContext * | context | ) |
BOOL freerdp_check_fds | ( | freerdp * | instance | ) |
BOOL freerdp_connect | ( | freerdp * | instance | ) |
|
static |
Creates a new connection based on the settings found in the "instance" parameter It will use the callbacks registered on the structure to process the pre/post connect operations that the caller requires.
instance | - pointer to a rdp_freerdp structure that contains base information to establish the connection. On return, this function will be initialized with the new connection's settings. |
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. |
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. |
BOOL freerdp_context_new_ex | ( | freerdp * | instance, |
rdpSettings * | settings | ||
) |
BOOL freerdp_context_reset | ( | freerdp * | instance | ) |
BOOL freerdp_disconnect | ( | freerdp * | instance | ) |
BOOL freerdp_disconnect_before_reconnect | ( | freerdp * | instance | ) |
BOOL freerdp_disconnect_before_reconnect_context | ( | rdpContext * | context | ) |
UINT32 freerdp_error_info | ( | freerdp * | instance | ) |
BOOL freerdp_focus_required | ( | freerdp * | instance | ) |
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. |
const char* freerdp_get_build_config | ( | void | ) |
const char* freerdp_get_build_revision | ( | void | ) |
int freerdp_get_disconnect_ultimatum | ( | rdpContext * | context | ) |
DWORD freerdp_get_event_handles | ( | rdpContext * | context, |
HANDLE * | events, | ||
DWORD | count | ||
) |
void* freerdp_get_io_callback_context | ( | rdpContext * | context | ) |
const rdpTransportIo* freerdp_get_io_callbacks | ( | rdpContext * | context | ) |
UINT32 freerdp_get_last_error | ( | rdpContext * | context | ) |
const char* freerdp_get_last_error_category | ( | UINT32 | code | ) |
const char* freerdp_get_last_error_name | ( | UINT32 | code | ) |
const char* freerdp_get_last_error_string | ( | UINT32 | code | ) |
const char* freerdp_get_logon_error_info_data | ( | UINT32 | data | ) |
const char* freerdp_get_logon_error_info_type | ( | UINT32 | type | ) |
wMessageQueue* freerdp_get_message_queue | ( | freerdp * | instance, |
DWORD | id | ||
) |
HANDLE freerdp_get_message_queue_event_handle | ( | freerdp * | instance, |
DWORD | id | ||
) |
UINT32 freerdp_get_nla_sspi_error | ( | rdpContext * | context | ) |
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 |
ULONG freerdp_get_transport_sent | ( | rdpContext * | context, |
BOOL | resetCount | ||
) |
void freerdp_get_version | ( | int * | major, |
int * | minor, | ||
int * | revision | ||
) |
const char* freerdp_get_version_string | ( | void | ) |
BOOL freerdp_io_callback_set_event | ( | rdpContext * | context, |
BOOL | set | ||
) |
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 |
BOOL freerdp_is_valid_mcs_create_request | ( | const BYTE * | data, |
size_t | size | ||
) |
BOOL freerdp_is_valid_mcs_create_response | ( | const BYTE * | data, |
size_t | size | ||
) |
int freerdp_message_queue_process_message | ( | freerdp * | instance, |
DWORD | id, | ||
wMessage * | message | ||
) |
int freerdp_message_queue_process_pending_messages | ( | freerdp * | instance, |
DWORD | id | ||
) |
const char* freerdp_nego_get_routing_token | ( | rdpContext * | context, |
DWORD * | length | ||
) |
freerdp* freerdp_new | ( | void | ) |
Allocator function for the rdp_freerdp structure.
BOOL freerdp_nla_impersonate | ( | rdpContext * | context | ) |
BOOL freerdp_nla_revert_to_self | ( | rdpContext * | context | ) |
BOOL freerdp_reconnect | ( | freerdp * | instance | ) |
|
static |
|
static |
BOOL freerdp_send_error_info | ( | rdpRdp * | rdp | ) |
void freerdp_set_error_info | ( | rdpRdp * | rdp, |
UINT32 | error | ||
) |
void freerdp_set_focus | ( | freerdp * | instance | ) |
BOOL freerdp_set_io_callback_context | ( | rdpContext * | context, |
void * | usercontext | ||
) |
BOOL freerdp_set_io_callbacks | ( | rdpContext * | context, |
const rdpTransportIo * | io_callbacks | ||
) |
void freerdp_set_last_error_ex | ( | rdpContext * | context, |
UINT32 | lastError, | ||
const char * | fkt, | ||
const char * | file, | ||
int | line | ||
) |
BOOL freerdp_shall_disconnect | ( | freerdp * | instance | ) |
BOOL freerdp_shall_disconnect_context | ( | rdpContext * | context | ) |
const char* freerdp_state_string | ( | CONNECTION_STATE | state | ) |
returns a string representation of a CONNECTION_STATE
state | the CONNECTION_STATE to stringify |
UINT getChannelError | ( | rdpContext * | context | ) |
Function description
const char* getChannelErrorDescription | ( | rdpContext * | context | ) |
HANDLE getChannelErrorEventHandle | ( | rdpContext * | context | ) |
void setChannelError | ( | rdpContext * | context, |
UINT | errorNum, | ||
const char * | format, | ||
... | |||
) |
|
static |
|
static |
|
static |
|
static |