Solaris Transition Guide

Transparent ioctl()s

In the SunOS release 4 software, you had to know that a particular driver was a STREAMS driver before making ioctl() requests.

For non-STREAMS drivers, you could do a direct ioctl() request:

ioctl(fd, DRIVER_IOCTL, arg);

For a STREAMS driver, you had to set up a strioctl structure and then use:

ioctl(fd, I_STR, &strioctl);

There was no easy way to determine whether a driver was STREAMS-based. Now, unrecognized ioctls to the stream head are passed on to the driver, eliminating the need to know whether a driver was STREAMS-based.

Message types added in the Solaris 7 software support transparent ioctls. There are now "copy in" and "copy out" messages to inform the STREAM head to transfer user data to and from the kernel.

For more information on writing STREAMS drivers, see the STREAMS Programming Guide.