STREAMS Programming Guide


To communicate with a Streams device, an application's process uses read(2), write(2), getmsg(2), getpmsg(2), putmsg(2), putpmsg(2), and ioctl(2) to transmit or receive data on a Stream.

From the command line, configure a Stream with autopush(1M). From within an application, configure a Stream with ioctl(2) as described in streamio(7I).

The ioctl(2) interface performs control operations on and through device drivers that cannot be done through the read(2) and write(2) interfaces. ioctl(2) operations include pushing and popping modules on and off the Stream, flushing the Stream, and manipulating signals and options. Certain ioctl(2) commands for STREAMS operate on the whole Stream, not just the module or driver. The streamio(7I) manual page describes STREAMS ioctl(2) commands. Chapter 4, STREAMS Driver and Module Interfaces details inter-Stream communications.