STREAMS/UX for the HP 9000 Reference Manual

152
Debugging STREAMS/UX Modules and Drivers
STREAMS/UX Debugging Tool
The user notes that there are 256 bytes in this message (b_wptr - b_rptr =
256). The user looks at the next message by entering the n key.
n
struct msgb 0x513780 S:3
b_next = 0x0
b_prev = 0x50da00
b_cont = 0x0
b_rptr = 0x4efc00
b_wptr = 0x4efd00
b_datap = 0x5137c0
b_band = 0
b_pad1 = 00
b_flag = 0x0
b_pad2 = 0
This message also contains 256 bytes. The user enters navigation
commands to view lo's write queue. The user examines the sizes of the
messages on this queue. They are also 256 bytes. The user reads
documentation describing how STREAMS/UX executes the write() system
call. According to the stream(2) man page, STREAMS/UX fragments when
the data size is larger than the topmost stream module's maxpsz. lo is the
topmost stream module; its maxpsz is 256.
The user can fix this problem in two ways. One way is to change the test
program to perform multiple reads to receive all the data. Another way is to
change the driver's maxpsz to be 1024.