Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ msgb(D4) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       msgb(D4)                                                    msgb(D4)


       NAME
             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 fields 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;   /* 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(D4).  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(D4)]
             associated with the message block.  This field should never be
             changed by modules or drivers.




                           Copyright 1994 Novell, Inc.               Page 1













      msgb(D4)                                                    msgb(D4)


            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 queuing 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:

            MSGMARK       The last byte in the message is ``marked.''
                          This condition is testable from user level via
                          the I_ATMARK ioctl(2).

      REFERENCES
            allocb(D3), datab(D4), esballoc(D3), freeb(D3), free_rtn(D4),
            messages(D5)

      NOTICES
         Portability
            All processors

























                          Copyright 1994 Novell, Inc.               Page 2








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