FreeRDP
server/rdpdr_main.c File Reference
#include <freerdp/config.h>
#include <freerdp/freerdp.h>
#include <freerdp/utils/rdpdr_utils.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/nt.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <freerdp/channels/log.h>
#include "rdpdr_main.h"

Macros

#define RDPDR_ADD_PRINTER_EVENT   0x00000001
 
#define RDPDR_UPDATE_PRINTER_EVENT   0x00000002
 
#define RDPDR_DELETE_PRINTER_EVENT   0x00000003
 
#define RDPDR_RENAME_PRINTER_EVENT   0x00000004
 
#define RDPDR_HEADER_LENGTH   4
 
#define RDPDR_CAPABILITY_HEADER_LENGTH   8
 
#define TAG   CHANNELS_TAG("rdpdr.server")
 

Functions

static void rdpdr_device_free (RdpdrDevice *device)
 
static void rdpdr_device_free_h (void *obj)
 
static UINT32 rdpdr_deviceid_hash (const void *id)
 
static RdpdrDevicerdpdr_device_new (void)
 
static void * rdpdr_device_clone (const void *val)
 
static RdpdrDevicerdpdr_get_device_by_id (RdpdrServerPrivate *priv, UINT32 DeviceId)
 
static BOOL rdpdr_remove_device_by_id (RdpdrServerPrivate *priv, UINT32 DeviceId)
 
static BOOL rdpdr_add_device (RdpdrServerPrivate *priv, const RdpdrDevice *device)
 
static const WCHAR * rdpdr_read_ustring (wLog *log, wStream *s, size_t bytelen)
 
static RDPDR_IRPrdpdr_server_irp_new (void)
 
static void rdpdr_server_irp_free (RDPDR_IRP *irp)
 
static BOOL rdpdr_server_enqueue_irp (RdpdrServerContext *context, RDPDR_IRP *irp)
 
static RDPDR_IRPrdpdr_server_dequeue_irp (RdpdrServerContext *context, UINT32 completionId)
 
