18.0 Stream I/O Concepts

This documentation describes Stream I/O, its functions, and features.

NOTE:The streams discussed here are standard files, not to be confused with UNIX STREAMS or STREAMS.

Developed by USL, the UNIX based STREAMS facility, or mechanism, is a collection of system calls, kernel resources, and kernel utility routines. The STREAMS mechanism creates, uses, and dismantles a Stream, which is a full-duplex processing and data transfer path between a driver in kernel space and a process in user space; a STREAM consists of three basic components: a stream head, stream modules (protocol stacks), and a stream driver.

Stream I/O functions can be used for "standard" read and write file operations. Data can be transmitted as characters, strings, or blocks of memory.

A stream is the name given to a second-level file that has been opened for data transmission. When a stream is opened, a pointer to a FILE structure is returned. This pointer is used to reference the stream when other functions are subsequently invoked.