STREAMS Programming Guide

STREAMS System Calls

Table 2-1 offers an overview of some basic STREAMS-related system calls.

Table 2–1 Summary of Basic STREAMS-related System Calls

Function 

Description 

open(2)

Opens a stream 

close(2)

Closes a stream 

read(2)

Reads data from a stream 

write(2)

Writes data to a stream 

ioctl(2)

Controls a stream  

getmsg(2)

Receives a message at the stream head 

getpmsg(2)

Receives a priority message at the stream head 

putmsg(2)

Sends a message downstream 

putpmsg(2)

Sends a priority message downstream 

poll(2)

Identifies files on which a user can send or receive messages, or on which certain events have occurred (not restricted to STREAMS, although historically it was) 

pipe(2)

Creates a bidirectional channel that provides a communication path between multiple processes  


Note –

Sections 1, 2, 3, 7, and 9 of the online manual pages (man pages) contain all the STREAMS information.