60 |
extern DEVICE_FNS parallel_fns; |
extern DEVICE_FNS parallel_fns; |
61 |
extern DEVICE_FNS disk_fns; |
extern DEVICE_FNS disk_fns; |
62 |
extern FILEINFO g_fileinfo[]; |
extern FILEINFO g_fileinfo[]; |
63 |
|
|
64 |
static VCHANNEL *rdpdr_channel; |
static VCHANNEL *rdpdr_channel; |
65 |
|
|
66 |
/* If select() times out, the request for the device with handle g_min_timeout_fd is aborted */ |
/* If select() times out, the request for the device with handle g_min_timeout_fd is aborted */ |
112 |
} |
} |
113 |
} |
} |
114 |
|
|
115 |
BOOL |
static BOOL |
116 |
rdpdr_handle_ok(int device, int handle) |
rdpdr_handle_ok(int device, int handle) |
117 |
{ |
{ |
118 |
switch (g_rdpdr_device[device].device_type) |
switch (g_rdpdr_device[device].device_type) |
133 |
} |
} |
134 |
|
|
135 |
/* Add a new io request to the table containing pending io requests so it won't block rdesktop */ |
/* Add a new io request to the table containing pending io requests so it won't block rdesktop */ |
136 |
BOOL |
static BOOL |
137 |
add_async_iorequest(uint32 device, uint32 file, uint32 id, uint32 major, uint32 length, |
add_async_iorequest(uint32 device, uint32 file, uint32 id, uint32 major, uint32 length, |
138 |
DEVICE_FNS * fns, uint32 total_timeout, uint32 interval_timeout, uint8 * buffer, |
DEVICE_FNS * fns, uint32 total_timeout, uint32 interval_timeout, uint8 * buffer, |
139 |
uint32 offset) |
uint32 offset) |
179 |
return True; |
return True; |
180 |
} |
} |
181 |
|
|
182 |
void |
static void |
183 |
rdpdr_send_connect(void) |
rdpdr_send_connect(void) |
184 |
{ |
{ |
185 |
uint8 magic[4] = "rDCC"; |
uint8 magic[4] = "rDCC"; |
195 |
} |
} |
196 |
|
|
197 |
|
|
198 |
void |
static void |
199 |
rdpdr_send_name(void) |
rdpdr_send_name(void) |
200 |
{ |
{ |
201 |
uint8 magic[4] = "rDNC"; |
uint8 magic[4] = "rDNC"; |
220 |
} |
} |
221 |
|
|
222 |
/* Returns the size of the payload of the announce packet */ |
/* Returns the size of the payload of the announce packet */ |
223 |
int |
static int |
224 |
announcedata_size() |
announcedata_size() |
225 |
{ |
{ |
226 |
int size, i; |
int size, i; |
247 |
return size; |
return size; |
248 |
} |
} |
249 |
|
|
250 |
void |
static void |
251 |
rdpdr_send_available(void) |
rdpdr_send_available(void) |
252 |
{ |
{ |
253 |
|
|
305 |
channel_send(s, rdpdr_channel); |
channel_send(s, rdpdr_channel); |
306 |
} |
} |
307 |
|
|
308 |
void |
static void |
309 |
rdpdr_send_completion(uint32 device, uint32 id, uint32 status, uint32 result, uint8 * buffer, |
rdpdr_send_completion(uint32 device, uint32 id, uint32 status, uint32 result, uint8 * buffer, |
310 |
uint32 length) |
uint32 length) |
311 |
{ |
{ |
691 |
buffer = NULL; |
buffer = NULL; |
692 |
} |
} |
693 |
|
|
694 |
void |
static void |
695 |
rdpdr_send_clientcapabilty(void) |
rdpdr_send_clientcapabilty(void) |
696 |
{ |
{ |
697 |
uint8 magic[4] = "rDPC"; |
uint8 magic[4] = "rDPC"; |