3

We need to multiplex data from one (USB) serial device to multiple independent serial devices.
What I've found, is the module fanout, this addresses the multiplexing part of my problem.

Now I search for an easy, probably ready to use, way to copy the data from the serial USB device to the fanout device directly in the kernel space.
Sure, I'am able to simply cat x > y in userspace, but It may be more efficient to do this in kernel space.

dsolimano
  • 8,870
  • 3
  • 48
  • 63
wohauser
  • 31
  • 1

2 Answers2

0

You could use an anonymous Unix Domain Socket, created with socketpair. Satisfies all your conditions (and is fast).

itsbruce
  • 4,825
  • 26
  • 35
0

If you can have a pipe, try splice_pipe_to_pipe or link_pipe.

(btw, the new tee syscall can replace fanout module. and it's buildin already!)

J-16 SDiZ
  • 26,473
  • 4
  • 65
  • 84