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]
#include <sys/stream.h> #include <sys/stropts.h> #include <sys/ddi.h> #include <sys/sunddi.h>
Architecture independent level 1 (DDI/DKI)
The M_SETOPTS message contains a stroptions structure and is used to control options in the stream head.
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 */
The following are the flags that can be set in the so_flags bit mask in the stroptions structure. Note that multiple flags can be set. SO_READOPT
Set read option.
Set write offset.
Set minimum packet size
Set maximum packet size.
Set high water mark.
Set low water mark.
Set read notification ON.
Set read notification OFF.
Old TTY semantics for NDELAY reads and writes.
Semantics for NDELAY reads and writes.
The stream is acting as a terminal.
The stream is not acting as a terminal.
Stop on background writes to this stream.
Do not stop on background writes to this stream.
Water marks affect band.
Set error option.
When SO_READOPT is set, the so_readopt field of the stroptions structure can take one of the following values. See read(2). RNORM
Read message normal.
Read message discard.
Read message, no discard.
When SO_BAND is set, so_band determines to which band so_hiwat and so_lowat apply.
When SO_ERROPT is set, the so_erropt field of the stroptions structure can take a value that is either none or one of: RERRNORM
Persistent read errors; default.
Non-persistent read errors.
OR'ed with either none or one of: WERRNORM
Persistent write errors; default.
Non-persistent write errors.
read (2), streamio (4I)
STREAMS Programming Guide