1msgb(9S)                  Data Structures for Drivers                 msgb(9S)
2
3
4

NAME

6       msgb, mblk - STREAMS message block structure
7

SYNOPSIS

9       #include <sys/stream.h>
10
11

INTERFACE LEVEL

13       Architecture independent level 1 (DDI/DKI)
14

DESCRIPTION

16       A  STREAMS message is made up of one or more message blocks, referenced
17       by a pointer to a msgb structure. The b_next and  b_prev  pointers  are
18       used  to  link  messages together on a QUEUE. The  b_cont pointer links
19       message blocks together when a message consists of more than one block.
20
21
22       Each  msgb structure also includes a pointer to a  datab(9S) structure,
23       the  data block (which contains pointers to the actual data of the mes‐
24       sage), and the type of the message.
25

STRUCTURE MEMBERS

27         struct msgb     *b_next;    /* next message on queue */
28         struct msgb     *b_prev;    /* previous message on queue */
29         struct msgb     *b_cont;    /* next message block */
30         unsigned char   *b_rptr;    /* 1st unread data byte of buffer */
31         unsigned char   *b_wptr;    /* 1st unwritten data byte of buffer */
32         struct datab    *b_datap;   /* pointer to data block */
33         unsigned char   b_band;     /* message priority  */
34         unsigned short  b_flag;     /* used by stream head  */
35
36
37
38       Valid flags are as follows:
39
40       MSGMARK      Last byte of message is marked.
41
42
43       MSGDELIM     Message is delimited.
44
45
46
47       The msgb structure is defined as type mblk_t.
48

SEE ALSO

50       datab(9S)
51
52
53       Writing Device Drivers
54
55
56       STREAMS Programming Guide
57
58
59
60SunOS 5.11                        11 Apr 1991                         msgb(9S)
Impressum