oracle home
STREAMS Programming Guide
Exit Print View
Search Term
Search Scope:
This Document
Entire Library
» ...
Index K
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
K
kadb
kadb Command
kernel data structures
ch_ops
Kernel Data Structures
dev_ops
Kernel Data Structures
modldrv
Kernel Data Structures
modlinkage
Kernel Data Structures
modlstrmod
Kernel Data Structures
qinit
Kernel Data Structures
streamtab
Kernel Data Structures
kernel utilities
Kernel Utility Interface Summary
adjmsg
Kernel Utility Interfaces
allocb
Kernel Utility Interfaces
backq
Kernel Utility Interfaces
bcanput
Kernel Utility Interfaces
bufcall
Kernel Utility Interfaces
canput
Kernel Utility Interfaces
copymsg
Kernel Utility Interfaces
datamsg
Kernel Utility Interfaces
dupb
Kernel Utility Interfaces
dupmsg
Kernel Utility Interfaces
enableok
Kernel Utility Interfaces
esballoc
Kernel Utility Interfaces
flushband
Kernel Utility Interfaces
flushq
Kernel Utility Interfaces
freeb
Kernel Utility Interfaces
freemsg
Kernel Utility Interfaces
freezestr
Kernel Utility Interfaces
getq
Kernel Utility Interfaces
linkb
Kernel Utility Interfaces
msgdsize
Kernel Utility Interfaces
noenable
Kernel Utility Interfaces
otherq
Kernel Utility Interfaces
pullupmsg
Kernel Utility Interfaces
putbq
Kernel Utility Interfaces
putctl1
Kernel Utility Interfaces
putctl
Kernel Utility Interfaces
putnext
Kernel Utility Interfaces
putq
Kernel Utility Interfaces
qbufcall
Kernel Utility Interfaces
qprocsoff
Kernel Utility Interfaces
qprocson
Kernel Utility Interfaces
qreply
Kernel Utility Interfaces
qsize
Kernel Utility Interfaces
qtimeout
Kernel Utility Interfaces
qunbufcall
Kernel Utility Interfaces
quntimeout
Kernel Utility Interfaces
qwait
Kernel Utility Interfaces
qwait_sig
Kernel Utility Interfaces
qwriter
Kernel Utility Interfaces
RD
Kernel Utility Interfaces
rmvb
Kernel Utility Interfaces
rmvq
Kernel Utility Interfaces
strlog
Kernel Utility Interfaces
strqget
Kernel Utility Interfaces
strqset
Kernel Utility Interfaces
testb
Kernel Utility Interfaces
unbufcall
Kernel Utility Interfaces
unfreezestr
Kernel Utility Interfaces
unlinkb
Kernel Utility Interfaces
WR
Kernel Utility Interfaces
Previous
Next