Solaris Transition Guide


Some areas of change for STREAMS modules are transparent I/O controls, automatic pushing of modules on a stream, and new message types.

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.

autopush Command

The SunOS release 4 streamtab structure enabled a driver to specify that certain STREAMS modules be pushed when the device was open().

In the Solaris 7 operating environment, the system administrator and the autopush(1M) command specify when a STREAMS module is pushed. If required, autopush can be run at driver installation.

See STREAMS Programming Guide for more information about pushing STREAMS modules.