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

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

Kernel Data Structures

modlinkage

modldrv

modlstrmod

dev_ops

cb_ops

streamtab

qinit

STREAMS Driver Entry Points

pts Example

STREAMS Module Configuration

Compilation

Kernel Loading

Checking the Module Type

Tunable Parameters

STREAMS Administrative Driver

Application Interface

STREAMS Anchors

Anchors and Data Flow

Using Anchors

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

STREAMS Module Configuration

The following example shows the structures you need if you are working with a module instead of a driver. Notice that a modlstrmod(9S) is used in modlinkage(9S), and fmodsw(9S) points to streamtab(9S) instead of going through dev_ops(9S).

Example 11-2 Module Structures

extern struct streamtab pteminfo;

static struct fmodsw fsw = {
        "ptem",
        &pteminfo,
        D_NEW | D_MP
};

/*
 * Module linkage information for the kernel.
 */
extern struct mod_ops mod_strmodops;

static struct modlstrmod modlstrmod = {
        &mod_strmodops,
        "pty hardware emulator",
        &fsw
};

static struct modlinkage modlinkage = {
        MODREV_1, 
        (void *)&modlstrmod,
        NULL
};