1
0
Files
irix-657m-src/eoe/man/manD/msgb.d4
2022-09-29 17:59:04 +03:00

89 lines
2.7 KiB
Plaintext

'\"! tbl | mmdoc
'\"macro stdmacro
.if n .pH ddi.rm/d4/gen/msgb @(#)msgb 43.8 of 11/18/92
.\" Copyright 1992, 1991 UNIX System Laboratories, Inc.
.TH msgb D4
.IX "\f4msgb\fP(D4)"
.SH NAME
\f4msgb\fP \- STREAMS message block structure
.SH SYNOPSIS
.nf
.na
.ft 4
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/ddi.h>
.ft 1
.ad
.fi
.SH DESCRIPTION
A STREAMS message is made up of one or more message blocks, referenced by a
pointer to a \f4msgb\fP structure.
When a message is on a queue, all
fields are read-only to drivers and modules.
.SH USAGE
.SS Structure Definitions
The \f4msgb\fP structure is defined as type \f4mblk_t\fP
and contains the following members:
.P
.TS
lf4 2 lf4 2 lf4.
struct msgb *b_next; /* next message on queue */
struct msgb *b_prev; /* previous message on queue */
struct msgb *b_cont; /* next block in message */
uchar_t *b_rptr; /* 1st unread data byte of buffer */
uchar_t *b_wptr; /* 1st unwritten data byte of buffer */
struct datab *b_datap; /* pointer to data block */
uchar_t b_band; /* message priority */
ushort_t b_flag; /* used by stream head */
.TE
The \f4b_next\fP and \f4b_prev\fP pointers are used to link
messages together on a \f4queue\fP(D4).
These fields can be used
by drivers and modules to create linked lists of messages.
.P
The \f4b_cont\fP pointer links message blocks together when a message is
composed of more than one block.
Drivers and modules can use this
field to create complex messages from single message blocks.
.P
The \f4b_rptr\fP and \f4b_wptr\fP pointers describe the valid data
region in the associated data buffer.
The \f4b_rptr\fP field points
to the first unread byte in the buffer and the \f4b_wptr\fP field
points to the next byte to be written in the buffer.
.P
The \f4b_datap\fP field points to the data block [see \f4datab\fP(D4)]
associated with the message block.
This field should never be changed
by modules or drivers.
.P
The \f4b_band\fP field contains the priority band associated with the message.
Normal priority messages and high priority messages have \f4b_band\fP set
to zero.
High priority messages are high priority by virtue of their
message type.
This field can be used to alter the queuing priority of
the message.
The higher the priority band, the closer to the head of the
queue the message is placed.
.P
The \f4b_flag\fP field contains a bitmask of flags that can be set to
alter the way the stream head will process the message.
Valid flags are:
.RS 0
.IP \f4MSGMARK\fP 14n
The last byte in the message is ``marked.''
This condition is
testable from user level via the \f4I_ATMARK\fP \f4ioctl\fP(2).
.RE
.SH REFERENCES
.na
\f4allocb\fP(D3),
\f4datab\fP(D4),
\f4esballoc\fP(D3),
\f4freeb\fP(D3),
\f4free_rtn\fP(D4),
\f4messages\fP(D5)
.ad