FreeRDP
pf_client.c File Reference
#include <freerdp/config.h>
#include <freerdp/freerdp.h>
#include <freerdp/gdi/gdi.h>
#include <freerdp/client/cmdline.h>
#include <freerdp/server/proxy/proxy_log.h>
#include <freerdp/channels/drdynvc.h>
#include <freerdp/channels/encomsp.h>
#include <freerdp/channels/rdpdr.h>
#include <freerdp/channels/rdpsnd.h>
#include <freerdp/channels/cliprdr.h>
#include <freerdp/channels/channels.h>
#include "pf_client.h"
#include "pf_channel.h"
#include <freerdp/server/proxy/proxy_context.h>
#include "pf_update.h"
#include "pf_input.h"
#include <freerdp/server/proxy/proxy_config.h>
#include "proxy_modules.h"
#include "pf_utils.h"
#include "channels/pf_channel_rdpdr.h"
#include "channels/pf_channel_smartcard.h"

Macros

#define TAG   PROXY_TAG("client")
 

Functions

static void channel_data_free (void *obj)
 
static BOOL proxy_server_reactivate (rdpContext *ps, const rdpContext *pc)
 
static void pf_client_on_error_info (void *ctx, const ErrorInfoEventArgs *e)
 
static void pf_client_on_activated (void *ctx, const ActivatedEventArgs *e)
 
static BOOL pf_client_load_rdpsnd (pClientContext *pc)
 
static BOOL pf_client_use_peer_load_balance_info (pClientContext *pc)
 
static BOOL str_is_empty (const char *str)
 
static BOOL pf_client_use_proxy_smartcard_auth (const rdpSettings *settings)
 
static BOOL freerdp_client_load_static_channel_addin (rdpChannels *channels, rdpSettings *settings, const char *name, void *data)
 
static BOOL pf_client_pre_connect (freerdp *instance)
 
static BOOL updateBackIdFn (const void *key, void *value, void *arg)
 
static BOOL pf_client_update_back_id (pServerContext *ps, const char *name, UINT32 backId)
 
static BOOL pf_client_load_channels (freerdp *instance)
 
static BOOL pf_client_receive_channel_data_hook (freerdp *instance, UINT16 channelId, const BYTE *xdata, size_t xsize, UINT32 flags, size_t totalSize)
 
static BOOL pf_client_on_server_heartbeat (freerdp *instance, BYTE period, BYTE count1, BYTE count2)
 
static BOOL pf_client_send_channel_data (pClientContext *pc, const proxyChannelDataEventInfo *ev)
 
static BOOL sendQueuedChannelData (pClientContext *pc)
 
static BOOL pf_client_post_connect (freerdp *instance)
 
static void pf_client_post_disconnect (freerdp *instance)
 
static BOOL pf_client_redirect (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 (pClientContext *pc)
 
static int pf_logon_error_info (freerdp *instance, UINT32 data, UINT32 type)
 
static void pf_client_context_free (freerdp *instance, rdpContext *context)
 
static int pf_client_verify_X509_certificate (freerdp *instance, const BYTE *data, size_t length, const char *hostname, UINT16 port, DWORD flags)
 
static void * channel_data_copy (const void *obj)
 
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)
 

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 Copyright 2021 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.co.nosp@m.m Copyright 2021 Thincast Technologies GmbH

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

◆ channel_data_copy()

static void* channel_data_copy ( const void *  obj)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ channel_data_free()

void channel_data_free ( void *  obj)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_client_load_static_channel_addin()

static BOOL freerdp_client_load_static_channel_addin ( rdpChannels *  channels,
rdpSettings *  settings,
const char *  name,
void *  data 
)
static
Here is the call graph for this function:

◆ 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_channels()

static BOOL pf_client_load_channels ( freerdp *  instance)
static

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_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,
const 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,
const 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_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
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 xdata,
size_t  xsize,
UINT32  flags,
size_t  totalSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_redirect()

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

◆ pf_client_send_channel_data()

static BOOL pf_client_send_channel_data ( pClientContext *  pc,
const proxyChannelDataEventInfo ev 
)
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 call graph for this function:
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 call graph for this function:
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 ( pClientContext *  pc)
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_update_back_id()

static BOOL pf_client_update_back_id ( pServerContext *  ps,
const char *  name,
UINT32  backId 
)
static
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_use_proxy_smartcard_auth()

static BOOL pf_client_use_proxy_smartcard_auth ( const rdpSettings *  settings)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pf_client_verify_X509_certificate()

static int pf_client_verify_X509_certificate ( freerdp *  instance,
const BYTE data,
size_t  length,
const char *  hostname,
UINT16  port,
DWORD  flags 
)
static
Here is the call graph for this function:
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:

◆ sendQueuedChannelData()

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

◆ str_is_empty()

static BOOL str_is_empty ( const char *  str)
static
Here is the caller graph for this function:

◆ updateBackIdFn()

static BOOL updateBackIdFn ( const void *  key,
void *  value,
void *  arg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: