'\"macro stdmacro
.if n .pH ddi_dki.putctl1 @(#)putctl1	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} putctl1 D3DK "STREAMS" "DDI/DKI" "\&"
.if \nX=1 .ds x} putctl1 D3DK "STREAMS" "DDI/DKI"
.if \nX=2 .ds x} putctl1 D3DK "" "\&"
.if \nX=3 .ds x} putctl1 "" "" "\&"
.TH \*(x}
.IX "\f4putctl1\fP(D3DK)"
.SH NAME
\f4putctl1\f1 \- send a control message with a one-byte parameter to a queue
.SH SYNOPSIS
.nf
.na
\f4#include <sys/stream.h>
.sp 0.5
int putctl1(queue_t *\f2q, \f4int\f2 type, \f4int\f2 p\f4);\f1
.ad
.fi
.SH ARGUMENTS
.RS 0n
.IP "\f2q\f1" 10n
Queue to which the message is to be sent.
.IP "\f2type\f1" 10n
Type of message.
.IP "\f2p\f1" 10n
One-byte parameter.
.RE
.SH DESCRIPTION
\f4putctl1\f1, like \f4putctl\f1(D3DK), tests the \f2type\f1
argument to make sure a data type has
not been specified, and attempts to allocate a message block.
The \f2p\f1
parameter can be used, for example, to
specify how long the
delay will be when an \f4M_DELAY\f1 message is being sent.
\f4putctl1\f1 fails if \f4type\f1 is \f4M_DATA\f1, \f4M_PROTO\f1,
or \f4M_PCPROTO\f1, or if a mesage block cannot be allocated.
If successful, \f4putctl1\f1 calls the \f4put\f1(D2DK) routine of the queue
pointed to by \f2q\f1.
.SH RETURN VALUE
On success, \f41\f1 is returned. \f40\f1 is returned if \f2type\f1
is a data type, or if a message block cannot be allocated.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 7, ``STREAMS''
.P
.na
\f4allocb\f1(D3DK),
\f4datamsg\f1(D3DK),
\f4putctl\f1(D3DK)
.ad
.SH EXAMPLE
See the \f4putctl\f1(D3DK) function page for an example of \f4putctl1\f1.
