DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

datab(D4str)


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(D4str), includes a member 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;
   uchar_t	*db_lim;
   uchar_t	db_ref;
   uchar_t	db_type;

Structure members


db_base
points to the beginning of the data buffer. Drivers and modules should not change this member.

db_lim
points to one byte past the end of the data buffer. Drivers and modules should not change this member.

db_ref
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 member.

db_type
contains the message type associated with the data buffer. This member can be changed by the driver. If the db_ref member is greater than 1, this member should not be changed.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp

References

free_rtn(D4str), Intro(D7str), msgb(D4str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005