#include "rdesktop.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <errno.h>
Go to the source code of this file.
|
int | parallel_enum_devices (RDPCLIENT *This, uint32 *id, char *optarg) |
|
static NTSTATUS | parallel_create (RDPCLIENT *This, uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, uint32 flags, char *filename, NTHANDLE *handle) |
|
static NTSTATUS | parallel_close (RDPCLIENT *This, NTHANDLE handle) |
|
static NTSTATUS | parallel_read (RDPCLIENT *This, NTHANDLE handle, uint8 *data, uint32 length, uint32 offset, uint32 *result) |
|
static NTSTATUS | parallel_write (RDPCLIENT *This, NTHANDLE handle, uint8 *data, uint32 length, uint32 offset, uint32 *result) |
|
static NTSTATUS | parallel_device_control (RDPCLIENT *This, NTHANDLE handle, uint32 request, STREAM in, STREAM out) |
|
◆ FILE_DEVICE_PARALLEL
#define FILE_DEVICE_PARALLEL 0x22 |
◆ IOCTL_PAR_QUERY_RAW_DEVICE_ID
#define IOCTL_PAR_QUERY_RAW_DEVICE_ID 0x0c |
◆ MAX_PARALLEL_DEVICES
#define MAX_PARALLEL_DEVICES 1 |
◆ parallel_close()
Definition at line 105 of file parallel.c.
109 This->rdpdr_device[
i].handle = 0;
int get_device_index(RD_NTHANDLE handle)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
◆ parallel_create()
Definition at line 76 of file parallel.c.
81 parallel_fd =
open(
This->rdpdr_device[device_id].local_path,
O_RDWR);
82 if (parallel_fd == -1)
89 if (fcntl(parallel_fd, F_SETFL,
O_NONBLOCK) == -1)
97 This->rdpdr_device[device_id].handle = parallel_fd;
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
#define STATUS_ACCESS_DENIED
◆ parallel_device_control()
Definition at line 158 of file parallel.c.
#define STATUS_INVALID_PARAMETER
#define IOCTL_PAR_QUERY_RAW_DEVICE_ID
#define FILE_DEVICE_PARALLEL
void unimpl(char *format,...)
◆ parallel_enum_devices()
Definition at line 40 of file parallel.c.
60 strcpy(
This->rdpdr_device[*
id].local_path, pos2);
65 This->rdpdr_device[*
id].pdevice_data = (
void *) ppar_info;
66 This->rdpdr_device[*
id].handle = 0;
ACPI_SIZE strlen(const char *String)
GLuint GLuint GLsizei count
#define DEVICE_TYPE_PARALLEL
#define RDPDR_MAX_DEVICES
char * next_arg(char *src, char needle)
char * strcpy(char *DstString, const char *SrcString)
void toupper_str(char *p)
◆ parallel_read()
Definition at line 115 of file parallel.c.
GLenum GLuint GLenum GLsizei length
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
◆ parallel_write()
Definition at line 122 of file parallel.c.
129 #if defined(LPGETSTATUS) 145 #if defined(LPGETSTATUS)
#define STATUS_DEVICE_PAPER_EMPTY
#define STATUS_DEVICE_POWERED_OFF
GLenum GLuint GLenum GLsizei length
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define STATUS_DEVICE_OFF_LINE
static SERVICE_STATUS status
◆ parallel_fns
Initial value:= {
}
static NTSTATUS parallel_read(RDPCLIENT *This, NTHANDLE handle, uint8 *data, uint32 length, uint32 offset, uint32 *result)
static NTSTATUS parallel_create(RDPCLIENT *This, uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, uint32 flags, char *filename, NTHANDLE *handle)
static NTSTATUS parallel_device_control(RDPCLIENT *This, NTHANDLE handle, uint32 request, STREAM in, STREAM out)
static NTSTATUS parallel_write(RDPCLIENT *This, NTHANDLE handle, uint8 *data, uint32 length, uint32 offset, uint32 *result)
static NTSTATUS parallel_close(RDPCLIENT *This, NTHANDLE handle)
Definition at line 181 of file parallel.c.
Referenced by rdpdr_process_irp().