FreeRDP
pf_client.c File Reference
#include <freerdp/freerdp.h>
#include <freerdp/gdi/gdi.h>
#include <freerdp/client/cmdline.h>
#include "pf_channels.h"
#include "pf_gdi.h"
#include "pf_graphics.h"
#include "pf_client.h"
#include "pf_context.h"
#include "pf_update.h"
#include "pf_log.h"
#include "pf_modules.h"
#include "pf_input.h"

Macros

#define TAG   PROXY_TAG("client")
 

Functions

static BOOL proxy_server_reactivate (rdpContext *ps, const rdpContext *pc)
 
static void pf_client_on_error_info (void *ctx, ErrorInfoEventArgs *e)
 
static void pf_client_on_activated (void *ctx, ActivatedEventArgs *e)
 
static BOOL pf_client_load_rdpsnd (pClientContext *pc)
 
static BOOL pf_client_passthrough_channels_init (pClientContext *pc)
 
static BOOL pf_client_use_peer_load_balance_info (pClientContext *pc)
 
static BOOL pf_client_pre_connect (freerdp *instance)
 
static BOOL pf_client_receive_channel_data_hook (freerdp *instance, UINT16 channelId, const BYTE *data, size_t size, UINT32 flags, size_t totalSize)
 
static BOOL pf_client_on_server_heartbeat (freerdp *instance, BYTE period, BYTE count1, BYTE count2)
 
static BOOL pf_client_post_connect (freerdp *instance)
 
static void pf_client_post_disconnect (freerdp *instance)
 
static BOOL pf_client_should_retry_without_nla (pClientContext *pc)
 
static void pf_client_set_security_settings (pClientContext *pc)
 
static BOOL pf_client_connect_without_nla (pClientContext *pc)
 
static BOOL pf_client_connect (freerdp *instance)
 
static DWORD WINAPI pf_client_thread_proc (LPVOID arg)
 
static int pf_logon_error_info (freerdp *instance, UINT32 data, UINT32 type)
 
static DWORD pf_client_verify_certificate_ex (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *fingerprint, DWORD flags)
 
static DWORD pf_client_verify_changed_certificate_ex (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *fingerprint, const char *old_subject, const char *old_issuer, const char *old_fingerprint, DWORD flags)
 
static void pf_client_context_free (freerdp *instance, rdpContext *context)
 
static BOOL pf_client_client_new (freerdp *instance, rdpContext *context)
 
static int pf_client_client_stop (rdpContext *context)
 
int RdpClientEntry (RDP_CLIENT_ENTRY_POINTS *pEntryPoints)
 
DWORD WINAPI pf_client_start (LPVOID arg)
 

Variables

static pReceiveChannelData client_receive_channel_data_original = NULL
 

Macro Definition Documentation

◆ TAG

#define TAG   PROXY_TAG("client")

FreeRDP: A Remote Desktop Protocol Implementation FreeRDP Proxy Server

Copyright 2019 Mati Shabtay matis.nosp@m.habt.nosp@m.ay@gm.nosp@m.ail..nosp@m.com Copyright 2019 Kobi Mizrachi kmizr.nosp@m.achi.nosp@m.18@gm.nosp@m.ail..nosp@m.com Copyright 2019 Idan Freiberg speid.nosp@m.y@gm.nosp@m.ail.c.nosp@m.om

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.

Function Documentation

◆ pf_client_client_new()

