akallabeth
9c6126c470
[winpr,comm] build generic serial-port support
...
* Disable linux specific code if build on *BSD
* Build stub to just return NULL for unsupported platforms
2024-09-04 12:50:49 +02:00
Armin Novak
e1b4b4aee0
Replaced WINPR_HANDLE_DEF with a struct type
2022-04-28 08:42:09 +02:00
Armin Novak
6ed50b4b1d
Refactored WinPR includes
2022-03-03 11:26:48 +01:00
Armin Novak
610396e197
Fixed compilation warnings
...
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak
1af7ef2f1b
Fixed compilation warnings and typos
2021-06-16 15:21:56 +02:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
Armin Novak
987ca5ec6a
Fixed another bunch of warnings.
2018-10-24 14:36:12 +02:00
David Fort
de7d7e43c9
serial redirection: implement event char
...
The signotec signature device requires the eventChar support to work properly in
serial redirection mode. This implementation is basic but does the job for this
device.
Sponsored by: Rangee GmbH (http://www.rangee.de )
2017-11-06 22:26:17 +01:00
Armin Novak
943e295714
WLog using C99 compatible variadic macros.
2016-10-07 14:05:27 +02:00
Baruch Siach
3b7d3190a1
Fix build with newer uclibc versions
...
uClibc master branch, as well as uclibc-ng add eventfd_{read,write}
definitions. Instead of testing for __UCLIBC__, have cmake explicitly check
for the existence of eventfd_read and save the result in
WITH_EVENTFD_READ_WRITE.
Fixes build errors like:
.../winpr/libwinpr/synch/event.c:120:12: error: static declaration of 'eventfd_read' follows non-static declaration
static int eventfd_read(int fd, eventfd_t* value)
^
In file included from .../winpr/libwinpr/synch/event.c:39:0:
.../usr/include/sys/eventfd.h:37:12: note: previous declaration of 'eventfd_read' was here
extern int eventfd_read (int __fd, eventfd_t *__value);
^
.../winpr/libwinpr/synch/event.c:125:12: error: static declaration of 'eventfd_write' follows non-static declaration
static int eventfd_write(int fd, eventfd_t value)
^
In file included from .../winpr/libwinpr/synch/event.c:39:0:
.../usr/include/sys/eventfd.h:40:12: note: previous declaration of 'eventfd_write' was here
extern int eventfd_write (int __fd, eventfd_t __value);
2015-04-29 20:31:25 +03:00
Emmanuel Ledoux
e9749c6b3f
serial: ability to turn on the permissive mode from the command line
2014-09-16 12:08:33 +02:00
Rene Rheaume
5f9c36da5d
* Use futimens that is POSIX-compliant and compatible with uclibc instead of futimes.
...
* Borrowed eventfd_read and eventfd_write from bionic for uclibc compatibility (uclibc headers are broken unfortunately). Bionic and
FreeRDP are both under the Apache 2.0 license.
2014-08-06 22:06:01 -04:00
Emmanuel Ledoux
80f641c38a
winpr-comm, serial: excluded Android platforms as well
2014-07-04 17:40:06 +02:00
Emmanuel Ledoux
7bbeff3427
winpr-comm: made its current implementation verific specific to __linux__ since it was done on top of NTTY.
2014-07-04 16:16:26 +02:00
Emmanuel Ledoux
db1fba3a68
Revert "winpr-handle: removed RegisterHandleCloseCb() which would require a better synchronization"
...
RegisterHandleCloseCb() is also useful to don't get a circular dependency, a better synchronization must be find out...
This reverts commit 8f3b3fa573
.
2014-07-02 16:57:20 +02:00
Emmanuel Ledoux
8f3b3fa573
winpr-handle: removed RegisterHandleCloseCb() which would require a better synchronization
...
winpr-comm: don't use anymore RegisterHandleCloseCb()
2014-07-02 16:19:28 +02:00
Emmanuel Ledoux
0d54307251
winpr-comm: introduced CommLog_Print(...). Don't use anymore DEBUG_WARN() and DEBUG_MSG() macros
2014-07-02 15:59:16 +02:00
Emmanuel Ledoux
b2bfc8004c
winpr-comm: gathered together all SERIAL_EV_* #defines
2014-06-20 15:56:41 +02:00
Emmanuel Ledoux
f454a5c0c8
winpr-handle: CloseHandle(), added ability to register some callback functions
...
winpr-comm: implemented CommCloseHandle()
2014-06-19 19:07:45 +02:00
Emmanuel Ledoux
e6c82f99d5
serial: ability to setup the server serial driver thanks to a third parameter on the command line
2014-06-18 18:20:21 +02:00
Emmanuel Ledoux
62298fcd95
winpr-comm: renamed REMOTE_SERIAL_DRIVER by SERIAL_DRIVER or ServerSerialDriver according the context
2014-06-18 15:58:08 +02:00
Emmanuel Ledoux
9fc0e6eccc
winpr-comm: CommReadFile and CommWriteFile are now protected by a mutex
...
winpr-comm: implemented IOCTL_SERIAL_IMMEDIATE_CHAR
2014-06-17 16:34:20 +02:00
Emmanuel Ledoux
0db3d9dbb0
winpr-comm: cleaning up code, focused on indentation and whitespaces
2014-06-16 19:18:45 +02:00
Emmanuel Ledoux
85343a435a
winpr-comm: completed _purge() supporting SERIAL_PURGE_RXABORT
...
winpr-comm: CommReadFile, support of FREERDP_PURGE_RXABORT sent by _purge()
2014-05-28 18:42:23 +02:00
Emmanuel Ledoux
4715009965
winpr-comm: completing _purge() on write operations (SERIAL_PURGE_TXABORT)
...
winpr-comm: CommWriteFile, implemented the WriteTotalTimeout
2014-05-28 16:41:24 +02:00
Emmanuel Ledoux
b8d00e41c4
- winpr-comm: fixed again the synchronization arround PendingEvents. Prefer to wait for the end of _wait_on_mask() inside _set_wait_mask()
2014-05-27 17:29:55 +02:00
Emmanuel Ledoux
1aeca8fbc7
- serial: terminates IRP threads more gracefully and avoiding warning messages.
2014-05-27 16:17:47 +02:00
Emmanuel Ledoux
b889ad7125
winpr-comm: reviewed the synchronization around counters, WaitMask and PendingEvents variables. Got rid of the semaphore PendingEventsSem.
2014-05-27 12:29:24 +02:00
Emmanuel Ledoux
9796224936
- winpr-comm: got a finalized version of IOCTL_SERIAL_WAIT_ON_MASK
...
- serial: cleaning up the code
2014-05-27 11:33:10 +02:00
Emmanuel Ledoux
13e10c5de9
winpr-comm: identified the ioctl 0x00220034 as IOCTL_USBPRINT_GET_1284_ID (support not yet implemented)
2014-05-26 16:31:56 +02:00
Emmanuel Ledoux
5dc21b5604
winpr-comm: renamed waitMask WaitEventMask
...
winpr-comm: removed ReadIrpQueue
2014-05-23 15:55:44 +02:00
Emmanuel Ledoux
ee268a92ee
serial: got a thread per IRP
...
winpr-comm: got IOCTL_SERIAL_GET_COMMSTATUS, IOCTL_SERIAL_SET_BREAK_ON and IOCTL_SERIAL_SET_BREAK_OFF
winpr-comm: tcdrain called by CommWriteFile() :(
2014-05-23 12:27:09 +02:00
Emmanuel Ledoux
9639da0067
serial: first steps to get a thread per IRP as a proof of concept. A bit of synchronization is still required.
2014-05-21 10:36:55 +02:00
Emmanuel Ledoux
baf4896a38
serial: got rid of most the warning message with MAKE_BUILD_TYPE=Release
...
winpr-comm: consolidated _set_handflow()/_get_handflow()
winpr-comm: introduced a permissive mode
winpr-comm: implementation of IOCTL_SERIAL_WAIT_ON_MASK still in progress
2014-05-19 16:53:57 +02:00
Emmanuel Ledoux
8179affea9
winpr-comm: got IOCTL_SERIAL_PURGE
2014-05-14 21:21:31 +02:00
Emmanuel Ledoux
4243928c2e
winpr-comm: fixed _set_lines() / _clear_lines()
...
winpr-comm: got IOCTL_SERIAL_SET_WAIT_MASK / IOCTL_SERIAL_GET_WAIT_MASK and a non-blocking version of IOCTL_SERIAL_WAIT_ON_MASK
2014-05-14 16:29:10 +02:00
Emmanuel Ledoux
4c743de69c
winpr-comm: got IOCTL_SERIAL_SET_TIMEOUTS / IOCTL_SERIAL_GET_TIMEOUTS
...
serial redirection: use of winpr-comm's functions and not serial_tty.* anymore
2014-05-12 17:33:56 +02:00
Emmanuel Ledoux
18dd3d3141
winpr-comm: tests are done according the "remote serial driver" in TestGetCommState/TestSetCommState
2014-04-28 22:32:27 +02:00
Emmanuel Ledoux
e7f0185e69
- firt use of winpr-comm by the serial channel (not tested and not finalized)
2014-04-27 19:41:25 +02:00
Emmanuel Ledoux
6fcc1b4478
winpr-comm: first import of comm_ioctl.h and the REMOTE_SERIAL_DRIVER type.
2014-04-25 00:20:48 +02:00
Marc-André Moreau
82ed4f0f38
libwinpr-comm: initial stubs
2014-04-02 15:51:28 -04:00