Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ msgb(D4DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

msgb(D4DK)  —  

NAME

msgb − STREAMS message block structure

SYNOPSIS

#include <sys/types.h>
#include <sys/stream.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 fields are read-only to drivers and modules. 

STRUCTURE MEMBERS

struct msgb ∗b_next; /∗ next message on queue ∗/
struct msgb ∗b_prev; /∗ previous message on queue ∗/
struct msgb ∗b_cont; /∗ next block in message ∗/
uchar_t ∗b_rptr; /∗ 1st unread data byte of buffer ∗/
uchar_t ∗b_wptr; /∗ 1st unwritten data byte of buffer ∗/
struct datab ∗b_datap; /∗ pointer to data block ∗/
uchar_t b_band; /∗ message priority  ∗/
ushort_t b_flag; /∗ used by stream head  ∗/

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

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

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

The b_datap field points to the data block [see datab(D4DK)] associated with the message block.  This field should never be changed by modules or drivers. 

The b_band field 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 field can be used to alter the queueing priority of the message.  The higher the priority band, the closer to the head of the queue the message is placed. 

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

MSGMARKThe last byte in the message is “marked.” This condition is testable from user level via the I_ATMARK ioctl(2). 

NOTES

The msgb structure is defined as type mblk_t. 

SEE ALSO

Programmer’s Guide: STREAMS

allocb(D3DK), esballoc(D3DK), freeb(D3DK), datab(D4DK), free_rtn(D4DK), messages(D5DK)

DDI/DKI  —  STREAMS

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026