'\"macro stdmacro
.if n .pH ddi_dki.unlinkb @(#)unlinkb	40.6 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} unlinkb D3DK "STREAMS" "DDI/DKI" "\&"
.if \nX=1 .ds x} unlinkb D3DK "STREAMS" "DDI/DKI"
.if \nX=2 .ds x} unlinkb D3DK "" "\&"
.if \nX=3 .ds x} unlinkb "" "" "\&"
.TH \*(x}
.IX "\f4unlinkb\fP(D3DK)"
.SH NAME
\f4unlinkb\f1 \- remove a message block from the head of a message
.SH SYNOPSIS
.nf
.na
\f4#include <sys/stream.h>
.sp 0.5
mblk_t *unlinkb(mblk_t *\f2mp\f4);\f1
.ad
.fi
.SH ARGUMENT
.RS 0n 10
.IP "\f2mp\f1" 10n
Pointer to the message.
.RE
.SH DESCRIPTION
\f4unlinkb\f1 removes the first message block from the message pointed
to by \f2mp\f1.  A new message, minus the removed message block, is
returned.
.SH RETURN VALUE
If successful, \f4unlinkb\f1 returns a pointer to the message with the first
message block removed.
If there is only one message block in the message,
\f4NULL\f1 is returned.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 7, ``STREAMS''
.P
.na
\f4linkb\f1(D3DK)
.ad
.SH EXAMPLE
.IX "\f4freeb\fP(D3DK), example"
.IX "\f4unlinkb\fP(D3DK), example"
.P
The routine expects to get passed an \f4M_PROTO T_DATA_IND\f1
message.  It will remove and free the \f4M_PROTO\f1 header and
return the remaining \f4M_DATA\f1 portion of the message.
.P
.ne 4
.P
.nf
.ft 4
.ps 7
 1  mblk_t *
 2  makedata(mp)
 3      mblk_t *mp;
 4  {
 5	mblk_t *nmp;
 6
 7	nmp = unlinkb(mp);
 8	freeb(mp);
 9	return(nmp);
10  }
.ps
.ft 1
.fi
.P
.FG "unlinkb \- remove message block\f1"
