[ Team LiB ] Previous Section Next Section

31.5 ioctl Function

With STREAMS, we again encounter the ioctl function that was described in Chapter 17.

#include <stropts.h>

int ioctl(int fd, int request, ... /* void *arg */ ) ;

Returns: 0 if OK, –1 on error

The only change from the function prototype shown in Section 17.2 is the headers that must be included when dealing with STREAMS.

There are about 30 requests that affect a stream head. Each request begins with I_ and they are normally documented on the streamio man page.

    [ Team LiB ] Previous Section Next Section