FreeRDP
client/drdynvc_main.c File Reference
#include <winpr/crt.h>
#include <winpr/stream.h>
#include "drdynvc_main.h"

Macros

#define TAG   CHANNELS_TAG("drdynvc.client")
 
#define VirtualChannelEntryEx   drdynvc_VirtualChannelEntryEx
 

Functions

static void dvcman_channel_free (void *channel)
 
static UINT drdynvc_write_data (drdynvcPlugin *drdynvc, UINT32 ChannelId, const BYTE *data, UINT32 dataSize)
 
static UINT dvcman_get_configuration (IWTSListener *pListener, void **ppPropertyBag)
 
static UINT dvcman_create_listener (IWTSVirtualChannelManager *pChannelMgr, const char *pszChannelName, ULONG ulFlags, IWTSListenerCallback *pListenerCallback, IWTSListener **ppListener)
 
static UINT dvcman_register_plugin (IDRDYNVC_ENTRY_POINTS *pEntryPoints, const char *name, IWTSPlugin *pPlugin)
 
static IWTSPlugin * dvcman_get_plugin (IDRDYNVC_ENTRY_POINTS *pEntryPoints, const char *name)
 
static ADDIN_ARGV * dvcman_get_plugin_data (IDRDYNVC_ENTRY_POINTS *pEntryPoints)
 
static voiddvcman_get_rdp_settings (IDRDYNVC_ENTRY_POINTS *pEntryPoints)
 
static UINT32 dvcman_get_channel_id (IWTSVirtualChannel *channel)
 
static IWTSVirtualChannel * dvcman_find_channel_by_id (IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId)
 
static IWTSVirtualChannelManager * dvcman_new (drdynvcPlugin *plugin)
 
static UINT dvcman_load_addin (drdynvcPlugin *drdynvc, IWTSVirtualChannelManager *pChannelMgr, ADDIN_ARGV *args, rdpSettings *settings)
 
static DVCMAN_CHANNEL * dvcman_channel_new (drdynvcPlugin *drdynvc, IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId, const char *ChannelName)
 
static void dvcman_free (drdynvcPlugin *drdynvc, IWTSVirtualChannelManager *pChannelMgr)
 
static UINT dvcman_init (drdynvcPlugin *drdynvc, IWTSVirtualChannelManager *pChannelMgr)
 
static UINT dvcman_write_channel (IWTSVirtualChannel *pChannel, ULONG cbSize, const BYTE *pBuffer, void *pReserved)
 
static UINT dvcman_close_channel_iface (IWTSVirtualChannel *pChannel)
 
static UINT dvcman_create_channel (drdynvcPlugin *drdynvc, IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId, const char *ChannelName)
 
static UINT dvcman_open_channel (drdynvcPlugin *drdynvc, IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId)
 
static UINT dvcman_close_channel (IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId)
 
static UINT dvcman_receive_channel_data_first (drdynvcPlugin *drdynvc, IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId, UINT32 length)
 
static UINT dvcman_receive_channel_data (drdynvcPlugin *drdynvc, IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId, wStream *data)
 
static UINT drdynvc_write_variable_uint (wStream *s, UINT32 val)
 
static UINT drdynvc_send (drdynvcPlugin *drdynvc, wStream *s)
 
static UINT drdynvc_send_capability_response (drdynvcPlugin *drdynvc)
 
static UINT drdynvc_process_capability_request (drdynvcPlugin *drdynvc, int Sp, int cbChId, wStream *s)
 
static UINT32 drdynvc_cblen_to_bytes (int cbLen)
 
static UINT32 drdynvc_read_variable_uint (wStream *s, int cbLen)
 
static UINT drdynvc_process_create_request (drdynvcPlugin *drdynvc, int Sp, int cbChId, wStream *s)
 
static UINT drdynvc_process_data_first (drdynvcPlugin *drdynvc, int Sp, int cbChId, wStream *s)
 
static UINT drdynvc_process_data (drdynvcPlugin *drdynvc, int Sp, int cbChId, wStream *s)
 
static UINT drdynvc_process_close_request (drdynvcPlugin *drdynvc, int Sp, int cbChId, wStream *s)
 
