FreeRDP
urbdrc_main.c File Reference
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/cmdline.h>
#include <freerdp/dvc.h>
#include <freerdp/addin.h>
#include <freerdp/channels/log.h>
#include "urbdrc_types.h"
#include "urbdrc_main.h"
#include "data_transfer.h"
#include "searchman.h"

Macros

#define DVCPluginEntry   FREERDP_API DVCPluginEntry
 

Functions

static int func_hardware_id_format (IUDEVICE *pdev, char(*HardwareIds)[DEVICE_HARDWARE_ID_SIZE])
 
static int func_compat_id_format (IUDEVICE *pdev, char(*CompatibilityIds)[DEVICE_COMPATIBILITY_ID_SIZE])
 
static void func_close_udevice (USB_SEARCHMAN *searchman, IUDEVICE *pdev)
 
static int fun_device_string_send_set (char *out_data, int out_offset, char *str)
 
static int func_container_id_generate (IUDEVICE *pdev, char *strContainerId)
 
static int func_instance_id_generate (IUDEVICE *pdev, char *strInstanceId)
 
static void func_lock_isoch_mutex (TRANSFER_DATA *transfer_data)
 
static UINT urbdrc_process_capability_request (URBDRC_CHANNEL_CALLBACK *callback, char *data, UINT32 data_sizem, UINT32 MessageId)
 
static UINT urbdrc_process_channel_create (URBDRC_CHANNEL_CALLBACK *callback, char *data, UINT32 data_sizem, UINT32 MessageId)
 
static int urdbrc_send_virtual_channel_add (IWTSVirtualChannel *channel, UINT32 MessageId)
 
static UINT urdbrc_send_usb_device_add (URBDRC_CHANNEL_CALLBACK *callback, IUDEVICE *pdev)
 
static UINT urbdrc_exchange_capabilities (URBDRC_CHANNEL_CALLBACK *callback, char *pBuffer, UINT32 cbSize)
 
voidurbdrc_new_device_create (void *arg)
 
static UINT urbdrc_process_channel_notification (URBDRC_CHANNEL_CALLBACK *callback, char *pBuffer, UINT32 cbSize)
 
static UINT urbdrc_on_data_received (IWTSVirtualChannelCallback *pChannelCallback, wStream *data)
 
static UINT urbdrc_on_close (IWTSVirtualChannelCallback *pChannelCallback)
 
static UINT urbdrc_on_new_channel_connection (IWTSListenerCallback *pListenerCallback, IWTSVirtualChannel *pChannel, BYTE *pData, BOOL *pbAccept, IWTSVirtualChannelCallback **ppCallback)
 
static UINT urbdrc_plugin_initialize (IWTSPlugin *pPlugin, IWTSVirtualChannelManager *pChannelMgr)
 
static UINT urbdrc_plugin_terminated (IWTSPlugin *pPlugin)
 
static void urbdrc_register_udevman_addin (IWTSPlugin *pPlugin, IUDEVMAN *udevman)
 
static UINT urbdrc_load_udevman_addin (IWTSPlugin *pPlugin, const char *name, ADDIN_ARGV *args)
 
BOOL urbdrc_set_subsystem (URBDRC_PLUGIN *urbdrc, char *subsystem)
 
static UINT urbdrc_process_addin_args (URBDRC_PLUGIN *urbdrc, ADDIN_ARGV *args)
 
UINT DVCPluginEntry (IDRDYNVC_ENTRY_POINTS *pEntryPoints)
 

Variables

COMMAND_LINE_ARGUMENT_A urbdrc_args []
 

Macro Definition Documentation

#define DVCPluginEntry   FREERDP_API DVCPluginEntry

Function Documentation

UINT DVCPluginEntry ( IDRDYNVC_ENTRY_POINTS *  pEntryPoints)

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the call graph for this function:

static int fun_device_string_send_set ( char *  out_data,
int  out_offset,
char *  str 
)
static

Here is the caller graph for this function:

static void func_close_udevice ( USB_SEARCHMAN *  searchman,
IUDEVICE *  pdev 
)
static

Here is the caller graph for this function:

static int func_compat_id_format ( IUDEVICE *  pdev,
char(*)  CompatibilityIds[DEVICE_COMPATIBILITY_ID_SIZE] 
)
static

