'\"macro stdmacro
.if n .pH ddi_dki.bcanput @(#)bcanput	40.5 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} bcanput D3DK "STREAMS" "DDI/DKI" "\&"
.if \nX=1 .ds x} bcanput D3DK "STREAMS" "DDI/DKI"
.if \nX=2 .ds x} bcanput D3DK "" "\&"
.if \nX=3 .ds x} bcanput "" "" "\&"
.TH \*(x}
.IX "\f4bcanput\fP(D3DK)"
.IX "STREAMS message queues"
.IX "message (STREAMS)"
.SH NAME
\f4bcanput\f1 \- test for flow control in specified priority band
.SH SYNOPSIS
.nf
.na
\f4#include <sys/stream.h>
.sp 0.5
int bcanput(\f4queue_t *\f1\f2q, \f4unsigned char\f1 \f2pri\f4);\f1
.ad
.fi
.SH ARGUMENT
.RS 0n
.IP "\f2q\f1" 10n
Pointer to the message queue.
.IP "\f2pri\f1" 10n
Message priority.
.RE
.SH DESCRIPTION
Like the \f4canput\f1(D3DK) function,
\f4bcanput\f1 searches through the stream (starting at \f2q\f1)
until it finds a queue containing
a service routine where the message can be enqueued, or until it reaches
the end of the stream.  If found, the queue containing the service routine
is tested to see if there is room for a message in the queue.
If the queue is full, \f4bcanput\f1 sets the \f4QWANTW\f1 flag
to back-enable the caller's service routine.
.P
If \f2pri\f1 is \f40\f1, the \f4bcanput\f1 call is equivalent to
a call to \f4canput\f1.
.P
\f3NOTE:\f1
You are responsible for both testing a queue with
\f4bcanput\f1 and refraining from placing a message on the queue if
\f4bcanput\f1 fails.
.SH "RETURN VALUE"
A \f41\f1 is returned if a message of priority \f2pri\f1 can be 
placed on the queue,
or if the band does not yet exist on the queue.
A \f40\f1 is returned if the priority band
is flow-controlled.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 7, ``STREAMS''
.P
.na
\f4canput\f1(D3DK),
\f4putbq\f1(D3DK),
\f4putnext\f1(D3DK)
.ad
