STREAMS Programming Guide
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

Index

A

acknowledgment message40
adjmsg352
allocb
.....example use of100
allocb353
ASCII translation47
assembly programming7
asynchronous input/output
.....in polling116
asynchronous protocol Stream
.....example46 to 52
atomic writes251
audience intended1
autopush34

B

b_band56
.....placement57
b_next56
back-enable of a queue78
back-enabling78
background job
.....in job control119
background process group
.....in job control119
backq353
bandp example63
bcanput353
bidirectional transfer
.....example146 to 151
blocked process116
bufcall354

C

canonical processing47
canput354
character I/O9
character processing47
cloning (STREAMS)195
close
.....delayed36
.....dismantling the Stream35
close system call9, 30
closing a Stream35
connld failure258
connld(7)258
control,Stream head processing64
controlling process
.....in job control119
controlling terminal119 to 123
.....accessing123
.....denial of access123
.....in job control119
copyb355
copymsg355
copyreq structure327
copyresp structure328

D

data structure
.....stdata34
datab structure57
datab(9S) data structure13
datamsg356
db_base57
deferred45
delay
.....closing STREAMS36
device
.....close9
.....open9
difference between driver & module38
downstream
.....definition8
driver
.....classification182
.....declarations126
.....definition6, 18
.....ioctl control39
.....overview181 to 184
.....STREAMS184 to 209
.....writing a driver182
dupb356
dupmsg356

E

EBCDIC translation47
ECHOCTL264
enableok357
entry point address31
error messages
.....pipes248
esballoc107
esballoc357
EUC handling in ldterm(7)267
expedited data55, 156
extended STREAMS buffers105 to 107
......allocation106
......freeing106

F

fattach(3C)253
fdetach(3C)254
FIFO250
......flushing252
......reading from249
FIFO (STREAMS)247
......basic operations248 to 251
......flush252
......queue scheduling45
FIFO closing251
file descriptor9
file descriptor passing255
flow control76 to 81
......definition11
......example81
......expedited data79
......in driver194
......in line discipline module177
......in module176 to 177
......routines76 to 81
flush handling
......description153 to 155
......flags153, 344
......in driver190
......in line discipline155
......in pipes and FIFOs252
......priority band data156
......read-side example154
......write-side example154
flushband358
flushq358
foreground job
......in job control119
foreground process group
.....in job control120
free routine107
freeb358
freemsg359
freezestr359
full-duplex processing5

G

getmsg system call30
getmsg(2)61
getpmsg function63
getpmsg system call30
getq359
getstrm47
grantpt(3C)283
.....with pseudo-tty driver279

H

hangup signals122
hardware emulation module270 to 272
high water,
.....low water55
high-priority messages67
hung-up Stream122

I

I_CKBAND69
I_GETBAND69
I_SETSIG ioctl(2)111
I_STR40
I_SWROPT250
infinite loop
.....service procedure46, 67
input/output polling111 to 117
insq360
iocblk structure327
.....with M_IOCTL333
ioctl
.....I_FLUSHBAND69
ioctl
......I_PUSH35
ioctl I_SWROPT250
ioctl system call definition30
ioctl(2)
......I_POP35
......TIOCREMOTE278
......TIOCSIGNAL282
ioctl(2)
......general processing132 to 133
......I_LIST151
......I_SETSIG events117
......I_STR40
......I_STR processing134 to 135
......transparent135 to 151
ioctl(2)
......handled by ptem(7)275
......hardware emulation module271
......I_ATMARK70
......I_CANPUT70
......I_CKBAND69
......I_GETBAND69
......I_LINK216, 333
......I_PLINK333
......I_PUNLINK333
......I_RECVFD255, 336
......I_SENDFD255, 336
......I_STR333
......I_UNLINK221, 333
......supported by ldterm(7)266
......supported by master driver281
isastream(3C)255

J

job control119 to 122
......terminology119 to 120

K

kernel thread45

L

ldterm(7)263
LIFO
.....module add/remove38
line discipline module
.....close264
.....description263 to 270
.....in job control121
.....in pseudo-tty subsystem273
.....ioctl(2)266
.....open264
link editing7
linkb361
linkblk structure329
linked queues30
linking messages56
lower multiplexer20

M

