xref: /illumos-gate/usr/src/man/man9s/datab.9s (revision 6e6545bfaed3bab9ce836ee82d1abd8f2edba89a)
te
Copyright (c) 2003 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]
DATAB 9S "Oct 24, 2003"
NAME
datab, dblk - STREAMS message data structure
SYNOPSIS

#include <sys/stream.h>
INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

DESCRIPTION

The datab structure describes the data of a STREAMS message. The actual data contained in a STREAMS message is stored in a data buffer pointed to by this structure. A msgb (message block) structure includes a field that points to a datab structure.

Because a data block can have more than one message block pointing to it at one time, the db_ref member keeps track of a data block's references, preventing it from being deallocated until all message blocks are finished with it.

STRUCTURE MEMBERS
unsigned char *db_base; /* first byte of buffer */
unsigned char *db_lim; /* last byte (+1) of buffer */
unsigned char db_ref; /* # of message pointers to this data */
unsigned char db_type; /* message type */

A datab structure is defined as type dblk_t.

SEE ALSO

free_rtn(9S), msgb(9S)

Writing Device Drivers

STREAMS Programming Guide