'\"!  pic | mmdoc
'\"macro stdmacro
.if n .pH ddi_dki.linkb @(#)linkb	40.7 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} linkb D3DK "STREAMS" "DDI/DKI" "\&"
.if \nX=1 .ds x} linkb D3DK "STREAMS" "DDI/DKI"
.if \nX=2 .ds x} linkb D3DK "" "\&"
.if \nX=3 .ds x} linkb "" "" "\&"
.TH \*(x}
.IX "\f4linkb\fP(D3DK)"
.SH NAME
\f4linkb\f1 \- concatenate two message blocks
.SH SYNOPSIS
.nf
.na
\f4#include <sys/stream.h>
.sp 0.5
void linkb(mblk_t *\f2mp1, \f4mblk_t *\f2mp2\f4);\f1
.ad
.fi
.SH ARGUMENTS
.RS 0n 10
.IP "\f2mp1\f1" 10n
The message to which \f2mp2\f1 is to be added.
\f4mblk_t\f1 is an instance of the \f4msgb\f1(D4DK)
structure.
.IP "\f2mp2\f1" 10n
The message to be added.
.RE
.SH DESCRIPTION
\f4linkb\f1 creates a new message by
adding \f2mp2\f1 to the tail of \f2mp1\f1.
The continuation pointer (\f4b_cont\f1) of the first message is set to point
to the second message:
.nf
.PS
scale=100
define t302 |
[ box invis ht 26 wid 36 with .sw at 0,0
"\fH\s8\&data\f1\s0" at 18,20
"\fH\s8\&buffer\f1\s0" at 18,6
] |

define t302 |
[ box invis ht 26 wid 36 with .sw at 0,0
"\fH\s8\&data\f1\s0" at 18,20
"\fH\s8\&buffer\f1\s0" at 18,6
] |

define t317 |
[ box invis ht 34 wid 54 with .sw at 0,0
"\f4\s8\&b_datap\f1\s0" at 0,28 ljust
"\f4\s8\&\f1\s0" at 0,17 ljust
"\f4\s8\&b_cont\f1\s0" at 0,6 ljust
] |

define t294 |
[ box invis ht 34 wid 72 with .sw at 0,0
"\f4\s8\&b_datap\f1\s0" at 0,28 ljust
"\f4\s8\&\f1\s0" at 0,17 ljust
"\f4\s8\&b_cont (0)\f1\s0" at 0,6 ljust
] |

define m0 |
[ box invis ht 54 wid 70 with .sw at 0,0
"\f4\s8\&db_base\f1\s0" at 30,27
box ht 54 wid 70 with .nw at 0,54 
] |

define m1 |
[ box invis ht 56 wid 66 with .sw at 0,0
box ht 56 wid 66 with .nw at 0,56 
t302 with .nw at 14,44
] |

define m2 |
[ box invis ht 56 wid 94 with .sw at 0,0
box ht 56 wid 94 with .nw at 0,56 
t294 with .nw at 10,44
] |

define m3 |
[ box invis ht 56 wid 94 with .sw at 0,0
box ht 56 wid 94 with .nw at 0,56 
t317 with .nw at 10,44
] |

box invis ht 172 wid 368 with .sw at 0,0
line -> from 158,62 to 196,62 
line -> from 256,62 to 302,62 
"\f4\s8\&mp1\f1\s0" at 14,149
"\f4\s9\&linkb(mp1, mp2);\f1\s0" at 222,-8
"\f4\s8\&mp2\f1\s0" at 48,69
line  from 128,124 to 146,124 
line -> from 146,124 to 146,80 
m1 with .nw at 302,172
m1 with .nw at 302,90
m0 with .nw at 196,88
m0 with .nw at 196,172
m3 with .nw at 44,162
m2 with .nw at 76,80
line -> from 128,146 to 196,146 
line -> from 258,146 to 302,146 
.PE
.fi
.FG "Concatenating two messages with linkb"
.SH RETURN VALUE
None
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 7, ``STREAMS''
.P
.na
\f4unlinkb\f1(D3DK)
.ad
.SH EXAMPLE
See the \f4dupb\f1(D3DK) function page for an example of \f4linkb\f1.
