I have a requirement to write a linux device driver in userspace.
How can I write a library which, when linked to an application, can handle system calls to a particular device.
The application should be able to use open(), read(), write(), ioctl() on a device such as /dev/mydev0, but these calls should terminate in a userspace library instead of a kernel module.
Please advise on if this is possible and how can I achieve this.
LD_PRELOADtricks; you cannot trap directly theint 80/sysenterinstructions (i.e., if someone calls "manually" the syscall, without going through the libc wrapper) as easily. - Matteo Italia