static BOOL pf_client_client_new ( freerdp *  instance,
rdpContext *  context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_client_stop()

static int pf_client_client_stop ( rdpContext *  context)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_connect()

static BOOL pf_client_connect ( freerdp *  instance)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_connect_without_nla()

static BOOL pf_client_connect_without_nla ( pClientContext *  pc)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_context_free()

static void pf_client_context_free ( freerdp *  instance,
rdpContext *  context 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_load_rdpsnd()

static BOOL pf_client_load_rdpsnd ( pClientContext *  pc)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_on_activated()

static void pf_client_on_activated ( void *  ctx,
ActivatedEventArgs *  e 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_on_error_info()

static void pf_client_on_error_info ( void *  ctx,
ErrorInfoEventArgs *  e 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_on_server_heartbeat()

static BOOL pf_client_on_server_heartbeat ( freerdp *  instance,
BYTE  period,
BYTE  count1,
BYTE  count2 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_passthrough_channels_init()

static BOOL pf_client_passthrough_channels_init ( pClientContext *  pc)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_post_connect()

static BOOL pf_client_post_connect ( freerdp *  instance)
static

Called after a RDP connection was successfully established. Settings might have changed during negotiation of client / server feature support.

Set up local framebuffers and painting callbacks. If required, register pointer callbacks to change the local mouse cursor when hovering over the RDP window

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_post_disconnect()

static void pf_client_post_disconnect ( freerdp *  instance)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_pre_connect()

static BOOL pf_client_pre_connect ( freerdp *  instance)
static

Register the channel listeners. They are required to set up / tear down channels if they are loaded.

Load all required plugins / channels / libraries specified by current settings.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_receive_channel_data_hook()

static BOOL pf_client_receive_channel_data_hook ( freerdp *  instance,
UINT16  channelId,
const BYTE data,
size_t  size,
UINT32  flags,
size_t  totalSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_set_security_settings()

static void pf_client_set_security_settings ( pClientContext *  pc)
static
Here is the caller graph for this function:

◆ pf_client_should_retry_without_nla()

static BOOL pf_client_should_retry_without_nla ( pClientContext *  pc)
static
Here is the caller graph for this function:

◆ pf_client_start()

DWORD WINAPI pf_client_start ( LPVOID  arg)

Starts running a client connection towards target server.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_thread_proc()

static DWORD WINAPI pf_client_thread_proc ( LPVOID  arg)
static

RDP main loop. Connects RDP, loops while running and handles event and dispatch, cleans up after the connection ends.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_use_peer_load_balance_info()

static BOOL pf_client_use_peer_load_balance_info ( pClientContext *  pc)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_verify_certificate_ex()

static DWORD pf_client_verify_certificate_ex ( freerdp *  instance,
const char *  host,
UINT16  port,
const char *  common_name,
const char *  subject,
const char *  issuer,
const char *  fingerprint,
DWORD  flags 
)
static

Callback set in the rdp_freerdp structure, and used to make a certificate validation when the connection requires it. This function will actually be called by tls_verify_certificate().

See also
rdp_client_connect() and tls_connect()
Parameters
instancepointer to the rdp_freerdp structure that contains the connection settings
hostThe host currently connecting to
portThe port currently connecting to
common_nameThe common name of the certificate, should match host or an alias of it
subjectThe subject of the certificate
issuerThe certificate issuer name
fingerprintThe fingerprint of the certificate
flagsSee VERIFY_CERT_FLAG_* for possible values.
Returns
1 if the certificate is trusted, 2 if temporary trusted, 0 otherwise.
Here is the caller graph for this function:

◆ pf_client_verify_changed_certificate_ex()

static DWORD pf_client_verify_changed_certificate_ex ( freerdp *  instance,
const char *  host,
UINT16  port,
const char *  common_name,
const char *  subject,
const char *  issuer,
const char *  fingerprint,
const char *  old_subject,
const char *  old_issuer,
const char *  old_fingerprint,
DWORD  flags 
)
static

Callback set in the rdp_freerdp structure, and used to make a certificate validation when a stored certificate does not match the remote counterpart. This function will actually be called by tls_verify_certificate().

See also
rdp_client_connect() and tls_connect()
Parameters
instancepointer to the rdp_freerdp structure that contains the connection settings
hostThe host currently connecting to
portThe port currently connecting to
common_nameThe common name of the certificate, should match host or an alias of it
subjectThe subject of the certificate
issuerThe certificate issuer name
fingerprintThe fingerprint of the certificate
old_subjectThe subject of the previous certificate
old_issuerThe previous certificate issuer name
old_fingerprintThe fingerprint of the previous certificate
flagsSee VERIFY_CERT_FLAG_* for possible values.
Returns
1 if the certificate is trusted, 2 if temporary trusted, 0 otherwise.
Here is the caller graph for this function:

◆ pf_logon_error_info()

static int pf_logon_error_info ( freerdp *  instance,
UINT32  data,
UINT32  type 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ proxy_server_reactivate()

static BOOL proxy_server_reactivate ( rdpContext *  ps,
const rdpContext *  pc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RdpClientEntry()

int RdpClientEntry ( RDP_CLIENT_ENTRY_POINTS pEntryPoints)

Client Interface

Here is the call graph for this function:

Variable Documentation

◆ client_receive_channel_data_original

pReceiveChannelData client_receive_channel_data_original = NULL
static