#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.
106{
109 This->rdpdr_device[
i].handle = 0;
112}
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.
78{
79 int parallel_fd;
80
81 parallel_fd =
open(
This->rdpdr_device[device_id].local_path,
O_RDWR);
82 if (parallel_fd == -1)
83 {
86 }
87
88
89 if (fcntl(parallel_fd, F_SETFL,
O_NONBLOCK) == -1)
91
92#if defined(LPABORT)
93
95#endif
96
97 This->rdpdr_device[device_id].handle = parallel_fd;
98
100
102}
_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.
159{
162
163
166
168
170 {
172
173 default:
174
177 }
179}
void unimpl(char *format,...)
#define IOCTL_PAR_QUERY_RAW_DEVICE_ID
#define FILE_DEVICE_PARALLEL
#define STATUS_INVALID_PARAMETER
◆ parallel_enum_devices()
Definition at line 40 of file parallel.c.
41{
43
45 char *pos2;
47
48
51 {
53
56
58
60 strcpy(
This->rdpdr_device[*
id].local_path, pos2);
62
63
65 This->rdpdr_device[*
id].pdevice_data = (
void *) ppar_info;
66 This->rdpdr_device[*
id].handle = 0;
68 (*id)++;
69
71 }
73}
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define RDPDR_MAX_DEVICES
#define DEVICE_TYPE_PARALLEL
char * next_arg(char *src, char needle)
void toupper_str(char *p)
GLuint GLuint GLsizei count
◆ parallel_read()
Definition at line 115 of file parallel.c.
116{
119}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
◆ parallel_write()
Definition at line 122 of file parallel.c.
123{
125
128 {
129#if defined(LPGETSTATUS)
131#endif
132
135 {
142 default:
144 }
145#if defined(LPGETSTATUS)
147 {
148
150 }
151#endif
152 }
154 return rc;
155}
#define STATUS_DEVICE_POWERED_OFF
#define STATUS_DEVICE_PAPER_EMPTY
#define STATUS_DEVICE_OFF_LINE
◆ parallel_fns
Initial value:= {
}
static NTSTATUS parallel_write(RDPCLIENT *This, NTHANDLE handle, uint8 *data, uint32 length, uint32 offset, uint32 *result)
static NTSTATUS parallel_read(RDPCLIENT *This, NTHANDLE handle, uint8 *data, uint32 length, uint32 offset, uint32 *result)
static NTSTATUS parallel_close(RDPCLIENT *This, NTHANDLE handle)
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)
Definition at line 181 of file parallel.c.
Referenced by rdpdr_process_irp().