Common implementation for packet-based I/O on POSIX systems