xref: /titanic_52/usr/src/man/man9s/msgb.9s (revision 6a1af1a67532df169a657cce07140be64bdea084)
te
Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved.
Copyright 1989 AT&T
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
msgb 9S "11 Apr 1991" "SunOS 5.11" "Data Structures for Drivers"
NAME
msgb, mblk - STREAMS message block structure
SYNOPSIS

#include <sys/stream.h> 
INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI)

DESCRIPTION

A STREAMS message is made up of one or more message blocks, referenced by a pointer to a msgb structure. The b_next and b_prev pointers are used to link messages together on a QUEUE. The b_cont 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 *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 */

Valid flags are as follows:

MSGMARK

Last byte of message is marked.

MSGDELIM

Message is delimited.

The msgb structure is defined as type mblk_t.

SEE ALSO

datab(9S)

Writing Device Drivers

STREAMS Programming Guide