datab(D4) datab(D4)
NAME
datab - STREAMS data block structure
SYNOPSIS
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/ddi.h>
DESCRIPTION
The datab structure describes the data of a STREAMS message.
USAGE
The actual data contained in a STREAMS message is stored in a
data buffer pointed to by this structure. A message block
structure [msgb(D4)] includes a field that points to a datab
structure.
A data block can have more than one message block pointing to
it at one time, so 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 Definitions
The datab structure is defined as type dblk_t and contains the
following members:
uchar_t *db_base; /* first byte of buffer */
uchar_t *db_lim; /* last byte (+1) of buffer */
uchar_t db_ref; /* # of message pointers to this data */
uchar_t db_type; /* message type */
The db_base field points to the beginning of the data buffer.
Drivers and modules should not change this field.
The db_lim field points to one byte past the end of the data
buffer. Drivers and modules should not change this field.
The db_ref field contains a count of the number of message
blocks sharing the data buffer. If it is greater than 1,
drivers and modules should not change the contents of the data
buffer. Drivers and modules should not change this field.
The db_type field contains the message type associated with
the data buffer. This field can be changed by the driver.
However, if the db_ref field is greater than 1, this field
should not be changed.
Copyright 1994 Novell, Inc. Page 1
datab(D4) datab(D4)
REFERENCES
free_rtn(D4), messages(D5), msgb(D4)
NOTICES
Portability
All processors
Copyright 1994 Novell, Inc. Page 2