1

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 ioctls, mmaps etc. without any knwowledge in them? So the wrapper device can facade an abitrary device without breaking it's function.

dronus
  • 10,774
  • 8
  • 54
  • 80
  • Tends to be more convenient to shim the standard library calls with [`LD_PRELOAD`](http://stackoverflow.com/questions/426230/what-is-the-ld-preload-trick) – Steve-o Sep 28 '12 at 18:39
  • Like `fopen`, `fread`, `fwrite`, `ioctl`.. what else would be needed? – dronus Sep 30 '12 at 19:12

0 Answers0