static UINT rdpdr_seal_send_free_request (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_send_announce_request (RdpdrServerContext *context)
 
static UINT rdpdr_server_receive_announce_response (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_receive_client_name_request (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_write_capability_set_header_cb (RdpdrServerContext *context, wStream *s, const RDPDR_CAPABILITY_HEADER *header)
 
static UINT rdpdr_server_read_general_capability_set (RdpdrServerContext *context, wStream *s, const RDPDR_CAPABILITY_HEADER *header)
 
static UINT rdpdr_server_write_general_capability_set (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_read_printer_capability_set (RdpdrServerContext *context, wStream *s, const RDPDR_CAPABILITY_HEADER *header)
 
static UINT rdpdr_server_write_printer_capability_set (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_read_port_capability_set (RdpdrServerContext *context, wStream *s, const RDPDR_CAPABILITY_HEADER *header)
 
static UINT rdpdr_server_write_port_capability_set (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_read_drive_capability_set (RdpdrServerContext *context, wStream *s, const RDPDR_CAPABILITY_HEADER *header)
 
static UINT rdpdr_server_write_drive_capability_set (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_read_smartcard_capability_set (RdpdrServerContext *context, wStream *s, const RDPDR_CAPABILITY_HEADER *header)
 
static UINT rdpdr_server_write_smartcard_capability_set (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_send_core_capability_request (RdpdrServerContext *context)
 
static UINT rdpdr_server_receive_core_capability_response (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_send_client_id_confirm (RdpdrServerContext *context)
 
static UINT rdpdr_server_receive_device_list_announce_request (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_receive_device_list_remove_request (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_receive_io_create_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_close_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_read_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_write_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_device_control_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_query_volume_information_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_set_volume_information_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_query_information_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_set_information_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_query_directory_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_change_directory_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_io_directory_control_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId, UINT32 MinorFunction)
 
static UINT rdpdr_server_receive_io_lock_control_request (RdpdrServerContext *context, wStream *s, UINT32 DeviceId, UINT32 FileId, UINT32 CompletionId)
 
static UINT rdpdr_server_receive_device_io_request (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_receive_device_io_completion (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_send_user_logged_on (RdpdrServerContext *context)
 
static UINT rdpdr_server_receive_prn_cache_add_printer (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_receive_prn_cache_update_printer (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_receive_prn_cache_delete_printer (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_receive_prn_cache_rename_cachedata (RdpdrServerContext *context, wStream *s)
 
static UINT rdpdr_server_receive_prn_cache_data_request (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_receive_prn_using_xps_request (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static UINT rdpdr_server_receive_pdu (RdpdrServerContext *context, wStream *s, const RDPDR_HEADER *header)
 
static DWORD WINAPI rdpdr_server_thread (LPVOID arg)
 
static UINT rdpdr_server_start (RdpdrServerContext *context)
 
static UINT rdpdr_server_stop (RdpdrServerContext *context)
 
static void rdpdr_server_write_device_iorequest (wStream *s, UINT32 deviceId, UINT32 fileId, UINT32 completionId, UINT32 majorFunction, UINT32 minorFunction)
 
static UINT rdpdr_server_read_file_directory_information (wLog *log, wStream *s, FILE_DIRECTORY_INFORMATION *fdi)
 
static UINT rdpdr_server_send_device_create_request (RdpdrServerContext *context, UINT32 deviceId, UINT32 completionId, const char *path, UINT32 desiredAccess, UINT32 createOptions, UINT32 createDisposition)
 
static UINT rdpdr_server_send_device_close_request (RdpdrServerContext *context, UINT32 deviceId, UINT32 fileId, UINT32 completionId)
 
static UINT rdpdr_server_send_device_read_request (RdpdrServerContext *context, UINT32 deviceId, UINT32 fileId, UINT32 completionId, UINT32 length, UINT32 offset)
 
static UINT rdpdr_server_send_device_write_request (RdpdrServerContext *context, UINT32 deviceId, UINT32 fileId, UINT32 completionId, const char *data, UINT32 length, UINT32 offset)
 
static UINT rdpdr_server_send_device_query_directory_request (RdpdrServerContext *context, UINT32 deviceId, UINT32 fileId, UINT32 completionId, const char *path)
 
static UINT rdpdr_server_send_device_file_rename_request (RdpdrServerContext *context, UINT32 deviceId, UINT32 fileId, UINT32 completionId, const char *path)
 
static void rdpdr_server_convert_slashes (char *path, int size)
 
static UINT rdpdr_server_drive_create_directory_callback2 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_create_directory_callback1 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_create_directory (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, const char *path)
 
static UINT rdpdr_server_drive_delete_directory_callback2 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_delete_directory_callback1 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_delete_directory (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, const char *path)
 
static UINT rdpdr_server_drive_query_directory_callback2 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_query_directory_callback1 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_query_directory (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, const char *path)
 
static UINT rdpdr_server_drive_open_file_callback (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_open_file (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, const char *path, UINT32 desiredAccess, UINT32 createDisposition)
 
static UINT rdpdr_server_drive_read_file_callback (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_read_file (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, UINT32 fileId, UINT32 length, UINT32 offset)
 
static UINT rdpdr_server_drive_write_file_callback (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_write_file (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, UINT32 fileId, const char *buffer, UINT32 length, UINT32 offset)
 
static UINT rdpdr_server_drive_close_file_callback (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_close_file (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, UINT32 fileId)
 
static UINT rdpdr_server_drive_delete_file_callback2 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_delete_file_callback1 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_delete_file (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, const char *path)
 
static UINT rdpdr_server_drive_rename_file_callback3 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_rename_file_callback2 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_rename_file_callback1 (RdpdrServerContext *context, wStream *s, RDPDR_IRP *irp, UINT32 deviceId, UINT32 completionId, UINT32 ioStatus)
 
static UINT rdpdr_server_drive_rename_file (RdpdrServerContext *context, void *callbackData, UINT32 deviceId, const char *oldPath, const char *newPath)
 
static void rdpdr_server_private_free (RdpdrServerPrivate *ctx)
 
static RdpdrServerPrivate * rdpdr_server_private_new (void)
 
RdpdrServerContext * rdpdr_server_context_new (HANDLE vcm)
 
void rdpdr_server_context_free (RdpdrServerContext *context)
 

Variables

static UINT32 g_ClientId = 0
 

Macro Definition Documentation

◆ RDPDR_ADD_PRINTER_EVENT

#define RDPDR_ADD_PRINTER_EVENT   0x00000001

FreeRDP: A Remote Desktop Protocol Implementation Device Redirection Virtual Channel Extension

Copyright 2014 Dell Software Mike..nosp@m.McDo.nosp@m.nald@.nosp@m.soft.nosp@m.ware..nosp@m.dell.nosp@m..com Copyright 2013 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2015-2022 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 Copyright 2022 Armin Novak anova.nosp@m.k@th.nosp@m.incas.nosp@m.t.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.

◆ RDPDR_CAPABILITY_HEADER_LENGTH

#define RDPDR_CAPABILITY_HEADER_LENGTH   8

◆ RDPDR_DELETE_PRINTER_EVENT

#define RDPDR_DELETE_PRINTER_EVENT   0x00000003

◆ RDPDR_HEADER_LENGTH

#define RDPDR_HEADER_LENGTH   4

◆ RDPDR_RENAME_PRINTER_EVENT

#define RDPDR_RENAME_PRINTER_EVENT   0x00000004

◆ RDPDR_UPDATE_PRINTER_EVENT

#define RDPDR_UPDATE_PRINTER_EVENT   0x00000002

◆ TAG

#define TAG   CHANNELS_TAG("rdpdr.server")

Function Documentation

◆ rdpdr_add_device()

static BOOL rdpdr_add_device ( RdpdrServerPrivate *  priv,
const RdpdrDevice device 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_device_clone()

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

◆ rdpdr_device_free()

static void rdpdr_device_free ( RdpdrDevice device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_device_free_h()

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

◆ rdpdr_device_new()

static RdpdrDevice* rdpdr_device_new ( void  )
static
Here is the caller graph for this function:

◆ rdpdr_deviceid_hash()

static UINT32 rdpdr_deviceid_hash ( const void *  id)
static
Here is the caller graph for this function:

◆ rdpdr_get_device_by_id()

static RdpdrDevice* rdpdr_get_device_by_id ( RdpdrServerPrivate *  priv,
UINT32  DeviceId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_read_ustring()

static const WCHAR* rdpdr_read_ustring ( wLog *  log,
wStream s,
size_t  bytelen 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_remove_device_by_id()

static BOOL rdpdr_remove_device_by_id ( RdpdrServerPrivate *  priv,
UINT32  DeviceId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_seal_send_free_request()

static UINT rdpdr_seal_send_free_request ( RdpdrServerContext *  context,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_context_free()

void rdpdr_server_context_free ( RdpdrServerContext *  context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_context_new()

RdpdrServerContext* rdpdr_server_context_new ( HANDLE  vcm)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_convert_slashes()

static void rdpdr_server_convert_slashes ( char *  path,
int  size 
)
static
Here is the caller graph for this function:

◆ rdpdr_server_dequeue_irp()

static RDPDR_IRP* rdpdr_server_dequeue_irp ( RdpdrServerContext *  context,
UINT32  completionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_drive_close_file()

static UINT rdpdr_server_drive_close_file ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
UINT32  fileId 
)
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:

◆ rdpdr_server_drive_close_file_callback()

static UINT rdpdr_server_drive_close_file_callback ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_create_directory()

static UINT rdpdr_server_drive_create_directory ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
const char *  path 
)
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:

◆ rdpdr_server_drive_create_directory_callback1()

static UINT rdpdr_server_drive_create_directory_callback1 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_create_directory_callback2()

static UINT rdpdr_server_drive_create_directory_callback2 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_delete_directory()

static UINT rdpdr_server_drive_delete_directory ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
const char *  path 
)
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:

◆ rdpdr_server_drive_delete_directory_callback1()

static UINT rdpdr_server_drive_delete_directory_callback1 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_delete_directory_callback2()

static UINT rdpdr_server_drive_delete_directory_callback2 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_delete_file()

static UINT rdpdr_server_drive_delete_file ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
const char *  path 
)
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:

◆ rdpdr_server_drive_delete_file_callback1()

static UINT rdpdr_server_drive_delete_file_callback1 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_delete_file_callback2()

static UINT rdpdr_server_drive_delete_file_callback2 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_open_file()

static UINT rdpdr_server_drive_open_file ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
const char *  path,
UINT32  desiredAccess,
UINT32  createDisposition 
)
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:

◆ rdpdr_server_drive_open_file_callback()

static UINT rdpdr_server_drive_open_file_callback ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_query_directory()

static UINT rdpdr_server_drive_query_directory ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
const char *  path 
)
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:

◆ rdpdr_server_drive_query_directory_callback1()

static UINT rdpdr_server_drive_query_directory_callback1 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_query_directory_callback2()

static UINT rdpdr_server_drive_query_directory_callback2 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_read_file()

static UINT rdpdr_server_drive_read_file ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
UINT32  fileId,
UINT32  length,
UINT32  offset 
)
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:

◆ rdpdr_server_drive_read_file_callback()

static UINT rdpdr_server_drive_read_file_callback ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_rename_file()

static UINT rdpdr_server_drive_rename_file ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
const char *  oldPath,
const char *  newPath 
)
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:

◆ rdpdr_server_drive_rename_file_callback1()

static UINT rdpdr_server_drive_rename_file_callback1 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_rename_file_callback2()

static UINT rdpdr_server_drive_rename_file_callback2 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_rename_file_callback3()

static UINT rdpdr_server_drive_rename_file_callback3 ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_drive_write_file()

static UINT rdpdr_server_drive_write_file ( RdpdrServerContext *  context,
void *  callbackData,
UINT32  deviceId,
UINT32  fileId,
const char *  buffer,
UINT32  length,
UINT32  offset 
)
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:

◆ rdpdr_server_drive_write_file_callback()

static UINT rdpdr_server_drive_write_file_callback ( RdpdrServerContext *  context,
wStream s,
RDPDR_IRP irp,
UINT32  deviceId,
UINT32  completionId,
UINT32  ioStatus 
)
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:

◆ rdpdr_server_enqueue_irp()

static BOOL rdpdr_server_enqueue_irp ( RdpdrServerContext *  context,
RDPDR_IRP irp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_irp_free()

static void rdpdr_server_irp_free ( RDPDR_IRP irp)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_irp_new()

static RDPDR_IRP* rdpdr_server_irp_new ( void  )
static
Here is the caller graph for this function:

◆ rdpdr_server_private_free()

static void rdpdr_server_private_free ( RdpdrServerPrivate *  ctx)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_private_new()

static RdpdrServerPrivate* rdpdr_server_private_new ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_read_drive_capability_set()

static UINT rdpdr_server_read_drive_capability_set ( RdpdrServerContext *  context,
wStream s,
const RDPDR_CAPABILITY_HEADER header 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the caller graph for this function:

◆ rdpdr_server_read_file_directory_information()

static UINT rdpdr_server_read_file_directory_information ( wLog *  log,
wStream s,
FILE_DIRECTORY_INFORMATION fdi 
)
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:

◆ rdpdr_server_read_general_capability_set()

static UINT rdpdr_server_read_general_capability_set ( RdpdrServerContext *  context,
wStream s,
const RDPDR_CAPABILITY_HEADER header 
)
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:

◆ rdpdr_server_read_port_capability_set()

static UINT rdpdr_server_read_port_capability_set ( RdpdrServerContext *  context,
wStream s,
const RDPDR_CAPABILITY_HEADER header 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the caller graph for this function:

◆ rdpdr_server_read_printer_capability_set()

static UINT rdpdr_server_read_printer_capability_set ( RdpdrServerContext *  context,
wStream s,
const RDPDR_CAPABILITY_HEADER header 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the caller graph for this function:

◆ rdpdr_server_read_smartcard_capability_set()

static UINT rdpdr_server_read_smartcard_capability_set ( RdpdrServerContext *  context,
wStream s,
const RDPDR_CAPABILITY_HEADER header 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the caller graph for this function:

◆ rdpdr_server_receive_announce_response()

static UINT rdpdr_server_receive_announce_response ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code
Here is the caller graph for this function:

◆ rdpdr_server_receive_client_name_request()

static UINT rdpdr_server_receive_client_name_request ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
static

Function description

Returns
0 on success, otherwise a Win32 error code

Caution: ComputerNameLen is given bytes, not in characters, including the NULL terminator!

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

◆ rdpdr_server_receive_core_capability_response()

static UINT rdpdr_server_receive_core_capability_response ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
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:

◆ rdpdr_server_receive_device_io_completion()

static UINT rdpdr_server_receive_device_io_completion ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
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:

◆ rdpdr_server_receive_device_io_request()

static UINT rdpdr_server_receive_device_io_request ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_device_list_announce_request()

static UINT rdpdr_server_receive_device_list_announce_request ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
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:

◆ rdpdr_server_receive_device_list_remove_request()

static UINT rdpdr_server_receive_device_list_remove_request ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
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:

◆ rdpdr_server_receive_io_change_directory_request()

static UINT rdpdr_server_receive_io_change_directory_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_close_request()

static UINT rdpdr_server_receive_io_close_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_create_request()

static UINT rdpdr_server_receive_io_create_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_device_control_request()

static UINT rdpdr_server_receive_io_device_control_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_directory_control_request()

static UINT rdpdr_server_receive_io_directory_control_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId,
UINT32  MinorFunction 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_lock_control_request()

static UINT rdpdr_server_receive_io_lock_control_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_query_directory_request()

static UINT rdpdr_server_receive_io_query_directory_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_query_information_request()

static UINT rdpdr_server_receive_io_query_information_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_query_volume_information_request()

static UINT rdpdr_server_receive_io_query_volume_information_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_read_request()

static UINT rdpdr_server_receive_io_read_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_set_information_request()

static UINT rdpdr_server_receive_io_set_information_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_io_set_volume_information_request()

static UINT rdpdr_server_receive_io_set_volume_information_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:

◆ rdpdr_server_receive_io_write_request()

static UINT rdpdr_server_receive_io_write_request ( RdpdrServerContext *  context,
wStream s,
UINT32  DeviceId,
UINT32  FileId,
UINT32  CompletionId 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_pdu()

static UINT rdpdr_server_receive_pdu ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
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:

◆ rdpdr_server_receive_prn_cache_add_printer()

static UINT rdpdr_server_receive_prn_cache_add_printer ( RdpdrServerContext *  context,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_prn_cache_data_request()

static UINT rdpdr_server_receive_prn_cache_data_request ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_prn_cache_delete_printer()

static UINT rdpdr_server_receive_prn_cache_delete_printer ( RdpdrServerContext *  context,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_prn_cache_rename_cachedata()

static UINT rdpdr_server_receive_prn_cache_rename_cachedata ( RdpdrServerContext *  context,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_prn_cache_update_printer()

static UINT rdpdr_server_receive_prn_cache_update_printer ( RdpdrServerContext *  context,
wStream s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_receive_prn_using_xps_request()

static UINT rdpdr_server_receive_prn_using_xps_request ( RdpdrServerContext *  context,
wStream s,
const RDPDR_HEADER header 
)
static
Here is the caller graph for this function:

◆ rdpdr_server_send_announce_request()

static UINT rdpdr_server_send_announce_request ( RdpdrServerContext *  context)
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:

◆ rdpdr_server_send_client_id_confirm()

static UINT rdpdr_server_send_client_id_confirm ( RdpdrServerContext *  context)
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:

◆ rdpdr_server_send_core_capability_request()

static UINT rdpdr_server_send_core_capability_request ( RdpdrServerContext *  context)
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:

◆ rdpdr_server_send_device_close_request()

static UINT rdpdr_server_send_device_close_request ( RdpdrServerContext *  context,
UINT32  deviceId,
UINT32  fileId,
UINT32  completionId 
)
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:

◆ rdpdr_server_send_device_create_request()

static UINT rdpdr_server_send_device_create_request ( RdpdrServerContext *  context,
UINT32  deviceId,
UINT32  completionId,
const char *  path,
UINT32  desiredAccess,
UINT32  createOptions,
UINT32  createDisposition 
)
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:

◆ rdpdr_server_send_device_file_rename_request()

static UINT rdpdr_server_send_device_file_rename_request ( RdpdrServerContext *  context,
UINT32  deviceId,
UINT32  fileId,
UINT32  completionId,
const char *  path 
)
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:

◆ rdpdr_server_send_device_query_directory_request()

static UINT rdpdr_server_send_device_query_directory_request ( RdpdrServerContext *  context,
UINT32  deviceId,
UINT32  fileId,
UINT32  completionId,
const char *  path 
)
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:

◆ rdpdr_server_send_device_read_request()

static UINT rdpdr_server_send_device_read_request ( RdpdrServerContext *  context,
UINT32  deviceId,
UINT32  fileId,
UINT32  completionId,
UINT32  length,
UINT32  offset 
)
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:

◆ rdpdr_server_send_device_write_request()

static UINT rdpdr_server_send_device_write_request ( RdpdrServerContext *  context,
UINT32  deviceId,
UINT32  fileId,
UINT32  completionId,
const char *  data,
UINT32  length,
UINT32  offset 
)
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:

◆ rdpdr_server_send_user_logged_on()

static UINT rdpdr_server_send_user_logged_on ( RdpdrServerContext *  context)
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:

◆ rdpdr_server_start()

static UINT rdpdr_server_start ( RdpdrServerContext *  context)
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:

◆ rdpdr_server_stop()

static UINT rdpdr_server_stop ( RdpdrServerContext *  context)
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:

◆ rdpdr_server_thread()

static DWORD WINAPI rdpdr_server_thread ( LPVOID  arg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_write_capability_set_header_cb()

static UINT rdpdr_server_write_capability_set_header_cb ( RdpdrServerContext *  context,
wStream s,
const RDPDR_CAPABILITY_HEADER header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_write_device_iorequest()

static void rdpdr_server_write_device_iorequest ( wStream s,
UINT32  deviceId,
UINT32  fileId,
UINT32  completionId,
UINT32  majorFunction,
UINT32  minorFunction 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdpdr_server_write_drive_capability_set()

static UINT rdpdr_server_write_drive_capability_set ( RdpdrServerContext *  context,
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:

◆ rdpdr_server_write_general_capability_set()

static UINT rdpdr_server_write_general_capability_set ( RdpdrServerContext *  context,
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:

◆ rdpdr_server_write_port_capability_set()

static UINT rdpdr_server_write_port_capability_set ( RdpdrServerContext *  context,
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:

◆ rdpdr_server_write_printer_capability_set()

static UINT rdpdr_server_write_printer_capability_set ( RdpdrServerContext *  context,
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:

◆ rdpdr_server_write_smartcard_capability_set()

static UINT rdpdr_server_write_smartcard_capability_set ( RdpdrServerContext *  context,
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:

Variable Documentation

◆ g_ClientId

UINT32 g_ClientId = 0
static