I like to make a linux device, that wraps an existing one and allows to peek on any calls made. For example, udev
could be configured to make a renamed version of the original device soft link, and my wrapper device would go in place. It can then peek on any use of the original device, and log certain calls for example.
The question is: Is there an generic way to handle ioctl
s, mmap
s etc. without any knwowledge in them? So the wrapper device can facade an abitrary device without breaking it's function.