1
0
Files
irix-657m-src/eoe/man/manD/datab.d4
2022-09-29 17:59:04 +03:00

73 lines
2.0 KiB
Plaintext

.if n .pH ddi.rm/d4/gen/datab @(#)datab 43.9 of 12/9/92
.\" Copyright 1992, 1991 UNIX System Laboratories, Inc.
.TH datab D4
.IX "\f4datab\fP(D4)"
.SH NAME
\f4datab\fP \- STREAMS data block structure
.SH SYNOPSIS
.nf
.na
.ft 4
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/ddi.h>
.ft 1
.ad
.fi
.SH DESCRIPTION
The \f4datab\fP structure describes the
data of a STREAMS message.
.SH USAGE
The actual data contained in a STREAMS message is stored in a data buffer pointed
to by this structure.
A message block structure [\f4msgb\fP(D4)]
includes a field that points to a \f4datab\fP structure.
.P
A data block can have more than one message block pointing to it at one time,
so the \f4db_ref\fP member keeps track of a data block's references,
preventing it from being deallocated until all message blocks are finished
with it.
.SS Structure Definitions
The \f4datab\fP structure is defined as type \f4dblk_t\fP
and contains the following members:
.IX "\f4datab\fP(D4), structure members"
.RS 0
.ps -1
.vs -1
.ft 4
.nf
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 */
.fi
.ft
.ps
.vs
.RE
.sp 0.2
The \f4db_base\fP field points to the beginning of the data buffer.
Drivers and
modules should not change this field.
.P
The \f4db_lim\fP field points to one byte past the end of the data buffer.
Drivers and
modules should not change this field.
.P
The \f4db_ref\fP 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.
.P
The \f4db_type\fP field contains the message type associated with the data buffer.
This field can be changed by the driver.
However, if the \f4db_ref\fP field is greater than 1,
this field should not be changed.
.SH REFERENCES
.na
\f4free_rtn\fP(D4),
\f4messages\fP(D5),
\f4msgb\fP(D4)
.ad