FreeRDP
serial_main.c File Reference
#include <freerdp/config.h>
#include <errno.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/collections.h>
#include <winpr/comm.h>
#include <winpr/crt.h>
#include <winpr/stream.h>
#include <winpr/synch.h>
#include <winpr/thread.h>
#include <winpr/wlog.h>
#include <winpr/assert.h>
#include <freerdp/freerdp.h>
#include <freerdp/channels/rdpdr.h>
#include <freerdp/channels/log.h>
#include <freerdp/utils/rdpdr_utils.h>

Macros

#define TAG   CHANNELS_TAG("serial.client")
 
#define MAX_IRP_THREADS   5
 

Functions

static void close_terminated_irp_thread_handles (SERIAL_DEVICE *serial, BOOL forceClose)
 
static UINT32 GetLastErrorToIoStatus (SERIAL_DEVICE *serial)
 
static UINT serial_process_irp_create (SERIAL_DEVICE *serial, IRP *irp)
 
static UINT serial_process_irp_close (SERIAL_DEVICE *serial, IRP *irp)
 
static UINT serial_process_irp_read (SERIAL_DEVICE *serial, IRP *irp)
 
static UINT serial_process_irp_write (SERIAL_DEVICE *serial, IRP *irp)
 
static UINT serial_process_irp_device_control (SERIAL_DEVICE *serial, IRP *irp)
 
static UINT serial_process_irp (SERIAL_DEVICE *serial, IRP *irp)
 
static DWORD WINAPI irp_thread_func (LPVOID arg)
 
static void close_unterminated_irp_thread (wListDictionary *list, wLog *log, ULONG_PTR id)
 
static void close_terminated_irp_thread (wListDictionary *list, wLog *log, ULONG_PTR id)
 
static void create_irp_thread (SERIAL_DEVICE *serial, IRP *irp)
 
static DWORD WINAPI serial_thread_func (LPVOID arg)
 
static UINT serial_irp_request (DEVICE *device, IRP *irp)
 
static UINT serial_free (DEVICE *device)
 
static void serial_message_free (void *obj)
 
static void irp_thread_close (void *arg)
 
 FREERDP_ENTRY_POINT (UINT VCAPITYPE serial_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints))
 

Macro Definition Documentation

◆ MAX_IRP_THREADS

#define MAX_IRP_THREADS   5

◆ TAG

#define TAG   CHANNELS_TAG("serial.client")

FreeRDP: A Remote Desktop Protocol Implementation Serial Port Device Service Virtual Channel

Copyright 2011 O.S. Systems Software Ltda. Copyright 2011 Eduardo Fiss Beloni belon.nosp@m.i@os.nosp@m.syste.nosp@m.ms.c.nosp@m.om.br Copyright 2014 Hewlett-Packard Development Company, L.P.

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

◆ close_terminated_irp_thread()

static void close_terminated_irp_thread ( wListDictionary *  list,
wLog *  log,
ULONG_PTR  id 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ close_terminated_irp_thread_handles()

void close_terminated_irp_thread_handles ( SERIAL_DEVICE *  serial,
BOOL  forceClose 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ close_unterminated_irp_thread()

static void close_unterminated_irp_thread ( wListDictionary *  list,
wLog *  log,
ULONG_PTR  id 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_irp_thread()

static void create_irp_thread ( SERIAL_DEVICE *  serial,
IRP *  irp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FREERDP_ENTRY_POINT()

FREERDP_ENTRY_POINT ( UINT VCAPITYPE   serial_DeviceServiceEntryPDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)

Function description

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

◆ GetLastErrorToIoStatus()

static UINT32 GetLastErrorToIoStatus ( SERIAL_DEVICE *  serial)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ irp_thread_close()

static void irp_thread_close ( void *  arg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ irp_thread_func()

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

◆ serial_free()

static UINT serial_free ( DEVICE *  device)
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:

◆ serial_irp_request()

static UINT serial_irp_request ( DEVICE *  device,
IRP *  irp 
)
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:

◆ serial_message_free()

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

◆ serial_process_irp()

static UINT serial_process_irp ( SERIAL_DEVICE *  serial,
IRP *  irp 
)
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:

◆ serial_process_irp_close()

static UINT serial_process_irp_close ( SERIAL_DEVICE *  serial,
IRP *  irp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ serial_process_irp_create()

static UINT serial_process_irp_create ( SERIAL_DEVICE *  serial,
IRP *  irp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ serial_process_irp_device_control()

static UINT serial_process_irp_device_control ( SERIAL_DEVICE *  serial,
IRP *  irp 
)
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:

◆ serial_process_irp_read()

static UINT serial_process_irp_read ( SERIAL_DEVICE *  serial,
IRP *  irp 
)
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:

◆ serial_process_irp_write()

static UINT serial_process_irp_write ( SERIAL_DEVICE *  serial,
IRP *  irp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ serial_thread_func()

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