| Current File : //usr/man/man9s/msgb.9s |
'\" te
.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T
.TH msgb 9S "11 Apr 1991" "SunOS 5.11" "Data Structures for Drivers"
.SH NAME
msgb, mblk \- STREAMS message block structure
.SH SYNOPSIS
.LP
.nf
#include <sys/stream.h>
.fi
.SH INTERFACE LEVEL
.sp
.LP
Architecture independent level 1 (DDI/DKI)
.SH DESCRIPTION
.sp
.LP
A STREAMS message is made up of one or more message blocks, referenced by a pointer to a \fBmsgb\fR structure. The \fBb_next\fR and \fBb_prev\fR pointers are used to link messages together on a \fBQUEUE\fR. The \fBb_cont\fR pointer links message blocks together when a message consists of more than one block.
.sp
.LP
Each \fBmsgb\fR structure also includes a pointer to a \fBdatab\fR(9S) structure, the data block (which contains pointers to the actual data of the message), and the type of the message.
.SH STRUCTURE MEMBERS
.sp
.in +2
.nf
struct msgb *b_next; /* next message on queue */
struct msgb *b_prev; /* previous message on queue */
struct msgb *b_cont; /* next message block */
unsigned char *b_rptr; /* 1st unread data byte of buffer */
unsigned char *b_wptr; /* 1st unwritten data byte of buffer */
struct datab *b_datap; /* pointer to data block */
unsigned char b_band; /* message priority */
unsigned short b_flag; /* used by stream head */
.fi
.in -2
.sp
.LP
Valid flags are as follows:
.sp
.ne 2
.mk
.na
\fB\fBMSGMARK\fR \fR
.ad
.RS 13n
.rt
Last byte of message is marked.
.RE
.sp
.ne 2
.mk
.na
\fB\fBMSGDELIM\fR \fR
.ad
.RS 13n
.rt
Message is delimited.
.RE
.sp
.LP
The \fBmsgb\fR structure is defined as type \fBmblk_t\fR.
.SH SEE ALSO
.sp
.LP
\fBdatab\fR(9S)
.sp
.LP
\fIWriting Device Drivers for Oracle Solaris 11.2\fR
.sp
.LP
\fISTREAMS Programming Guide\fR