'\" te .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 1989 AT&T .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH STROPTIONS 9S "Nov 14, 1996" .SH NAME stroptions \- options structure for M_SETOPTS message .SH SYNOPSIS .LP .nf #include #include #include #include .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI) .SH DESCRIPTION .sp .LP The \fBM_SETOPTS\fR message contains a \fBstroptions\fR structure and is used to control options in the stream head. .SH STRUCTURE MEMBERS .sp .in +2 .nf uint_t so_flags; /* options to set */ short so_readopt; /* read option */ ushort_t so_wroff; /* write offset */ ssize_t so_minpsz; /* minimum read packet size */ ssize_t so_maxpsz; /* maximum read packet size */ size_t so_hiwat; /* read queue high water mark */ size_t so_lowat; /* read queue low water mark */ unsigned char so_band; /* band for water marks */ ushort_t so_erropt; /* error option */ .fi .in -2 .sp .LP The following are the flags that can be set in the \fBso_flags\fR bit mask in the \fBstroptions\fR structure. Note that multiple flags can be set. .sp .ne 2 .na \fB\fBSO_READOPT\fR\fR .ad .RS 21n Set read option. .RE .sp .ne 2 .na \fB\fBSO_WROFF\fR\fR .ad .RS 21n Set write offset. .RE .sp .ne 2 .na \fB\fBSO_MINPSZ\fR\fR .ad .RS 21n Set minimum packet size .RE .sp .ne 2 .na \fB\fBSO_MAXPSZ\fR\fR .ad .RS 21n Set maximum packet size. .RE .sp .ne 2 .na \fB\fBSO_HIWAT\fR\fR .ad .RS 21n Set high water mark. .RE .sp .ne 2 .na \fB\fBSO_LOWAT\fR\fR .ad .RS 21n Set low water mark. .RE .sp .ne 2 .na \fB\fBSO_MREADON\fR\fR .ad .RS 21n Set read notification ON. .RE .sp .ne 2 .na \fB\fBSO_MREADOFF\fR\fR .ad .RS 21n Set read notification OFF. .RE .sp .ne 2 .na \fB\fBSO_NDELON\fR\fR .ad .RS 21n Old TTY semantics for NDELAY reads and writes. .RE .sp .ne 2 .na \fB\fBSO_NDELOFFSTREAMS\fR\fR .ad .RS 21n Semantics for NDELAY reads and writes. .RE .sp .ne 2 .na \fB\fBSO_ISTTY\fR\fR .ad .RS 21n The stream is acting as a terminal. .RE .sp .ne 2 .na \fB\fBSO_ISNTTY\fR\fR .ad .RS 21n The stream is not acting as a terminal. .RE .sp .ne 2 .na \fB\fBSO_TOSTOP\fR\fR .ad .RS 21n Stop on background writes to this stream. .RE .sp .ne 2 .na \fB\fBSO_TONSTOP\fR\fR .ad .RS 21n Do not stop on background writes to this stream. .RE .sp .ne 2 .na \fB\fBSO_BAND\fR\fR .ad .RS 21n Water marks affect band. .RE .sp .ne 2 .na \fB\fBSO_ERROPT\fR\fR .ad .RS 21n Set error option. .RE .sp .LP When \fBSO_READOPT\fR is set, the \fBso_readopt\fR field of the \fBstroptions\fR structure can take one of the following values. See \fBread\fR(2). .sp .ne 2 .na \fB\fBRNORM\fR\fR .ad .RS 9n Read message normal. .RE .sp .ne 2 .na \fB\fBRMSGD\fR\fR .ad .RS 9n Read message discard. .RE .sp .ne 2 .na \fB\fBRMSGN\fR\fR .ad .RS 9n Read message, no discard. .RE .sp .LP When \fBSO_BAND\fR is set, \fBso_band\fR determines to which band \fBso_hiwat\fR and \fBso_lowat\fR apply. .sp .LP When \fBSO_ERROPT\fR is set, the \fBso_erropt\fR field of the \fBstroptions\fR structure can take a value that is either none or one of: .sp .ne 2 .na \fB\fBRERRNORM\fR\fR .ad .RS 18n Persistent read errors; default. .RE .sp .ne 2 .na \fB\fBRERRNONPERSIST\fR\fR .ad .RS 18n Non-persistent read errors. .RE .sp .LP \fBOR'ed \fRwith either none or one of: .sp .ne 2 .na \fB\fBWERRNORM\fR\fR .ad .RS 18n Persistent write errors; default. .RE .sp .ne 2 .na \fB\fBWERRNONPERSIST\fR\fR .ad .RS 18n Non-persistent write errors. .RE .SH SEE ALSO .sp .LP .BR read (2), .BR streamio (4I) .sp .LP \fISTREAMS Programming Guide\fR