Content-type: text/html
msgb - Defines a STREAMS message block
#include <sys/stream.h>
struct msgb {
struct msgb *b_next;
struct msgb *b_prev;
struct msgb *b_cont;
unsigned char *b_rptr;
unsigned char *b_wptr;
struct datab *b_datap;
MSG_KERNEL_FIELDS
};
The msgb structure defines a message block. A message block carries data or information in a stream. A STREAMS message consists of message blocks linked through b_cont. Each message block points to a data block descriptor, which in turn points to a data buffer.
The msgb structure is typedefed as mblk_t. The associated data block is stored in a datab structure, which is typedefed as dblk_t.
The datab structure is defined (in sys/stream.h) as:
struct datab {
struct datab * db_freep;
unsigned char * db_base;
unsigned char * db_lim;
unsigned char db_ref;
unsigned char db_type;
unsigned char db_class;
unsigned char db_pad[1];
};
The datab fields are defined as follows:
Messages are typed according to the value in the db_type field in the associated datab structure. Some possible type values are:
As part of its support for STREAMS, Tru64 UNIX provides the following interfaces for exchanging messages betweens STREAMS modules on the one hand and sockets and network protocols on the other: mbuf_to_mblk() - Converts an mbuf chain to an mblk chain mblk_to_mbuf() - Converts an mblk chain to an mbuf chain delim off