Re: User Space Emulation of Devices

joseph.bueno@trader.com
Thu, 06 Sep 2001 14:14:06 +0200


Phil Thompson wrote:
>
> Without going into the gory details, I have a requirement for a device
> driver that does very little apart from pass on the open/close/read/write
> "requests" onto a user space application to implement and pass back to the
> driver.
>
> Does anything like this already exist?
>
> Thanks,
> Phil
> -

Hi,

You may use pseudo-terminals (pty) to pass open/close/read/write/ioctl requests
to user space.

Your monitoring application opens master side of the pseudo terminal and
monitored application opens slave side.

Ptys are mainly used to redirect serial device communications (tty) to user
space but they can also be used to emulate other types of devices.
Check pty man pages for details.

Hope this helps

--
Joseph Bueno
NetClub/Trader.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/