Here is the caller graph for this function:

static int func_container_id_generate ( IUDEVICE *  pdev,
char *  strContainerId 
)
static

Here is the caller graph for this function:

static int func_hardware_id_format ( IUDEVICE *  pdev,
char(*)  HardwareIds[DEVICE_HARDWARE_ID_SIZE] 
)
static

FreeRDP: A Remote Desktop Protocol Implementation RemoteFX USB Redirection

Copyright 2012 Atrust corp. Copyright 2012 Alfred Liu alfre.nosp@m.d.li.nosp@m.u@atr.nosp@m.usco.nosp@m.rp.co.nosp@m.m

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.

Here is the caller graph for this function:

static int func_instance_id_generate ( IUDEVICE *  pdev,
char *  strInstanceId 
)
static

Here is the caller graph for this function:

static void func_lock_isoch_mutex ( TRANSFER_DATA *  transfer_data)
static

Here is the caller graph for this function:

static UINT urbdrc_exchange_capabilities ( URBDRC_CHANNEL_CALLBACK *  callback,
char *  pBuffer,
UINT32  cbSize 
)
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 urbdrc_load_udevman_addin ( IWTSPlugin *  pPlugin,
const char *  name,
ADDIN_ARGV *  args 
)
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:

void* urbdrc_new_device_create ( void arg)

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT urbdrc_on_close ( IWTSVirtualChannelCallback *  pChannelCallback)
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 urbdrc_on_data_received ( IWTSVirtualChannelCallback *  pChannelCallback,
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 urbdrc_on_new_channel_connection ( IWTSListenerCallback *  pListenerCallback,
IWTSVirtualChannel *  pChannel,
BYTE pData,
BOOL *  pbAccept,
IWTSVirtualChannelCallback **  ppCallback 
)
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 urbdrc_plugin_initialize ( IWTSPlugin *  pPlugin,
IWTSVirtualChannelManager *  pChannelMgr 
)
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 urbdrc_plugin_terminated ( IWTSPlugin *  pPlugin)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT urbdrc_process_addin_args ( URBDRC_PLUGIN *  urbdrc,
ADDIN_ARGV *  args 
)
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 urbdrc_process_capability_request ( URBDRC_CHANNEL_CALLBACK *  callback,
char *  data,
UINT32  data_sizem,
UINT32  MessageId 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT urbdrc_process_channel_create ( URBDRC_CHANNEL_CALLBACK *  callback,
char *  data,
UINT32  data_sizem,
UINT32  MessageId 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Here is the caller graph for this function:

static UINT urbdrc_process_channel_notification ( URBDRC_CHANNEL_CALLBACK *  callback,
char *  pBuffer,
UINT32  cbSize 
)
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 urbdrc_register_udevman_addin ( IWTSPlugin *  pPlugin,
IUDEVMAN *  udevman 
)
static

Here is the caller graph for this function:

BOOL urbdrc_set_subsystem ( URBDRC_PLUGIN *  urbdrc,
char *  subsystem 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT urdbrc_send_usb_device_add ( URBDRC_CHANNEL_CALLBACK *  callback,
IUDEVICE *  pdev 
)
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 int urdbrc_send_virtual_channel_add ( IWTSVirtualChannel *  channel,
UINT32  MessageId 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

COMMAND_LINE_ARGUMENT_A urbdrc_args[]
Initial value:
=
{
{ "dbg", COMMAND_LINE_VALUE_FLAG, "", NULL, BoolValueFalse, -1, NULL, "debug" },
{ "sys", COMMAND_LINE_VALUE_REQUIRED, "<subsystem>", NULL, NULL, -1, NULL, "subsystem" },
{ NULL, 0, NULL, NULL, NULL, -1, NULL, NULL }
}
#define COMMAND_LINE_VALUE_REQUIRED
Definition: winpr/include/winpr/cmdline.h:34
if availableBytes return NULL
Definition: TPCircularBuffer.h:104
#define BoolValueFalse
Definition: winpr/include/winpr/cmdline.h:92
#define COMMAND_LINE_VALUE_FLAG
Definition: winpr/include/winpr/cmdline.h:33