STREAMS Programming Guide

Preface

The STREAMS Programming Guide describes how to use STREAMS in designing and implementing applications and STREAMS modules and drivers, for architectures that conform to the SolarisTM 7 DDI/DDK.

Who Should Use This Book

This manual is a guide for application, driver, and module developers. The reader must know C programming in a UNIXTM environment, and be familiar with the system interfaces. Driver and module developers should also be familiar with the book Writing Device Drivers.

How This Book Is Organized

This guide is divided into three parts. Part IPart 1 describes how to use STREAMS facilities in applications. Part IIPart 2 describes how to design STREAMS modules and STREAMS drivers. Part IIIPart 3 contains advanced topics. Every developer should read Chapter 1.

Part I

Part II

Part III

Appendices

Related Books

You can obtain more information on STREAMS system calls and utilities from the on-line manual pages. For more information on driver-related issues, including autoconfiguration, see Writing Device Drivers.

You can also find STREAMS described to some extent in the System V Interface Definition, and in the following publications:

Goodheart, Berny and Cox, James. The Magic Garden Explained. Australia, & Englewood Cliffs, New Jersey: Prentice Hall, 1994.

Rago, Stephen A. UNIX System V Network Programming. Reading, Massachusetts: Addison-Wesley, 1993.

Ordering Sun Documents

Fatbrain.com, an Internet professional bookstore, stocks select product documentation from Sun Microsystems, Inc.

For a list of documents and how to order them, visit the Sun Documentation Center on Fatbrain.com at http://www1.fatbrain.com/documentation/sun.

Accessing Sun Documentation Online

The docs.sun.comSM Web site enables you to access Sun technical documentation online. You can browse the docs.sun.com archive or search for a specific book title or subject. The URL is http://docs.sun.com.

What Typographic Conventions Mean

The following table describes the typographic changes used in this book.

Table P-1 Typographic Conventions

Typeface or Symbol 

Meaning 

Example 

AaBbCc123

 The names of commands, files, and directories; on-screen computer output

Edit your .login file.

Use ls -a to list all files.

machine_name% you have mail.

AaBbCc123

 What you type, contrasted with on-screen computer outputmachine_name% su Password:

AaBbCc123

 Command-line placeholder: replace with a real name or value

To delete a file, type rm filename.

AaBbCc123

Book titles, new words, or terms, or words to be emphasized. 

Read Chapter 6 in User's Guide.

These are called class options.

You must be root to do this.

Shell Prompts in Command Examples

The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.

Table P-2 Shell Prompts

Shell 

Prompt 

 C shell promptmachine_name%
 C shell superuser promptmachine_name#
 Bourne shell and Korn shell prompt$
 Bourne shell and Korn shell superuser prompt#