M_BREAK331
M_COPYIN
.....transparent ioctl example139 to 143
M_COPYIN342
M_COPYOUT
.....transparent ioctl example143 to 146
M_COPYOUT343
.....with M_IOCTL335
M_CTL332
.....with line discipline module263
M_DATA
.....example52
M_DATA14
M_DATA332
M_DELAY332
M_ERROR343
M_FLUSH344
.....flags344
.....in module example174
.....in pipemod252
.....packet mode279
M_HANGUP345
M_IOCACK346
.....with M_COPYOUT343
.....with M_IOCTL334
M_IOCDATA346
M_IOCNAK347
......with M_COPYOUT343
......with M_IOCTL334
M_IOCTL
......example52
M_IOCTL333 to 336
......transparent334
......with M_COPYOUT343
M_PASSFP336
M_PCPROTO14
M_PCPROTO348
M_PCRSE348
M_PCSIG348
M_PROTO14
M_PROTO336 to 337
M_READ348
M_RSE337
M_SETOPTS
......SO_READOPT options64
M_SETOPTS65, 338 to 341
......SO_FLAG338 to 341
......with ldterm(7)264
M_SIG
......in signaling118
M_SIG341
M_START349
M_STARTI349
M_STOP349
M_STOPI349
manipulating modules24
master driver
......in pseudo-tty subsystem272
......open279
mechanism
......STREAMS overview29
mechanism,STREAMS overview29
memory-mapped I/O105
message44
......priorities66
......priority90
......queues66
message (STREAMS)13
.....allocation99
.....control information14, 94
.....definition8
.....direction60
.....flow75
.....freeing100
.....handled by pckt(7)278
.....handled by ptem(7)275
.....high priority54, 342 to 349
.....ldterm(7) read side265
.....ldterm(7) write side266
.....linking into queues56
.....M_DATA59
.....M_DATA14
.....M_PCPROTO59
.....M_PCPROTO14
.....M_PROTO59
.....M_PROTO14
.....ordinary54, 331 to 342
.....processing75
.....put back on queue46
.....recovering from allocationfailure102
.....sending/receiving59
.....service interface82 to 94
.....structures56 to 57, 326 to 327
.....types13, 53
.....write offset value65
message block (STREAMS)8
message copy67
message ordering59
message priorities66
message processing45
message processing routines(STREAMS)43 to 46
.....design guidelines162 to 164
message queue (STREAMS)
.....priority15, 66 to 70
messages
.....high-priority67
.....zero-length250
minor device9
module16 to 18
.....character conversion39
......CHARPROC example50
......control information6
......declarations126
......definition6, 18
......difference with driver38
......draining36
......inserting36
......insertion7
......ioctl control39
......manipulation24
......null example128
......order of adding38
......pushable example48
......reusability26
......status information6
module,adding35
module,CANONPROC example51
module,removing35
module_info structure31
module_stat structure31
monitor
......multiple Streams116
monitoring a Stream111
MORECTL94
MOREDATA94
msgb(9S) data structure13
msgdsize361
msgpullup361
multiplexer
......building212 to 220
......controlling Stream217
......data routing222
......declarations229
......definition19
......design guidelines244
......driver228 to 239
......example225 to 227
......lower211
......lower connection223 to 224
......lower disconnection224
......lower read put procedure237 to 239
......lower write service procedure237
......upper211
......upper write put procedure232 to 235
.....upper write service procedure236
multiplexer ID
.....in multiplexer building216
.....in multiplexer dismantling221
multiplexing STREAMS18 to 23

N

named pipe (see FIFO)247
named Stream
.....description252 to 255
.....detaching254
.....error256
.....fattach(3C)253
.....fdetach(3C)254
.....file descriptor255
.....file descriptor passing255
.....isastream(3C)255
.....remote256
named Streams
.....path253
noenable361
NSTRPUSH35

O

O_NDELAY36
O_NDELAY
.....with M_SETOPTS340
O_NDELAY flag116
O_NONBLOCK36
O_NONBLOCK
.....with M_SETOPTS340
O_NONBLOCK flag116
open
.....device file33
open system call9
opening a Stream33
opensystem call30
organization of guide1
orphaned process group
.....in job control120
other documentation4
OTHERQ361
overview
......STREAMS mechanism29

P

packet mode
......description278
......messages278
panic59
passing44
passing messages44
path
......in named Streams253
pckt(7)278
pipe
......adding modules to248
......bidirectional247
......closing251
......creating248
......definition6, 247
......errors248
......flushing252
......reading from249
......writing to250
pipe creation34
pipe system call30
PIPE_BUF251
pipemod STREAMS module252
pipes
......STREAMS (see STREAMS-basedpipe)247
point-to-point9
poll system call30
pollfd structure114
POLLIN112
polling
......error events115
......events112
......example113 to 116
POLLOUT112
POLLPRI112
POLLRDBAND112
POLLRDNORM112
POLLWRBAND112
POLLWRNORM112
priority band data55, 156
.....flush handling example156
.....ioctl(2)69
.....routines68
priority band,example63
priority bands66
process groub
.....in job control120
process group leader
.....in job control120
process group lifetime
.....in job control120
process ID
.....in job control120
process lifetime
.....in job control120
processing
.....canonical47
.....character47
.....read-side49
protocol
.....migration25
.....portability24
.....substitution25
protocol messages,read65
pseudo-device driver20
pseudo-tty emulation module274 to 278
pseudo-tty subsystem272
.....description272 to 284
.....drivers279 to 282
.....ldterm(7)273
.....messages275
.....packet mode278
.....remote mode278
ptem structure277
ptem(7)274, 277
ptm (see master driver)272
pts (see slave driver)272
ptsname(3C)283
.....with pseudo-tty driver280
pullupmsg362
pushable module,example48
put362
put procedure13, 44
putbq362
putctl363
putctl1363
putmsg equivalents62
putmsg system call30
putmsg(2)60
putnext363
putpmsg function62
putpmsg system call30
putq364

Q

