JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
STREAMS Programming Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Part I Application Programming Interface

1.  Overview of STREAMS

What Is STREAMS?

STREAMS Definitions

Stream as a Data Path

Stream Head

STREAMS Module

STREAMS Device Driver

STREAMS Data

Message Queues

Communicating With a STREAMS Device

STREAMS Multiplexing

STREAMS Polling

Message Transfer Flow Control

When to Use STREAMS

How STREAMS Works--Application Interface

Opening a Stream

Closing a Stream

Controlling Data Flow

Simple Stream Example

How STREAMS Works at the Kernel Level

Creating the Stream Head

Message Processing

Structure of a STREAMS Device Driver

Message Components

Message Queueing Priority

Structure of a Message Queue

Configuring Multiplexed Streams

Multithreading the Kernel

Service Interfaces

Manipulating Modules

Protocol Portability

Protocol Substitution

Protocol Migration

Module Reusability

2.  STREAMS Application-Level Components

3.  STREAMS Application-Level Mechanisms

4.  Application Access to the STREAMS Driver and Module Interfaces

5.  STREAMS Administration

6.  Pipes and Queues

Part II Kernel Interface

7.  STREAMS Framework - Kernel Level

8.  STREAMS Kernel-Level Mechanisms

9.  STREAMS Drivers

10.  STREAMS Modules

11.  Configuring STREAMS Drivers and Modules

12.  Multithreaded STREAMS

13.  STREAMS Multiplex Drivers

Part III Advanced Topics

14.  Debugging STREAMS-based Applications

Part IV Appendixes

A.  Message Types

B.  Kernel Utility Interface Summary

C.  STREAMS-Based Terminal Subsystem

D.  STREAMS FAQ

Glossary

Index

Service Interfaces

Using STREAMS, you can create modules that present a service interface to any neighboring module or device driver, or between the top module and a user application. A service interface is defined in the boundary between two neighbors.

In STREAMS, a service interface is a set of messages and the rules that allow these messages to pass across the boundary. A module using a service interface, for example, receives a message from a neighbor and responds with an appropriate action (perhaps sending back a request to retransmit) depending on the circumstances.

You can stack a module anywhere in a stream, but connecting sequences of modules with compatible protocol service interfaces is better. For example, a module that implements an X.25 protocol layer, as shown in Figure 1-6, presents a protocol service interface at its input and output sides. In this case, other modules should be connected to the input and output side if they have the compatible X.25 service interface only.