[libcamera-devel,0/2] libcamera: ipc: unix: Add a IPC mechanism based on Unix sockets
mbox series

Message ID 20190627020955.6166-1-niklas.soderlund@ragnatech.se
Headers show
Series
  • libcamera: ipc: unix: Add a IPC mechanism based on Unix sockets
Related show

Message

Niklas Söderlund June 27, 2019, 2:09 a.m. UTC
Hello,

This series adds an IPC mechanism to pass data and file descriptors 
between two processes. The interface is asynchronous and bi-directional.

There are quiet a few changes since the RFC,

- Switch to an event notifications and signals for the ingress code 
  path, making the interface asynchronous.
- Removed any protocol helpers in the IPC object, a protocol should be 
  implemented on top of the IPC.
- Added documentation.
- Switched to SOCK_DGRAM.
- Send both data and file descriptors in the same sendmsg().
- Fixed spelling and silly errors in the code.
- Merged test case in a single binary.

Niklas Söderlund (2):
  libcamera: ipc: unix: Add a IPC mechanism based on Unix sockets
  test: ipc: unix: Add test for IPCUnixSocket

 src/libcamera/include/ipc_unixsocket.h |  59 +++++
 src/libcamera/ipc_unixsocket.cpp       | 288 +++++++++++++++++++++
 src/libcamera/meson.build              |   2 +
 test/ipc/meson.build                   |  12 +
 test/ipc/unixsocket.cpp                | 339 +++++++++++++++++++++++++
 test/meson.build                       |   1 +
 6 files changed, 701 insertions(+)
 create mode 100644 src/libcamera/include/ipc_unixsocket.h
 create mode 100644 src/libcamera/ipc_unixsocket.cpp
 create mode 100644 test/ipc/meson.build
 create mode 100644 test/ipc/unixsocket.cpp