oracle home
STREAMS Programming Guide
Exit Print View
Search Term
Search Scope:
This Document
Entire Library
» ...
Index D
Updated: July 2014
STREAMS Programming Guide
Document Information
Using This Documentation
Product Documentation Library
Access to Oracle Support
Feedback
Part I Application Programming Interface
Chapter 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
Chapter 2 STREAMS Application-Level Components
STREAMS Interfaces
STREAMS System Calls
Action Summary
Opening a STREAMS Device File
Initializing Details
Queue Allocation
Adding and Removing Modules
Closing the Stream
Stream Construction Example
Inserting Modules
Module and Driver Control
Chapter 3 STREAMS Application-Level Mechanisms
Message Handling
Modifying Messages
Message Types
Control of Stream Head Processing
Read Options
Write Options
Message Queueing and Priorities
Controlling Data Flow and Priorities
Accessing the Service Provider
Closing the Service Provider
Sending Data to the Service Provider
Receiving Data
Input and Output Polling
Synchronous Input and Output
Asynchronous Input and Output
signal Message
Extended Signals
Stream as a Controlling Terminal
Job Control
Allocation and Deallocation of Streams
Hungup Streams
Hangup Signals
Accessing the Controlling Terminal
Chapter 4 Application Access to the STREAMS Driver and Module Interfaces
System Calls Used
Module and Driver ioctl Calls
General ioctl Processing
I_STR ioctl Processing
Transparent ioctl Processing
I_LIST ioctl
Other ioctl Commands
Message Direction
Flush Handling
Chapter 5 STREAMS Administration
Administration Tools
Autopush Facility
Application Interface
Administration Tool Description
strace Command
strlog Command
strqget Command
strqset Command
strerr Daemon
Chapter 6 Pipes and Queues
Overview of Pipes and FIFOs
Creating and Opening Pipes and FIFOs
Using Pipes and FIFOs
Reading From a Pipe or FIFO
Writing to a Pipe or FIFO
Zero-Length Writes
Atomic Writes
Closing a Pipe or FIFO
Flushing Pipes and FIFOs
Named Streams
Unique Connections
Part II Kernel Interface
Chapter 7 STREAMS Framework ??? Kernel Level
Overview of Streams in Kernel Space
Stream Head
Kernel???Level Messages
Message Types
Message Structure
Message Linkage
Queued Messages
Shared Data
Sending and Receiving Messages
Data Alignment
Message Queues and Message Priority
Message Queues
queue Structure
Using Queue Information
Entry Points
open Routine
close Routine
put Procedure
Queue service Procedure
qband Structure
Using qband Information
Message Processing Procedures
Flow Control in Service Procedures
Chapter 8 STREAMS Kernel-Level Mechanisms
ioctl Processing
Message Allocation and Freeing
Recovering From No Buffers
Read Device Interrupt Handler
Write Service Procedure
Releasing Callback Requests
Extended STREAMS Buffers
esballoc9F Example
General ioctl Processing
STREAMS ioctl Issues
I_STR ioctl Processing
Transparent ioctl
Transparent ioctl Messages
Transparent ioctl Examples
M_COPYIN Example
M_COPYOUT Example
Bidirectional Data Transfer Example
I_LIST ioctl2Example
M_FLUSH Message Handling
Flushing According to Priority Bands
Flushing Priority Band
Driver and Module Service Interfaces
Service Interface Library Example
Module Service Interface Example
Service Primitive Declarations
Service Interface Procedure
Message Type Change Rules
Common ioctl Interfaces
FIORDCHK
FIONREAD
I_NREAD
signal Message
Chapter 9 STREAMS Drivers
STREAMS Device Drivers
Basic Driver
STREAMS Driver Entry Points
STREAMS Configuration Entry Points
STREAMS Initialization Entry Points
STREAMS Table-Driven Entry Points
STREAMS Queue Processing Entry Points
STREAMS Interrupt Handlers
Driver Unloading
STREAMS Driver Code Samples
Printer Driver Example
Driver Flush Handling
Print Driver Interrupt
Driver Flow Control
Cloning STREAMS Drivers
Loop-Around Driver
Summarizing STREAMS Device Drivers
Chapter 10 STREAMS Modules
Module Overview
STREAMS Module Configuration
Module Procedures
Filter Module Example
Data Flow Control
Design Guidelines
htonl3B and ntohl3B
Chapter 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
Chapter 12 Multithreaded STREAMS
Multithreaded (MT) STREAMS Overview
MT STREAMS Framework
STREAMS Framework Integrity
Message Ordering
MT STREAMS Perimeters
Inner Perimeters
Outer Perimeters
PERMOD Perimeter
Hot Perimeters
Defining Perimeter Types
Choosing a Perimeter Type
MT SAFE Modules and Drivers
MT SAFE Module
MT SAFE Driver
Routines Used Inside a Perimeter
qprocson/qprocsoff
qtimeout/qunbufcall
qwriter
qwait
Asynchronous Callback Functions
close Race Conditions
Unloading a Module that Uses esballoc
Use of the q_next Field
MT SAFE Modules Using Explicit Locks
Constraints When Using Locks
Preserving Message Ordering
Preparing to Port
Porting to the SunOS 5 System
Sample Multithreaded Device Driver Using a Per Module Inner Perimeter
Sample Multithreaded Module With Outer Perimeter
Chapter 13 STREAMS Multiplex Drivers
STREAMS Multiplexers
Building a Multiplexer
Dismantling a Multiplexer
Routing Data Through a Multiplexer
Connecting And Disconnecting Lower Streams
Connecting Lower Streams
Disconnecting Lower Streams
Multiplexer Construction Example
Multiplexing Driver Example
Upper Write put Procedure Sample
Upper Write service Procedure Sample
Lower Write service Procedure
Lower Read put Procedure
Persistent Links
Design Guidelines
Part III Advanced Topics
Chapter 14 Debugging STREAMS-based Applications
Kernel Debug Printing
STREAMS Error and Trace Logging
Kernel Examination Tools
crash Command
adb Command
kadb Command
Part IV Appendixes
Appendix A Message Types
Ordinary Messages
M_BREAK
M_CTL
M_DATA
M_DELAY
M_IOCTL
M_PASSFP
M_PROTO
M_RSE
M_SETOPTS
M_SIG
High-Priority Messages
M_COPYIN
M_COPYOUT
M_ERROR
M_FLUSH
M_HANGUP
M_IOCACK
M_IOCDATA
M_IOCNAK
M_PCPROTO
M_PCRSE
M_PCSIG
M_READ
SO_MREADOFF and M_STOP
SO_MREADOFFI and M_STOPI
M_UNHANGUP
Appendix B Kernel Utility Interface Summary
Appendix C STREAMS-Based Terminal Subsystem
Overview of Terminal Subsystem
Master Driver and Slave Driver Characteristics
Line-Discipline Module
Default Settings
Module open and close Routines
Read-Side Processing
Write-Side Processing
EUC Handling in ldterm
Hardware Emulation Module
STREAMS-based Pseudo-Terminal Subsystem
Line-Discipline Module
Pseudo-TTY Emulation Module: ptem
ptem Data Structure
open and close Routines
Remote Mode
Packet Mode
Pseudo-TTY Drivers: ptm and pts
grantpt
unlockpt
ptsname
Pseudo-TTY Streams
Appendix D STREAMS FAQ
Glossary
Index
Index Numbers and Symbols
Index A
Index B
Index C
Index D
Index E
Index F
Index G
Index H
Index I
Index J
Index K
Index L
Index M
Index N
Index O
Index P
Index Q
Index R
Index S
Index T
Index U
Index W
Language:
English
D
DARAM
allocation
Extended STREAMS Buffers
freeing
Extended STREAMS Buffers
memory shared by kernel and I/O card
Extended STREAMS Buffers
data and message boundaries
RMODEMASK
Read Options
RMSGD
Data and Message Boundaries
RMSGN
Data and Message Boundaries
RNORM
Data and Message Boundaries
Data Link Provider Interfaces
STREAMS FAQ
datab structure
Message Structure
example
Message Structure
datamsg
Kernel Utility Interfaces
db_base
Message Structure
DDI, Device Driver Interface
Basic Driver
ddi_copyin
Module and Driver ioctl Calls
ddi_copyout
Module and Driver ioctl Calls
declarations for the loop-around driver
example
Declarations for the Loop-Around Driver
definitions of priority band fields
example
Using Queue Information
dev_ops structure
driver entry point
STREAMS Driver Entry Points
represents a specific class or type of device
dev_ops
device driver
character device
Basic Driver
definition
Basic Driver
device types
Basic Driver
STREAMS driver characteristics
Basic Driver
device interrupt handler
example
Device Interrupt Handler
difference between driver and a module
Pushing a Module
DLPI
STREAMS FAQ
driver
ioctl
control
Module and Driver Control
STREAMS
STREAMS Configuration Entry Points
Structure of a STREAMS Device Driver
driver configuration entry points
example
Simple Line Printer Driver
driver entry point
cb_ops structure
STREAMS Driver Entry Points
dev_ops structure
STREAMS Driver Entry Points
load kernel module
STREAMS Driver Entry Points
streamtab
STREAMS Driver Entry Points
driver entry points
STREAMS Driver Entry Points
driver flush handling
example
Driver Flush Handling
driver interrupt
STREAMS driver
Kernel Contact Points
driver interrupt handling
example
Driver Interrupt Handling
dupb
Kernel Utility Interfaces
dupmsg
Kernel Utility Interfaces
Previous
Next