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

msgb(D4str)


msgb -- STREAMS message block structure

Synopsis

   #include <sys/types.h>
   #include <sys/stream.h>
   #include <sys/ddi.h>

Description

A STREAMS message is made up of one or more message blocks, referenced by a pointer to a msgb structure. When a message is on a queue, all members are read-only to drivers and modules.

Usage

Structure definitions

The msgb structure is defined as type mblk_t and contains the following members:
   struct msgb	*b_next;
   struct msgb	*b_prev;
   struct msgb	*b_cont;
   uchar_t	*b_rptr;
   uchar_t	*b_wptr;
   struct datab	*b_datap;
   uchar_t	b_band;
   ushort_t	b_flag;

Structure members


b_next and b_prev
pointers that are used to link messages together on a queue(D4str). These members can be used by drivers and modules to create linked lists of messages.

b_cont
links message blocks together when a message is composed of more than one block. Drivers and modules can use this member to create complex messages from single message blocks.

b_rptr and b_wptr
describe the valid data region in the associated data buffer. The b_rptr member points to the first unread byte in the buffer and the b_wptr member points to the next byte to be written in the buffer.

b_datap
points to the datab(D4str) data block that is associated with the message block. Modules and drivers must not change this member.

b_band
contains the priority band associated with the message. Normal priority messages and high priority messages have b_band set to zero. High priority messages are high priority by virtue of their message type. This member can be used to alter the queuing priority of the message. The higher the priority band, the closer to the head of the queue the message is placed.

b_flag
contains a bitmask of flags that can be set to alter the way the stream head will process the message. Valid flags are:

MSGMARK
The last byte in the message is ``marked.'' This condition is testable from user level with I_ATMARK.

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

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