Data Structures for Drivers msgb(9S)
NAME
msgb, mblk - STREAMS message block structure
SYNOPSIS
#include
INTERFACE LEVEL
Architecture independent level 1 (DI/DKI)
DESCRIPTION
A STREAMS message is made up of one or more message blocks,
referenced by a pointer to a msgb structure. The bnext and
bprev pointers are used to link messages together on a
QUEUE. The bcont pointer links message blocks together
when a message consists of more than one block.
Each msgb structure also includes a pointer to a datab(9S)
structure, the data block (which contains pointers to the
actual data of the message), and the type of the message.
STRUCTURE MEMBERS
struct msgb *bnext; /* next message on queue */
struct msgb *bprev; /* previous message on queue */
struct msgb *bcont; /* next message block */
unsigned char *brptr; /* 1st unread data byte of buffer */
unsigned char *bwptr; /* 1st unwritten data byte of buffer */
struct datab *bdatap; /* pointer to data block */
unsigned char bband; /* message priority */
unsigned short bflag; /* used by stream head */
Valid flags are as follows:
MSGMARK Last byte of message is marked.
MSGDELIM Message is delimited.
The msgb structure is defined as type mblkt.
SEE ALSO
datab(9S)
Writing Device Drivers
SunOS 5.11 Last change: 11 Apr 1991 1
Data Structures for Drivers msgb(9S)
STREAMS Programming Guide
SunOS 5.11 Last change: 11 Apr 1991 2
|