q_next33
qband structure31, 72
qbufcall370
qenable365
qinit structure31, 34
qprocson365
qreply366
qsize366
qtimeout370
queue
......data structures31
......definition8
......entry point31
......flags72
......initializing33
......limits33
......overview12
......pairs8
......routines43
......usingqband information73
queue pairs30
queue structure70
qunbufcall371
quntimeout371
qwriter372

R

RD366
read options
.....Stream head64
read side
.....definition8
.....ldterm(7) messages265
.....ldterm(7) processing265
.....put procedure168
read system call9, 30
read-side processing49
releasing callback requests105
RMODEMASK64
RMSGD64
RMSGN64
rmvb366
rmvq367
RNORM64
RPROTDAT65
RPROTDIS65
RPROTMASK65
RPROTNORM65

S

SAD (see STREAMS AdministrativeDriver)397
scheduler
.....STREAMS45
scheduler delay66
service interface23, 83 to 85
.....definition82
.....library example86 to 94
.....rules94
service primitive85
.....in service procedure87
service procedure13, 45, 80
.....implementation46
.....infinite loop46
service provider85
.....accessing88
.....closing91
......receiving data92
......sending data91
session
......in job control120
session ID
......in job control120
session leader
......in job control120
session lifetime
......in job control120
SIGHUP122
signal(2)111
signals118
......extended118
......in job control management121
......in STREAMS118
slave driver
......in pseudo-tty subsystem272
......open280
SO_FLAG
......in M_SETOPTS338 to 341
SO_WROFF value65
st_muxrinit34
st_muxwinit34
st_rdinit34
st_wdinit34
stdata
......data structure34
strapush structure397
strbuf structure61
strchg(1)151
strconf command151
STRCTLSZ parameter396
Stream
......controlling terminal122
......definition5
......hung-up122
......monitoring111
......simple5
Stream construction5, 30 to 36
......add/remove modules35
......close a Stream35
......define module/driver33
.....example36 to 41
.....open a Stream33
.....queue structures31
Stream head
.....definition5
.....intercepting I_STR40
.....processing control64
.....read options64
STREAMS
.....basic operations9 to 12
.....configuration383 to 399
.....manual pages401
.....mechanisms29
.....system calls9
.....tunable parameters395
.....typographic convention3
STREAMS Administrative Driver397 to 399
STREAMS benefits23 to 27
STREAMS components12 to 18
STREAMS data structures323 to 329
.....design165
.....dynamic allocation165
STREAMS debugging378 to 381
.....error and trace logging379 to 381
STREAMS definition5
STREAMS driver184 to 195
.....cloning195
.....close routine design161
.....declarations126
.....definition6, 18
.....design guidelines160 to 164, 209
.....environment125
.....flow control194
.....flush handling190
.....ioctl(2)130 to 152
.....loop-around198 to 209
.....open routine design161
.....printer driver example187 to 190
.....pseudo-tty279 to 282
.....pseudo-tty subsystem master272
.....pseudo-tty subsystem slave272
STREAMS message queues14
.....priority15 to 16
STREAMS module16 to 18, 167 to 176
......autopush facility396, 399
......close routine design161
......connld(7)258
......control information6
......declarations126
......definition6
......design guidelines160 to 164, 179
......environment125
......filter172
......flow control176 to 179
......ioctl(2)130 to 152
......line discipline263
......null module example128
......open routine design161
......ptem(7)274
......read side put procedure168
......routines168 to 172
......service interface example94 to 99
......service procedure171
......status information6
......write side put procedure169
STREAMS multiplexing18 to 23
STREAMS queue
......definition8
......flags72, 73
......qband structure72
......queue structure70
......structures324 to 326
......using equeue information73
......using qband information73
STREAMS scheduler45
......in service procedure45
STREAMS system calls30
STREAMS utility routines351 to 369
STREAMS-based pipe6
......atomic write251
......basic operations248 to 251
......creation34
......creation errors248
......definition247
......PIPE_BUF251
STREAMS-based pseudo-terminalsubsystem (see pseudo-ttysubsystem)272
STREAMS-based terminal subsystem (seetty subsystem)261
streamtab structure34
strioctl structure40
strioctl structure328
strlog367
STRMSGSZ parameter396
stroptions structure329
strqget68
strqget368
strqset69
strqset368
synchronous input/output
.....in polling112
system calls, STREAMS30
system crash59

T

terminal options
.....STREAMS example47
termio(7)121
termio(7)
.....default flag values263
testb368
thread
.....service procedure45
transparent ioctl
.....M_COPYIN example139 to 143
.....M_COPYOUT example143 to 146
.....messages138
.....processing135 to 151
tty subsystem
.....benefits261
.....description261 to 272
.....hardware emulation module270 to 272
.....ldterm(7)263
.....setup262

U

unbufcall369
unique connection (STREAMS)256 to 259
unlinkb369
unlockpt(3C)283
......with pseudo-tty driver280
upper multiplexer20
upper Stream19
upstream
......definition8

W

watermarks55
WR369
write
......less than requested116
write offset in messages65
write side
......definition8
......ldterm(7)266
......put procedure169
write system call9, 30
writing to250

Z

zero-length messages250