Inside a char driver

Char device looks like a stream of bytes, just like a regular UNIX file. In a nut shell, a char device is a bunch of functions that support standrad UNIX file operations.

  • open
  • release
  • Exclusive access. Module usage count.
  • read
  • write
  • Read/write byte stream via read()/write().
  • read_proc
  • write_proc
  • Custom features via /proc entry.
  • ioctl
  • Custom features via ioctl().
  • init
  • exit