static UINT drdynvc_order_recv (drdynvcPlugin *drdynvc, wStream *s)
 
static UINT drdynvc_virtual_channel_event_data_received (drdynvcPlugin *drdynvc, void *pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
 
static void VCAPITYPE drdynvc_virtual_channel_open_event_ex (LPVOID lpUserParam, DWORD openHandle, UINT event, LPVOID pData, UINT32 dataLength, UINT32 totalLength, UINT32 dataFlags)
 
static DWORD WINAPI drdynvc_virtual_channel_client_thread (LPVOID arg)
 
static void drdynvc_queue_object_free (void *obj)
 
static UINT drdynvc_virtual_channel_event_connected (drdynvcPlugin *drdynvc, LPVOID pData, UINT32 dataLength)
 
static UINT drdynvc_virtual_channel_event_disconnected (drdynvcPlugin *drdynvc)
 
static UINT drdynvc_virtual_channel_event_terminated (drdynvcPlugin *drdynvc)
 
static UINT drdynvc_virtual_channel_event_attached (drdynvcPlugin *drdynvc)
 
static UINT drdynvc_virtual_channel_event_detached (drdynvcPlugin *drdynvc)
 
static VOID VCAPITYPE drdynvc_virtual_channel_init_event_ex (LPVOID lpUserParam, LPVOID pInitHandle, UINT event, LPVOID pData, UINT dataLength)
 
static int drdynvc_get_version (DrdynvcClientContext *context)
 
BOOL VCAPITYPE VirtualChannelEntryEx (PCHANNEL_ENTRY_POINTS_EX pEntryPoints, PVOID pInitHandle)
 

Macro Definition Documentation

#define TAG   CHANNELS_TAG("drdynvc.client")

FreeRDP: A Remote Desktop Protocol Implementation Dynamic Virtual Channel

Copyright 2010-2011 Vic Lee Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.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.

#define VirtualChannelEntryEx   drdynvc_VirtualChannelEntryEx

Function Documentation

static UINT32 drdynvc_cblen_to_bytes ( int  cbLen)
static

Here is the caller graph for this function:

static int drdynvc_get_version ( DrdynvcClientContext *  context)
static

Channel Client Interface

Here is the caller graph for this function:

static UINT drdynvc_order_recv ( drdynvcPlugin *  drdynvc,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_process_capability_request ( drdynvcPlugin *  drdynvc,
int  Sp,
int  cbChId,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_process_close_request ( drdynvcPlugin *  drdynvc,
int  Sp,
int  cbChId,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_process_create_request ( drdynvcPlugin *  drdynvc,
int  Sp,
int  cbChId,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

For some reason the server does not always send the capabilities pdu as it should. When this happens, send a capabilities response.

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_process_data ( drdynvcPlugin *  drdynvc,
int  Sp,
int  cbChId,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_process_data_first ( drdynvcPlugin *  drdynvc,
int  Sp,
int  cbChId,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static void drdynvc_queue_object_free ( void obj)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT32 drdynvc_read_variable_uint ( wStream *  s,
int  cbLen 
)
static

Here is the caller graph for this function:

static UINT drdynvc_send ( drdynvcPlugin *  drdynvc,
wStream *  s 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_send_capability_response ( drdynvcPlugin *  drdynvc)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static DWORD WINAPI drdynvc_virtual_channel_client_thread ( LPVOID  arg)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_virtual_channel_event_attached ( drdynvcPlugin *  drdynvc)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_virtual_channel_event_connected ( drdynvcPlugin *  drdynvc,
LPVOID  pData,
UINT32  dataLength 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_virtual_channel_event_data_received ( drdynvcPlugin *  drdynvc,
void pData,
UINT32  dataLength,
UINT32  totalLength,
UINT32  dataFlags 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_virtual_channel_event_detached ( drdynvcPlugin *  drdynvc)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_virtual_channel_event_disconnected ( drdynvcPlugin *  drdynvc)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_virtual_channel_event_terminated ( drdynvcPlugin *  drdynvc)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static VOID VCAPITYPE drdynvc_virtual_channel_init_event_ex ( LPVOID  lpUserParam,
LPVOID  pInitHandle,
UINT  event,
LPVOID  pData,
UINT  dataLength 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void VCAPITYPE drdynvc_virtual_channel_open_event_ex ( LPVOID  lpUserParam,
DWORD  openHandle,
UINT  event,
LPVOID  pData,
UINT32  dataLength,
UINT32  totalLength,
UINT32  dataFlags 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_write_data ( drdynvcPlugin *  drdynvc,
UINT32  ChannelId,
const BYTE data,
UINT32  dataSize 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT drdynvc_write_variable_uint ( wStream *  s,
UINT32  val 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void dvcman_channel_free ( void channel)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static DVCMAN_CHANNEL* dvcman_channel_new ( drdynvcPlugin *  drdynvc,
IWTSVirtualChannelManager *  pChannelMgr,
UINT32  ChannelId,
const char *  ChannelName 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT dvcman_close_channel ( IWTSVirtualChannelManager *  pChannelMgr,
UINT32  ChannelId 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Windows 8 / Windows Server 2012 send close requests for channels that failed to be created. Do not warn, simply return success here.

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT dvcman_close_channel_iface ( IWTSVirtualChannel *  pChannel)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT dvcman_create_channel ( drdynvcPlugin *  drdynvc,
IWTSVirtualChannelManager *  pChannelMgr,
UINT32  ChannelId,
const char *  ChannelName 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT dvcman_create_listener ( IWTSVirtualChannelManager *  pChannelMgr,
const char *  pszChannelName,
ULONG  ulFlags,
IWTSListenerCallback *  pListenerCallback,
IWTSListener **  ppListener 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static IWTSVirtualChannel* dvcman_find_channel_by_id ( IWTSVirtualChannelManager *  pChannelMgr,
UINT32  ChannelId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void dvcman_free ( drdynvcPlugin *  drdynvc,
IWTSVirtualChannelManager *  pChannelMgr 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT32 dvcman_get_channel_id ( IWTSVirtualChannel *  channel)
static

Here is the caller graph for this function:

static UINT dvcman_get_configuration ( IWTSListener *  pListener,
void **  ppPropertyBag 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static IWTSPlugin* dvcman_get_plugin ( IDRDYNVC_ENTRY_POINTS *  pEntryPoints,
const char *  name 
)
static

Here is the caller graph for this function:

static ADDIN_ARGV* dvcman_get_plugin_data ( IDRDYNVC_ENTRY_POINTS *  pEntryPoints)
static

Here is the caller graph for this function:

static void* dvcman_get_rdp_settings ( IDRDYNVC_ENTRY_POINTS *  pEntryPoints)
static

Here is the caller graph for this function:

static UINT dvcman_init ( drdynvcPlugin *  drdynvc,
IWTSVirtualChannelManager *  pChannelMgr 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT dvcman_load_addin ( drdynvcPlugin *  drdynvc,
IWTSVirtualChannelManager *  pChannelMgr,
ADDIN_ARGV *  args,
rdpSettings *  settings 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static IWTSVirtualChannelManager* dvcman_new ( drdynvcPlugin *  plugin)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT dvcman_open_channel ( drdynvcPlugin *  drdynvc,
IWTSVirtualChannelManager *  pChannelMgr,
UINT32  ChannelId 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT dvcman_receive_channel_data ( drdynvcPlugin *  drdynvc,
IWTSVirtualChannelManager *  pChannelMgr,
UINT32  ChannelId,
wStream *  data 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT dvcman_receive_channel_data_first ( drdynvcPlugin *  drdynvc,
IWTSVirtualChannelManager *  pChannelMgr,
UINT32  ChannelId,
UINT32  length 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Windows Server 2012 R2 can send some messages over Microsoft::Windows::RDS::Geometry::v08.01 even if the dynamic virtual channel wasn't registered on our side. Ignoring it works.

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT dvcman_register_plugin ( IDRDYNVC_ENTRY_POINTS *  pEntryPoints,
const char *  name,
IWTSPlugin *  pPlugin 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT dvcman_write_channel ( IWTSVirtualChannel *  pChannel,
ULONG  cbSize,
const BYTE pBuffer,
void pReserved 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL VCAPITYPE VirtualChannelEntryEx ( PCHANNEL_ENTRY_POINTS_EX  pEntryPoints,
PVOID  pInitHandle 
)

Here is the call graph for this function: