diff options
Diffstat (limited to 'usr/src/man/man7m')
| -rw-r--r-- | usr/src/man/man7m/Makefile | 54 | ||||
| -rw-r--r-- | usr/src/man/man7m/bufmod.7m | 349 | ||||
| -rw-r--r-- | usr/src/man/man7m/connld.7m | 145 | ||||
| -rw-r--r-- | usr/src/man/man7m/kb.7m | 1605 | ||||
| -rw-r--r-- | usr/src/man/man7m/ldterm.7m | 314 | ||||
| -rw-r--r-- | usr/src/man/man7m/pckt.7m | 53 | ||||
| -rw-r--r-- | usr/src/man/man7m/pfmod.7m | 255 | ||||
| -rw-r--r-- | usr/src/man/man7m/pipemod.7m | 56 | ||||
| -rw-r--r-- | usr/src/man/man7m/ptem.7m | 70 | ||||
| -rw-r--r-- | usr/src/man/man7m/sppptun.7m | 41 | ||||
| -rw-r--r-- | usr/src/man/man7m/timod.7m | 184 | ||||
| -rw-r--r-- | usr/src/man/man7m/tirdwr.7m | 170 | ||||
| -rw-r--r-- | usr/src/man/man7m/ttcompat.7m | 735 | ||||
| -rw-r--r-- | usr/src/man/man7m/usb_ah.7m | 95 | ||||
| -rw-r--r-- | usr/src/man/man7m/usbkbm.7m | 209 | ||||
| -rw-r--r-- | usr/src/man/man7m/usbms.7m | 360 | ||||
| -rw-r--r-- | usr/src/man/man7m/vuidmice.7m | 316 |
17 files changed, 5011 insertions, 0 deletions
diff --git a/usr/src/man/man7m/Makefile b/usr/src/man/man7m/Makefile new file mode 100644 index 0000000000..f48875c261 --- /dev/null +++ b/usr/src/man/man7m/Makefile @@ -0,0 +1,54 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet +# at http://www.illumos.org/license/CDDL. +# + +# Copyright 2011, Richard Lowe + +include ../../Makefile.master + +MANSECT = 7m + +COMMON_MANFILES = bufmod.7m \ + connld.7m \ + ldterm.7m \ + pckt.7m \ + pfmod.7m \ + pipemod.7m \ + ptem.7m \ + sppptun.7m \ + timod.7m \ + tirdwr.7m \ + ttcompat.7m \ + usb_ah.7m \ + usbkbm.7m \ + usbms.7m \ + vuidmice.7m + +sparc_MANFILES= kb.7m + +MANSOFILES = vuid2ps2.7m \ + vuid3ps2.7m \ + vuidm3p.7m \ + vuidm4p.7m \ + vuidm5p.7m + +MANFILES = $(COMMON_MANFILES) $($(MACH)_MANFILES) $(MANSOFILES) + +vuid2ps2.7m := SOSRC = man7m/vuidmice.7m +vuid3ps2.7m := SOSRC = man7m/vuidmice.7m +vuidm3p.7m := SOSRC = man7m/vuidmice.7m +vuidm4p.7m := SOSRC = man7m/vuidmice.7m +vuidm5p.7m := SOSRC = man7m/vuidmice.7m + +.KEEP_STATE: + +include ../Makefile.man + +install: $(ROOTMANFILES) diff --git a/usr/src/man/man7m/bufmod.7m b/usr/src/man/man7m/bufmod.7m new file mode 100644 index 0000000000..adc3585054 --- /dev/null +++ b/usr/src/man/man7m/bufmod.7m @@ -0,0 +1,349 @@ +'\" te +.\" Copyright (c) 1999, Sun Microsystems, Inc. All Rights Reserved +.\" 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 bufmod 7M "11 Nov 1997" "SunOS 5.11" "STREAMS Modules" +.SH NAME +bufmod \- STREAMS Buffer Module +.SH SYNOPSIS +.LP +.nf +\fB#include <sys/bufmod.h>\fR +.fi + +.LP +.nf +\fBioctl(fd, I_PUSH, "bufmod");\fR +.fi + +.SH DESCRIPTION +.sp +.LP +\fBbufmod\fR is a \fBSTREAMS\fR module that buffers incoming messages, reducing +the number of system calls and the associated overhead required to read and +process them. Although \fBbufmod\fR was originally designed to be used in +conjunction with \fBSTREAMS-based\fR networking device drivers, the version +described here is general purpose so that it can be used anywhere \fBSTREAMS\fR +input buffering is required. +.SS "Read-side Behavior" +.sp +.LP +The behavior of \fBbufmod\fR depends on various parameters and flags that can +be set and queried as described below under \fBIOCTLS\fR. \fBbufmod\fR collects +incoming \fBM_DATA\fR messages into chunks, passing each chunk upstream when +the chunk becomes full or the current read timeout expires. It optionally +converts \fBM_PROTO\fR messages to \fBM_DATA\fR and adds them to chunks as +well. It also optionally adds to each message a header containing a timestamp, +and a cumulative count of messages dropped on the stream read side due to +resource exhaustion or flow control. Thedefault settings of \fBbufmod\fR allow +it to drop messages when flow control sets in or resources are exhausted; +disabling headers and explicitly requesting no drops makes \fBbufmod\fR pass +all messages through. Finally, \fBbufmod\fR is capable of truncating upstream +messages to a fixed, programmable length. +.sp +.LP +When a message arrives, \fBbufmod\fR processes it in several steps. The +following paragraphs discuss each step in turn. +.sp +.LP +Upon receiving a message from below, if the \fBSB_NO_HEADER\fR flag is not set, +\fBbufmod\fR immediately timestamps it and saves the current time value for +later insertion in the header described below. +.sp +.LP +Next, if \fBSB_NO_PROTO_CVT\fR is not set, \fBbufmod\fR converts all leading +\fBM_PROTO\fR blocks in the message to \fBM_DATA\fR blocks, altering only the +message type field and leaving the contents alone. +.sp +.LP +It then truncates the message to the current \fIsnapshot length\fR, which is +set with the \fBSBIOCSSNAP\fR \fBioctl\fR described below. +.sp +.LP +Afterwards, if \fBSB_NO_HEADER\fR is not set, \fBbufmod\fR prepends a header to +the converted message. This header is defined as follows. +.sp +.in +2 +.nf +struct sb_hdr { + uint_t sbh_origlen; + uint_t sbh_msglen; + uint_t sbh_totlen; + uint_t sbh_drops; +#if defined(_LP64) || defined(_I32LPx) + struct timeval32 sbh_timestamp; +#else + struct timeval sbh_timestamp; +#endif /* !_LP64 */ +}; +.fi +.in -2 + +.sp +.LP +The \fBsbh_origlen\fR field gives the message's original length before +truncation in bytes. The \fBsbh_msglen\fR field gives the length in bytes of +the message after the truncation has been done. \fBsbh_totlen\fR gives the +distance in bytes from the start of the truncated message in the current chunk +(described below) to the start of the next message in the chunk; the value +reflects any padding necessary to insure correct data alignment for the host +machine and includes the length of the header itself. \fBsbh_drops\fR reports +the cumulative number of input messages that this instance of \fBbufmod\fR has +dropped due to flow control or resource exhaustion. In the current +implementation message dropping due to flow control can occur only if the +\fBSB_NO_DROPS\fR flag is not set. (Note: this accounts only for events +occurring within \fBbufmod\fR, and does not count messages dropped by +downstream or by upstream modules.) The \fBsbh_timestamp\fR field contains the +message arrival time expressed as a \fBstruct timeval\fR. +.sp +.LP +After preparing a message, \fBbufmod\fR attempts to add it to the end of the +current chunk, using the chunk size and timeout values to govern the addition. +The chunk size and timeout values are set and inspected using the \fBioctl()\fR +calls described below. If adding the new message would make the current chunk +grow larger than the chunk size, \fBbufmod\fR closes off the current chunk, +passing it up to the next module in line, and starts a new chunk. If adding the +message would still make the new chunk overflow, the module passes it upward in +an over-size chunk of its own. Otherwise, the module concatenates the message +to the end of the current chunk. +.sp +.LP +To ensure that messages do not languish forever in an accumulating chunk, +\fBbufmod\fR maintains a read timeout. Whenever this timeout expires, the +module closes off the current chunk and passes it upward. The module restarts +the timeout period when it receives a read side data message and a timeout is +not currently active. These two rules insure that \fBbufmod\fR minimizes the +number of chunks it produces during periods of intense message activity and +that it periodically disposes of all messages during slack intervals, but +avoids any timeout overhead when there is no activity. +.sp +.LP +\fBbufmod\fR handles other message types as follows. Upon receiving an +\fBM_FLUSH\fR message specifying that the read queue be flushed, the module +clears the currently accumulating chunk and passes the message on to the module +or driver above. (Note: \fBbufmod\fR uses zero length \fBM_CTL\fR messages for +internal synchronization and does not pass them through.) \fBbufmod\fR passes +all other messages through unaltered to its upper neighbor, maintaining message +order for non high priority messages by passing up any accumulated chunk first. +.sp +.LP +If the \fBSB_DEFER_CHUNK\fR flag is set, buffering does not begin until the +second message is received within the timeout window. +.sp +.LP +If the \fBSB_SEND_ON_WRITE\fR flag is set, \fBbufmod\fR passes up the read side +any buffered data when a message is received on the write side. +\fBSB_SEND_ON_WRITE\fR and \fBSB_DEFER_CHUNK\fR are often used together. +.SS "Write-side Behavior" +.sp +.LP +\fBbufmod\fR intercepts \fBM_IOCTL\fR messages for the \fBioctl\fRs described +below. The module passes all other messages through unaltered to its lower +neighbor. If \fBSB_SEND_ON_WRITE\fR is set, message arrival on the writer side +suffices to close and transmit the current read side chunk. +.SH IOCTLS +.sp +.LP +\fBbufmod\fR responds to the following \fBioctl\fRs. +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCSTIME\fR \fR +.ad +.RS 16n +.rt +Set the read timeout value to the value referred to by the \fBstruct timeval\fR +pointer given as argument. Setting the timeout value to zero has the +side-effect of forcing the chunk size to zero as well, so that the module will +pass all incoming messages upward immediately upon arrival. Negative values are +rejected with an \fBEINVAL\fR error. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCGTIME\fR \fR +.ad +.RS 16n +.rt +Return the read timeout in the \fBstruct timeval\fR pointed to by the argument. +If the timeout has been cleared with the \fBSBIOCCTIME\fR \fBioctl\fR, return +with an \fBERANGE\fR error. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCCTIME\fR \fR +.ad +.RS 16n +.rt +Clear the read timeout, effectively setting its value to infinity. This results +in no timeouts being active and the chunk being delivered when it is full. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCSCHUNK\fR \fR +.ad +.RS 16n +.rt +Set the chunk size to the value referred to by the \fIuint_t\fR pointer given +as argument. See Notes for a description of effect on stream head high water +mark. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCGCHUNK\fR \fR +.ad +.RS 16n +.rt +Return the chunk size in the \fIuint_t\fR pointed to by the argument. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCSSNAP\fR \fR +.ad +.RS 16n +.rt +Set the current snapshot length to the value given in the \fBuint_t\fR pointed +to by the \fBioctl\fR's final argument. \fBbufmod\fR interprets a snapshot +length value of zero as meaning infinity, so it will not alter the message. See +Notes for a description of effect on stream head high water mark. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCGSNAP\fR \fR +.ad +.RS 16n +.rt +Returns the current snapshot length in the \fBuint_t\fR pointed to by the +\fBioctl\fR's final argument. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCSFLAGS\fR \fR +.ad +.RS 16n +.rt +Set the current flags to the value given in the \fBuint_t\fR pointed to by the +\fBioctl\fR's final argument. Possible values are a combination of the +following. +.sp +.ne 2 +.mk +.na +\fB\fBSB_SEND_ON_WRITE\fR \fR +.ad +.RS 21n +.rt +Transmit the read side chunk on arrival of a message on the write side. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSB_NO_HEADER\fR \fR +.ad +.RS 21n +.rt +Do not add headers to read side messages. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSB_NO_DROPS\fR \fR +.ad +.RS 21n +.rt +Do not drop messages due to flow control upstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSB_NO_PROTO_CVT\fR \fR +.ad +.RS 21n +.rt +Do not convert \fBM_PROTO\fR messages into \fBM_DATA\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSB_DEFER_CHUNK\fR \fR +.ad +.RS 21n +.rt +Begin buffering on arrival of the second read side message in a timeout +interval. +.RE + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSBIOCGFLAGS\fR \fR +.ad +.RS 16n +.rt +Returns the current flags in the \fBuint_t\fR pointed to by the \fBioctl\fR's +final argument. +.RE + +.SH SEE ALSO +.sp +.LP +\fBdlpi\fR(7P), \fBpfmod\fR(7M) +.SH NOTES +.sp +.LP +Older versions of \fBbufmod\fR did not support the behavioral flexibility +controlled by the \fBSBIOCSFLAGS\fR \fBioctl\fR. Applications that wish to take +advantage of this flexibility can guard themselves against old versions of the +module by invoking the \fBSBIOCGFLAGS\fR ioctl and checking for an \fBEINVAL\fR +error return. +.sp +.LP +When buffering is enabled by issuing an \fBSBIOCSCHUNK\fR ioctl to set the +chunk size to a non zero value, \fBbufmod\fR sends a \fBSETOPTS\fR message to +adjust the stream head high and low water marks to accommodate the chunked +messages. +.sp +.LP +When buffering is disabled by setting the chunk size to zero, message +truncation can have a significant influence on data traffic at the stream head +and therefore the stream head high and low water marks are adjusted to new +values appropriate for the smaller truncated message sizes. +.SH BUGS +.sp +.LP +\fBbufmod\fR does not defend itself against allocation failures, so that it is +possible, although very unlikely, for the stream head to use inappropriate high +and low water marks after the chunk size or snapshot length have changed. diff --git a/usr/src/man/man7m/connld.7m b/usr/src/man/man7m/connld.7m new file mode 100644 index 0000000000..5ce36093b9 --- /dev/null +++ b/usr/src/man/man7m/connld.7m @@ -0,0 +1,145 @@ +'\" te +.\" Copyright 2004 AT&T +.\" Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved +.\" 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 connld 7M "3 May 2004" "SunOS 5.11" "STREAMS Modules" +.SH NAME +connld \- line discipline for unique stream connections +.SH SYNOPSIS +.LP +.nf +\fB#include </sys/steam.h>\fR +.fi + +.LP +.nf +\fBint ioctl(\fIfd\fR,I_PUSH,"connld");\fR +.fi + +.SH DESCRIPTION +.sp +.LP +\fBconnld\fR is a STREAMS-based module that provides unique connections between +server and client processes. It can only be pushed (see \fBstreamio\fR(7I)) +onto one end of a STREAMS-based pipe that may subsequently be attached to a +name in the file system name space with \fBfattach\fR(3C). After the pipe end +is attached, a new pipe is created internally when an originating process +attempts to \fBopen\fR(2) or \fBcreat\fR(2) the file system name. A file +descriptor for one end of the new pipe is packaged into a message identical to +that for the ioctl \fBI_SENDFD\fR (see \fBstreamio\fR(7I)) and is transmitted +along the stream to the server process on the other end. The originating +process is blocked until the server responds. +.sp +.LP +The server responds to the \fBI_SENDFD\fR request by accepting the file +descriptor through the \fBI_RECVFD\fR ioctl message. When this happens, the +file descriptor associated with the other end of the new pipe is transmitted to +the originating process as the file descriptor returned from \fBopen\fR(2) or +\fBcreat\fR(2). +.sp +.LP +If the server does not respond to the \fBI_SENDFD\fR request, the stream that +the \fBconnld\fR module is pushed on becomes uni-directional because the server +will not be able to retrieve any data off the stream until the \fBI_RECVFD\fR +request is issued. If the server process exits before issuing the +\fBI_RECVFD\fR request, the \fBopen\fR(2) or the \fBcreat\fR(2) invocation will +fail and return -1 to the originating process. +.sp +.LP +When the \fBconnld\fR module is pushed onto a pipe, it ignores messages going +back and forth through the pipe. +.SH ERRORS +.sp +.LP +On success, an open of \fBconnld\fR returns 0. On failure, \fBerrno\fR is set +to the following values: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR \fR +.ad +.RS 11n +.rt +A stream onto which \fBconnld\fR is being pushed is not a pipe or the pipe does +not have a write queue pointer pointing to a stream head read queue. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR \fR +.ad +.RS 11n +.rt +The other end of the pipe onto which \fBconnld\fR is being pushed is linked +under a multiplexor. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPIPE\fR \fR +.ad +.RS 11n +.rt +\fBconnld\fR is being pushed onto a pipe end whose other end is no longer +there. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR \fR +.ad +.RS 11n +.rt +An internal pipe could not be created. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENXIO\fR \fR +.ad +.RS 11n +.rt +An \fBM_HANGUP\fR message is at the stream head of the pipe onto which +\fBconnld\fR is being pushed. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEAGAIN\fR \fR +.ad +.RS 11n +.rt +Internal data structures could not be allocated. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENFILE\fR \fR +.ad +.RS 11n +.rt +A file table entry could not be allocated. +.RE + +.SH SEE ALSO +.sp +.LP +\fBcreat\fR(2), \fBopen\fR(2), \fBfattach\fR(3C), \fBstreamio\fR(7I) +.sp +.LP +\fISTREAMS Programming Guide\fR diff --git a/usr/src/man/man7m/kb.7m b/usr/src/man/man7m/kb.7m new file mode 100644 index 0000000000..045870f5c3 --- /dev/null +++ b/usr/src/man/man7m/kb.7m @@ -0,0 +1,1605 @@ +'\" te +.\" All Rights Reserved Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved +.\" 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 kb 7M "26 Feb 2004" "SunOS 5.11" "STREAMS Modules" +.SH NAME +kb \- keyboard STREAMS module +.SH SYNOPSIS +.LP +.nf +#include <sys/types.h> +.fi + +.LP +.nf +#include <sys/stream.h> +.fi + +.LP +.nf +#include <sys/stropts.h> +.fi + +.LP +.nf +#include <sys/vuid_event.h> +.fi + +.LP +.nf +#include <sys/kbio.h> +.fi + +.LP +.nf +#include <sys/kbd.h> +.fi + +.LP +.nf +ioctl(fd, I_PUSH, "kb"); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBkb\fR STREAMS module processes byte streams generated by a keyboard +attached to a \fBCPU\fR serial port. Definitions for altering keyboard +translation and reading events from the keyboard are contained in +<\fBsys/kbio.h\fR> and <\fBsys/kbd.h\fR>. +.sp +.LP +The \fBkb\fR STREAMS module utilizes a set of keyboard tables to recognize +which keys have been typed. Each translation table is an array of 128 16-bit +words (\fBunsigned short\fRs). If a table entry is less than 0x100, the entry +is treated as an \fBISO\fR 8859/1 character. Higher values indicate special +characters that invoke more complicated actions. +.SS "Keyboard Translation Mode" +.sp +.LP +The keyboard can be in one of the following translation modes: +.sp +.ne 2 +.mk +.na +\fB\fBTR_NONE\fR \fR +.ad +.RS 21n +.rt +Keyboard translation is turned off and up/down key codes are reported. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTR_ASCII\fR \fR +.ad +.RS 21n +.rt +\fBISO\fR 8859/1 codes are reported. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTR_EVENT\fR \fR +.ad +.RS 21n +.rt +\fBfirm_events\fR are reported. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTR_UNTRANS_EVENT\fR \fR +.ad +.RS 21n +.rt +\fBfirm_events\fR containing unencoded keystation codes are reported for all +input events within the window system. +.RE + +.SS "Keyboard Translation-Table Entries" +.sp +.LP +All instances of the \fBkb\fR module share seven translation tables that +convert raw keystation codes to event values. The tables are: +.sp +.ne 2 +.mk +.na +\fBUnshifted\fR +.ad +.RS 14n +.rt +Used when a key is depressed and no shifts are in effect. +.RE + +.sp +.ne 2 +.mk +.na +\fBShifted\fR +.ad +.RS 14n +.rt +Used when a key is depressed and a Shift key is held down. +.RE + +.sp +.ne 2 +.mk +.na +\fBCaps Lock\fR +.ad +.RS 14n +.rt +Used when a key is depressed and Caps Lock is in effect. +.RE + +.sp +.ne 2 +.mk +.na +\fBAlt Graph\fR +.ad +.RS 14n +.rt +Used when a key is depressed and the Alt Graph key is held down. +.RE + +.sp +.ne 2 +.mk +.na +\fBNum Lock\fR +.ad +.RS 14n +.rt +Used when a key is depressed and Num Lock is in effect. +.RE + +.sp +.ne 2 +.mk +.na +\fBControlled\fR +.ad +.RS 14n +.rt +Used when a key is depressed and the Control key is held down. (Regardless of +whether a Shift key or the Alt Graph is being held down, or whether Caps Lock +or Num Lock is in effect). +.RE + +.sp +.ne 2 +.mk +.na +\fBKey Up\fR +.ad +.RS 14n +.rt +Used when a key is released. +.RE + +.sp +.LP +Each key on the keyboard has a \fBkey station\fR code that represents a number +from 0 to 127. The number is used as an index into the translation table that +is currently in effect. If the corresponding entry in the translation table is +a value from 0 to 255, the value is treated as an \fBISO\fR 8859/1 character, +and the character is the result of the translation. +.sp +.LP +If the entry in the translation table is higher than 255, it is a special +entry. Special entry values are classified according to the value of the +high-order bits. The high-order value for each class is defined as a constant, +as shown below. When added to the constant, the value of the low-order bits +distinguish between keys within each class: +.sp +.ne 2 +.mk +.na +\fBSHIFTKEYS 0x100 \fR +.ad +.RS 20n +.rt +A shift key. The value of the particular shift key is added to determine which +shift mask to apply: +.sp +.ne 2 +.mk +.na +\fB\fBCAPSLOCK 0\fR \fR +.ad +.RS 17n +.rt +Caps Lock key. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSHIFTLOCK 1\fR \fR +.ad +.RS 17n +.rt +"Shift Lock" key. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBLEFTSHIFT 2\fR \fR +.ad +.RS 17n +.rt +Left-hand Shift key. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBRIGHTSHIFT 3\fR \fR +.ad +.RS 17n +.rt +Right-hand Shift key. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBLEFTCTRL 4\fR \fR +.ad +.RS 17n +.rt +Left-hand (or only) Control key. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBRIGHTCTRL 5\fR \fR +.ad +.RS 17n +.rt +Right-hand Control key. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBALTGRAPH 9\fR \fR +.ad +.RS 17n +.rt + Alt Graph key. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBALT 10\fR \fR +.ad +.RS 17n +.rt + Alternate or Alt key. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBNUMLOCK 11\fR \fR +.ad +.RS 17n +.rt + Num Lock key. +.RE + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBBUCKYBITS 0x200\fR \fR +.ad +.RS 20n +.rt +Used to toggle mode-key-up/down status without altering the value of an +accompanying \fBISO\fR 8859/1 character. The actual bit-position value, minus +7, is added. +.sp +.ne 2 +.mk +.na +\fB\fBMETABIT 0\fR \fR +.ad +.RS 16n +.rt +The Meta key was pressed along with the key. This is the only user-accessible +bucky bit. It is ORed in as the 0x80 bit; since this bit is a legitimate bit in +a character, the only way to distinguish between, for example, 0xA0 as +\fBMETA+0x20\fR and 0xA0 as an 8-bit character is to watch for META key up and +META key down events and keep track of whether the \fBMETA\fR key was down. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSYSTEMBIT 1\fR \fR +.ad +.RS 16n +.rt +The System key was pressed. This is a place holder to indicate which key is the +system-abort key. +.RE + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFUNNY 0x300\fR \fR +.ad +.RS 20n +.rt +Performs various functions depending on the value of the low 4 bits: +.sp +.ne 2 +.mk +.na +\fB\fBNOP 0x300\fR \fR +.ad +.RS 20n +.rt +Does nothing. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBOOPS 0x301\fR \fR +.ad +.RS 20n +.rt +Exists, but is undefined. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBHOLE 0x302\fR \fR +.ad +.RS 20n +.rt +There is no key in this position on the keyboard, and the position-code should +not be used. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBRESET 0x306\fR \fR +.ad +.RS 20n +.rt +Keyboard reset. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBERROR 0x307\fR \fR +.ad +.RS 20n +.rt +The keyboard driver detected an internal error. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBIDLE 0x308\fR \fR +.ad +.RS 20n +.rt +The keyboard is idle (no keys down). +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBCOMPOSE 0x309\fR \fR +.ad +.RS 20n +.rt +The \fBCOMPOSE\fR key; the next two keys should comprise a two-character +COMPOSE key sequence. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBNONL 0x30A\fR \fR +.ad +.RS 20n +.rt +Used only in the Num Lock table; indicates that this key is not affected by the +Num Lock state, so that the translation table to use to translate this key +should be the one that would have been used had Num Lock not been in effect. +.RE + +.sp +.ne 2 +.mk +.na +\fB0x30B \(em 0x30F\fR +.ad +.RS 20n +.rt +Reserved for non-parameterized functions. +.RE + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFA_CLASS 0x400\fR \fR +.ad +.RS 20n +.rt +A floating accent or "dead key." When this key is pressed, the next key +generates an event for an accented character; for example, "floating accent +grave" followed by the "a" key generates an event with the \fBISO\fR 8859/1 +code for the "a with grave accent" character. The low-order bits indicate which +accent; the codes for the individual "floating accents" are as follows: +.sp +.ne 2 +.mk +.na +\fB\fBFA_UMLAUT 0x400\fR \fR +.ad +.RS 21n +.rt +umlaut +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFA_CFLEX 0x401\fR \fR +.ad +.RS 21n +.rt +circumflex +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFA_TILDE 0x402\fR \fR +.ad +.RS 21n +.rt +tilde +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFA_CEDILLA 0x403\fR \fR +.ad +.RS 21n +.rt +cedilla +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFA_ACUTE 0x404\fR \fR +.ad +.RS 21n +.rt +acute accent +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFA_GRAVE 0x405\fR \fR +.ad +.RS 21n +.rt +grave accent +.RE + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSTRING 0x500\fR \fR +.ad +.RS 20n +.rt +The low-order bits index a table of strings. When a key with a \fBSTRING\fR +entry is depressed, the characters in the null-terminated string for that key +are sent, character-by-character. The maximum length is defined as: +.sp +.ne 2 +.mk +.na +\fBKTAB_STRLEN \fR +.ad +.RS 16n +.rt +10 +.RE + +Individual string numbers are defined as: +.sp +.ne 2 +.mk +.na +\fBHOMEARROW \fR +.ad +.RS 15n +.rt +0x00 +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBUPARROW\fR \fR +.ad +.RS 15n +.rt +0x01 +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBDOWNARROW\fR \fR +.ad +.RS 15n +.rt +0x02 +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBLEFTARROW\fR \fR +.ad +.RS 15n +.rt +0x03 +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBRIGHTARROW\fR \fR +.ad +.RS 15n +.rt +0x04 +.RE + +String numbers 0x05 \(em 0x0F are available for custom entries. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFUNCKEYS 0x600\fR \fR +.ad +.RS 20n +.rt +There are 64 keys reserved for function keys. The actual positions are usually +on the left/right/top/bottom of the keyboard. +.sp +The next-to-lowest 4 bits indicate the group of function keys: +.sp +.ne 2 +.mk +.na +\fB\fBLEFTFUNC \fR \fR +.ad +.RS 18n +.rt +0x600 +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBRIGHTFUNC \fR \fR +.ad +.RS 18n +.rt +0x610 +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTOPFUNC 0x610\fR \fR +.ad +.RS 18n +.rt +0x610 +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBBOTTOMFUNC \fR \fR +.ad +.RS 18n +.rt +0x630 +.RE + +The low 4 bits indicate the function key number within the group: +.sp +.ne 2 +.mk +.na +\fBLF(\fIn\fR)\fR +.ad +.RS 10n +.rt +(LEFTFUNC+(\fIn\fR)-1) +.RE + +.sp +.ne 2 +.mk +.na +\fBRF(\fIn\fR) \fR +.ad +.RS 10n +.rt +(RIGHTFUNC+(\fIn\fR)-1) +.RE + +.sp +.ne 2 +.mk +.na +\fBTF(\fIn\fR) \fR +.ad +.RS 10n +.rt +(TOPFUNC+(\fIn\fR)-1) +.RE + +.sp +.ne 2 +.mk +.na +\fBBF(\fIn\fR) \fR +.ad +.RS 10n +.rt +(BOTTOMFUNC+(\fIn\fR)-1) +.RE + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPADKEYS 0x700\fR \fR +.ad +.RS 18n +.rt +A "numeric keypad key." These entries should appear only in the Num Lock +translation table; when Num Lock is in effect, these events will be generated +by pressing keys on the right-hand keypad. The low-order bits indicate which +key. The codes for the individual keys are: +.sp +.ne 2 +.mk +.na +\fB\fBPADEQUAL 0x700\fR \fR +.ad +.RS 19n +.rt +"=" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPADSLASH 0x701\fR \fR +.ad +.RS 19n +.rt +"/" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPADSTAR 0x702\fR \fR +.ad +.RS 19n +.rt +"*" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPADMINUS 0x703\fR \fR +.ad +.RS 19n +.rt +"-" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPADSEP 0x704\fR \fR +.ad +.RS 19n +.rt +"," key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD7 0x705\fR \fR +.ad +.RS 19n +.rt +"7" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD8 0x706\fR \fR +.ad +.RS 19n +.rt +"8" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD9 0x707\fR \fR +.ad +.RS 19n +.rt +"9" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPADPLUS 0x708\fR \fR +.ad +.RS 19n +.rt +"+" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD4 0x709\fR \fR +.ad +.RS 19n +.rt +"4" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD5 0x70A\fR \fR +.ad +.RS 19n +.rt +"5" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD6 0x70B\fR \fR +.ad +.RS 19n +.rt +"6" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD1 0x70C\fR \fR +.ad +.RS 19n +.rt +"1" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD2 0x70D\fR \fR +.ad +.RS 19n +.rt +"2" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD3 0x70E\fR \fR +.ad +.RS 19n +.rt +"3" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPAD0 0x70F\fR \fR +.ad +.RS 19n +.rt +"0" key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPADDOT 0x710\fR \fR +.ad +.RS 19n +.rt +"." key +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPADENTER 0x711\fR \fR +.ad +.RS 19n +.rt +"Enter" key +.RE + +.RE + +.sp +.LP +When a function key is pressed in \fBTR_ASCII\fR mode, the following escape +sequence is sent: +.sp +.LP +\fBESC[0\|.\|.\|..\|9z\fR +.sp +.LP +where \fBESC\fR is a single escape character and "0\|.\|..\|9" indicates the +decimal representation of the function-key value. For example, function key +\fBR1\fR sends the sequence: +.sp +.LP +\fBESC[208z\fR +.sp +.LP +because the decimal value of RF(1) is 208. In \fBTR_EVENT\fR mode, if there is +a \fBVUID\fR event code for the function key in question, an event with that +event code is generated; otherwise, individual events for the characters of the +escape sequence are generated. +.SS "Keyboard Compatibility Mode" +.sp +.LP +When started, the \fBkb\fR STREAMS module is in the compatibility mode. When +the keyboard is in the \fBTR_EVENT\fR translation mode, \fBISO\fR 8859/1 +characters from the upper half of the character set (that is, characters with +the eighth bit set) , are presented as events with codes in the \fBISO_FIRST\fR +range (as defined in <\fB<sys/vuid_event.h>\fR>). For backwards compatibility +with older versions of the keyboard driver, the event code is \fBISO_FIRST\fR +plus the character value. When compatibility mode is turned off, \fBISO\fR +8859/1 characters are presented as events with codes equal to the character +code. +.SH DESCRIPTION +.sp +.LP +The following \fBioctl()\fR requests set and retrieve the current translation +mode of a keyboard: +.sp +.ne 2 +.mk +.na +\fB\fBKIOCTRANS\fR \fR +.ad +.RS 15n +.rt +Pointer to an \fBint\fR. The translation mode is set to the value in the +\fBint\fR pointed to by the argument. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCGTRANS\fR \fR +.ad +.RS 15n +.rt +Pointer to an \fBint\fR. The current translation mode is stored in the +\fBint\fR pointed to by the argument. +.RE + +.sp +.LP +\fBioctl()\fR requests for changing and retrieving entries from the keyboard +translation table use the \fBkiockeymap\fR structure: +.sp +.in +2 +.nf +struct kiockeymap { +int kio_tablemask; /* Translation table (one of: 0, CAPSMASK, + * SHIFTMASK, CTRLMASK, UPMASK, + * ALTGRAPHMASK, NUMLOCKMASK) + */ +#define KIOCABORT1 -1 /* Special "mask": abort1 keystation */ +#define KIOCABORT2 -2 /* Special "mask": abort2 keystation */ + uchar_t kio_station; /* Physical keyboard key station (0-127) */ + ushort_t kio_entry; /* Translation table station's entry */ + char kio_string[10]; /* Value for STRING entries-null terminated */ +}; +.fi +.in -2 + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCSKEY\fR \fR +.ad +.RS 13n +.rt +Pointer to a \fBkiockeymap\fR structure. The translation table entry referred +to by the values in that structure is changed. The \fBkio_tablemask\fR request +specifies which of the following translation tables contains the entry to be +modified: +.sp +.ne 2 +.mk +.na +\fB\fBUPMASK 0x0080\fR \fR +.ad +.sp .6 +.RS 4n +"Key Up" translation table. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBNUMLOCKMASK 0x0800\fR \fR +.ad +.sp .6 +.RS 4n +"Num Lock" translation table. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBCTRLMASK 0x0030\fR \fR +.ad +.sp .6 +.RS 4n +"Controlled" translation table. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBALTGRAPHMASK 0x0200\fR \fR +.ad +.sp .6 +.RS 4n +"Alt Graph" translation table. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSHIFTMASK 0x000E\fR \fR +.ad +.sp .6 +.RS 4n +"Shifted" translation table. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBCAPSMASK 0x0001\fR \fR +.ad +.sp .6 +.RS 4n +"Caps Lock" translation table. +.RE + +.sp +.ne 2 +.mk +.na +\fB(No shift keys pressed or locked)\fR +.ad +.sp .6 +.RS 4n +"Unshifted" translation table. +.RE + +.RE + +.sp +.LP +The \fBkio_station\fR request specifies the keystation code for the entry to be +modified. The value of \fBkio_entry\fR is stored in the entry in question. If +\fBkio_entry\fR is between \fBSTRING\fR and \fBSTRING+15,\fR the string +contained in \fBkio_string\fR is copied to the appropriate string table entry. +This call may return \fBEINVAL\fR if there are invalid arguments. +.sp +.LP +Special values of \fBkio_tablemask\fR can affect the two step "break to the +\fBPROM\fR monitor" sequence. The usual sequence is \fBL1\fR-\fBa\fR or +\fBStop\fR-. If \fBkio_tablemask\fR is \fBKIOCABORT1\fR, then the value of +\fBkio_station\fR is set to be the first keystation in the sequence. If +\fBkio_tablemask\fR, is \fBKIOCABORT2\fR then the value of \fBkio_station\fR is +set to be the second keystation in the sequence. An attempt to change the +"break to the \fBPROM\fR monitor" sequence without having superuser permission +results in an \fBEPERM\fR error. +.sp +.ne 2 +.mk +.na +\fB\fBKIOCGKEY\fR \fR +.ad +.RS 13n +.rt +The argument is a pointer to a \fBkiockeymap\fR structure. The current value of +the keyboard translation table entry specified by \fBkio_tablemask\fR and +\fBkio_station\fR is stored in the structure pointed to by the argument. This +call may return \fBEINVAL\fR if there are invalid arguments. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCTYPE\fR \fR +.ad +.RS 13n +.rt +The argument is a pointer to an \fBint\fR. A code indicating the type of the +keyboard is stored in the \fBint\fR pointed to by the argument: +.sp +.ne 2 +.mk +.na +\fB\fBKB_SUN3\fR \fR +.ad +.RS 14n +.rt +Sun Type 3 keyboard +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKB_SUN4\fR \fR +.ad +.RS 14n +.rt +Sun Type 4 or 5 keyboard, or non-USB Sun Type 6 keyboard +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKB_USB\fR \fR +.ad +.RS 14n +.rt +USB standard HID keyboard, including Sun Type 6 USB keyboards +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKB_ASCII\fR \fR +.ad +.RS 14n +.rt +ASCII terminal masquerading as keyboard +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKB_PC\fR \fR +.ad +.RS 14n +.rt +Type 101 PC keyboard +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKB_DEFAULT\fR\fR +.ad +.RS 14n +.rt + Stored in the \fBint\fR pointed to by the argument if the keyboard type is +unknown. In case of error, -1 is stored in the \fBint\fR pointed to by the +argument. +.RE + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCLAYOUT\fR \fR +.ad +.RS 15n +.rt +The argument is a pointer to an \fBint\fR. On a Sun Type 4 keyboard, the layout +code specified by the keyboard's \fBDIP\fR switches is stored in the \fBint\fR +pointed to by the argument. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCCMD\fR \fR +.ad +.RS 15n +.rt +The argument is a pointer to an \fBint\fR. The command specified by the value +of the \fBint\fR pointed to by the argument is sent to the keyboard. The +commands that can be sent are: +.sp +Commands to the Sun Type 3 and Sun Type 4 keyboards: +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_RESET\fR \fR +.ad +.RS 20n +.rt +Reset keyboard as if power-up. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_BELL\fR \fR +.ad +.RS 20n +.rt +Turn on the bell. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_NOBELL\fR \fR +.ad +.RS 20n +.rt +Turn off the bell. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_CLICK\fR \fR +.ad +.RS 20n +.rt +Turn on the click annunciator. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_NOCLICK\fR \fR +.ad +.RS 20n +.rt +Turn off the click annunciator. +.RE + +Commands to the Sun Type 4 keyboard: +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_SETLED\fR \fR +.ad +.RS 22n +.rt +Set keyboard LEDs. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_GETLAYOUT\fR \fR +.ad +.RS 22n +.rt +Request that keyboard indicate layout. +.RE + +.RE + +.sp +.LP +Inappropriate commands for particular keyboard types are ignored. Since there +is no reliable way to get the state of the bell or click (because the keyboard +cannot be queried and a process could do writes to the appropriate serial +driver \(em circumventing this \fBioctl()\fR request) an equivalent +\fBioctl()\fR to query its state is not provided. +.sp +.ne 2 +.mk +.na +\fB\fBKIOCSLED\fR \fR +.ad +.RS 13n +.rt +The argument is a pointer to an \fBchar\fR. On the Sun Type 4 keyboard, the +\fBLEDs\fR are set to the value specified in that \fBchar\fR. The values for +the four \fBLEDs\fR are: +.sp +.ne 2 +.mk +.na +\fB\fBLED_CAPS_LOCK\fR \fR +.ad +.RS 20n +.rt +"Caps Lock" light. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBLED_COMPOSE\fR \fR +.ad +.RS 20n +.rt +"Compose" light. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBLED_SCROLL_LOCK\fR \fR +.ad +.RS 20n +.rt +"Scroll Lock" light. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBLED_NUM_LOCK\fR \fR +.ad +.RS 20n +.rt +"Num Lock" light. +.RE + +On some Japanese layouts, the value for the fifth \fBLED\fR is: +.sp +.ne 2 +.mk +.na +\fB\fBLED_KANA\fR \fR +.ad +.RS 13n +.rt +"Kana" light. +.RE + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCGLED\fR \fR +.ad +.RS 16n +.rt +Pointer to a \fBchar\fR. The current state of the \fBLEDs\fR is stored in the +\fBchar\fR pointed to by the argument. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCSCOMPAT\fR \fR +.ad +.RS 16n +.rt +Pointer to an \fBint\fR. "Compatibility mode" is turned on if the \fBint\fR has +a value of 1, and is turned off if the \fBint\fR has a value of 0. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCGCOMPAT\fR \fR +.ad +.RS 16n +.rt +Pointer to an \fBint\fR. The current state of "compatibility mode" is stored in +the \fBint\fR pointed to by the argument. +.RE + +.sp +.LP +The following \fBioctl()\fR request allows the default effect of the keyboard +abort sequence to be changed. +.sp +.ne 2 +.mk +.na +\fB\fBKIOCSKABORTEN\fR \fR +.ad +.RS 18n +.rt +Pointer to an \fBint\fR. The keyboard abort sequence effect (typically L1-A or +Stop-A on the keyboard on SPARC systems, F1-A on x86 systems, and BREAK on the +serial console device) is enabled if the \fBint\fR has a value of +KIOCABORTENABLE(1). If the value is KIOCABORTDISABLE(0) , the keyboard abort +sequence effect is disabled. If the value is KIOCABORTALTERNATE(2), the +Alternate Break sequence is in effect and is defined by the serial console +drivers \fBzs\fR(7D)\fBse\fR(7D) and \fBasy\fR(7D). Any other value of the +parameter for this \fBioctl()\fR is treated as \fBenable\fR. The Alternate +Break sequence is applicable to the serial console devices only. +.sp +Due to a risk of incorrect sequence interpretation, SLIP and certain other +binary protocols should not be run over the serial console port when Alternate +Break sequence is in effect. Although PPP is a binary protocol, it is able to +avoid these sequences using the ACCM feature in \fIRFC 1662\fR. For Solaris PPP +4.0, you do this by adding the following line to the \fB/etc/ppp/options\fR +file (or other configuration files used for the connection; see \fBpppd\fR(1M) +for details): +.sp +.in +2 +.nf +asyncmap 0x00002000 +.fi +.in -2 + +SLIP has no comparable capability, and must not be used if the Alternate Break +sequence is in use. +.sp +This \fBioctl()\fR will be active and retain state even if there is no physical +keyboard in the system. The default effect (\fBenable\fR) causes the operating +system to suspend and enter the kernel debugger (if present) or the system prom +(on most systems with OpenBoot proms). The default effect is enabled on most +systems, but may be different on server systems with key switches in +the 'secure' position. On these systems, the effect is always disabled when the key +switch is in the 'secure' position. This \fBioctl()\fRreturns \fBEPERM\fR if +the caller is not the superuser. +.RE + +.sp +.LP +These \fBioctl()\fR requests are supported for compatibility with the system +keyboard device \fB/dev/kbd\fR. +.sp +.ne 2 +.mk +.na +\fB\fBKIOCSDIRECT\fR \fR +.ad +.RS 16n +.rt +Has no effect. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCGDIRECT\fR \fR +.ad +.RS 16n +.rt +Always returns 1. +.RE + +.sp +.LP +The following \fBioctl()\fR requests are used to set and get the keyboard +autorepeat delay and rate. +.sp +.ne 2 +.mk +.na +\fB\fBKIOCSRPTDELAY\fR \fR +.ad +.RS 18n +.rt +This argument is a pointer to an int, which is the kb autorepeat delay, unit in +millisecond. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCGRPTDELAY\fR \fR +.ad +.RS 18n +.rt +This argument is a pointer to an int. The current auto repeat delay setting is +stored in the integer pointed by the argument, unit in millisecond. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCSRPTRATE\fR \fR +.ad +.RS 18n +.rt +This argument is a pointer to an int, which is the kb autorepeat rate, unit in +millisecond. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCGRPTRATE\fR \fR +.ad +.RS 18n +.rt +This argument is a pointer to an int. The current auto repeat rate setting is +stored in the integer pointed by the argument, unit in millisecond. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +lw(2.75i) |lw(2.75i) +lw(2.75i) |lw(2.75i) +. +\fBATTRIBUTE TYPE\fR\fBATTRIBUTE VALUE\fR +_ +Interface StabilityStable +.TE + +.SH SEE ALSO +.sp +.LP +\fBkbd\fR(1), \fBloadkeys\fR(1), \fBkadb\fR(1M), \fBpppd\fR(1M), +\fBkeytables\fR(4), \fBattributes\fR(5), \fBzs\fR(7D), \fBse\fR(7D), +\fBasy\fR(7D), \fBvirtualkm\fR(7D), \fBtermio\fR(7I), \fBusbkbm\fR(7M) +.SH NOTES +.sp +.LP +Many keyboards released after Sun Type 4 keyboard also report themselves as +Sun Type 4 keyboards. diff --git a/usr/src/man/man7m/ldterm.7m b/usr/src/man/man7m/ldterm.7m new file mode 100644 index 0000000000..4b284437c3 --- /dev/null +++ b/usr/src/man/man7m/ldterm.7m @@ -0,0 +1,314 @@ +'\" te +.\" Copyright 1989 AT&T +.\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved +.\" 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 ldterm 7M "7 Jun1999" "SunOS 5.11" "STREAMS Modules" +.SH NAME +ldterm \- standard STREAMS terminal line discipline module +.SH SYNOPSIS +.LP +.nf +#include <sys/stream.h> +.fi + +.LP +.nf +#include <sys/termios.h> +.fi + +.LP +.nf +int ioctl(\fIfd\fR,I_PUSH,"ldterm"); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBldterm\fR STREAMS module provides most of the \fBtermio\fR(7I) terminal +interface. The \fBvis \fRmodule does not perform the low-level device control +functions specified by flags in the \fBc_cflag\fR word of the +\fBtermio/termios\fR structure, or by the \fBIGNBRK\fR, \fBIGNPAR\fR, +\fBPARMRK\fR, or \fBINPCK\fR flags in the \fBc_iflag\fR word of the +\fBtermio/termios\fR structure. Those functions must be performed by the +driver or by modules pushed below the \fBldterm\fR module. \fBThe \fR\fBldterm +module\fR performs all other \fBtermio/termios\fR functions, though some may +require the cooperation of the driver or modules pushed below \fBldterm\fR and +may not be performed in some cases. These include the \fBIXOFF\fR flag in the +\fBc_iflag\fR word and the delays specified in the \fBc_oflag\fR word. +.sp +.LP +\fBThe \fR\fBldterm module\fR also handles single and multi-byte characters +from various codesets including both Extended Unix Code (\fBEUC\fR) and non-EUC +codesets. +.sp +.LP +The remainder of this section describes the processing of various \fBSTREAMS\fR +messages on the read- and write-side. +.SS "Read-side Behavior" +.sp +.LP +Various types of STREAMS messages are processed as follows: +.sp +.ne 2 +.mk +.na +\fB\fBM_BREAK\fR \fR +.ad +.RS 12n +.rt +Depending on the state of the \fBBRKINT\fR flag, either an interrupt signal is +generated or the message is treated as if it were an \fBM_DATA\fR message +containing a single \fBASCII NUL\fR character when this message is received. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBM_DATA\fR \fR +.ad +.RS 12n +.rt +This message is normally processed using the standard \fBtermio\fR input +processing. If the \fBICANON\fR flag is set, a single input record (``line'') +is accumulated in an internal buffer and sent upstream when a line-terminating +character is received. If the \fBICANON\fR flag is not set, other input +processing is performed and the processed data are passed upstream. +.sp +If output is to be stopped or started as a result of the arrival of characters +(usually \fBCNTRL-Q\fR and \fBCNTRL-S),\fR \fBM_STOP\fR and \fBM_START\fR +messages are sent downstream. If the \fBIXOFF\fR flag is set and input is to be +stopped or started as a result of flow-control considerations, \fBM_STOPI\fR +and \fBM_STARTI\fR messages are sent downstream. +.sp +\fBM_DATA\fR messages are sent downstream, as necessary, to perform echoing. +.sp +If a signal is to be generated, an \fBM_FLUSH\fR message with a flag byte of +\fBFLUSHR\fR is placed on the read queue. If the signal is also to flush +output, an \fBM_FLUSH\fR message with a flag byte of \fBFLUSHW\fR is sent +downstream. +.RE + +.sp +.LP +All other messages are passed upstream unchanged. +.SS "Write-side Behavior" +.sp +.LP +Various types of \fBSTREAMS\fR messages are processed as follows: +.sp +.ne 2 +.mk +.na +\fB\fBM_FLUSH\fR \fR +.ad +.RS 13n +.rt +The write queue of the module is flushed of all its data messages and the +message is passed downstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBM_IOCTL\fR \fR +.ad +.RS 13n +.rt +The function of this \fBioctl\fR is performed and the message is passed +downstream in most cases. The \fBTCFLSH\fR and \fBTCXONC\fR \fBioctls\fR can +be performed entirely in the \fBldterm\fR module, so the reply is sent +upstream and the message is not passed downstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBM_DATA\fR \fR +.ad +.RS 13n +.rt +If the \fBOPOST\fR flag is set, or both the \fBXCASE\fR and \fBICANON\fR flags +are set, output processing is performed and the processed message is passed +downstream along with any \fBM_DELAY\fR messages generated. Otherwise, the +message is passed downstream without change. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBM_CTL\fR \fR +.ad +.RS 13n +.rt +If the size of the data buffer associated with the message is the size of +\fBstruct iocblk\fR, \fBldterm\fR will perform functional negotiation to +determine where the \fBtermio\fR(7I) processing is to be done. If the command +field of the \fBiocblk\fR structure (\fBioc_cmd\fR) is set to +\fBMC_NO_CANON\fR, the input canonical processing normally performed on +\fBM_DATA\fR messages is disabled and those messages are passed upstream +unmodified. (This is for the use of modules or drivers that perform their own +input processing, such as a pseudo-terminal in \fBTIOCREMOTE\fR mode connected +to a program that performs this processing). If the command is +\fBMC_DO_CANON\fR, all input processing is enabled. If the command is +\fBMC_PART_CANON\fR, then an \fBM_DATA\fR message containing a \fBtermios\fR +structure is expected to be attached to the original \fBM_CTL\fR message. The +\fBldterm\fR module will examine the \fBiflag\fR, \fBoflag\fR, and +\fB\fR\fBlflag\fR fields of the \fBtermios\fR structure and from that point on, +will process only those flags that have not been turned \fBON.\fR If none of +the above commands are found, the message is ignored. In any case, the message +is passed upstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBM_FLUSH\fR \fR +.ad +.RS 13n +.rt +The read queue of the module is flushed of all its data messages and all data +in the record being accumulated are also flushed. The message is passed +upstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBM_IOCACK\fR \fR +.ad +.RS 13n +.rt +The data contained within the message, which is to be returned to the process, +are augmented if necessary, and the message is passed upstream. +.RE + +.sp +.LP +All other messages are passed downstream unchanged. +.SH IOCTLS +.sp +.LP +\fBThe \fR\fBldterm module\fR processes the following \fBTRANSPARENT\fR +ioctls. All others are passed downstream. +.sp +.ne 2 +.mk +.na +\fB\fBTCGETS/TCGETA\fR \fR +.ad +.sp .6 +.RS 4n +The message is passed downstream. If an acknowledgment is seen, the data +provided by the driver and modules downstream are augmented and the +acknowledgement is passed upstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTCSETS/TCSETSW/TCSETSF/TCSETA/TCSETAW/TCSETAF\fR \fR +.ad +.sp .6 +.RS 4n +The parameters that control the behavior of the \fBldterm\fR module are +changed. If a mode change requires options at the stream head to be changed, an +\fBM_SETOPTS\fR message is sent upstream. If the \fBICANON\fR flag is turned +on or off, the read mode at the stream head is changed to message-nondiscard or +byte-stream mode, respectively. If the \fBTOSTOP\fR flag is turned on or off, +the tostop mode at the stream head is turned on or off, respectively. In any +case, \fBldterm\fR passes the \fBioctl\fR on downstream for possible +additional processing. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTCFLSH\fR \fR +.ad +.sp .6 +.RS 4n +If the argument is 0, an \fBM_FLUSH\fR message with a flag byte of \fBFLUSHR\fR +is sent downstream and placed on the read queue. If the argument is 1, the +write queue is flushed of all its data messages and an \fBM_FLUSH\fR message +with a flag byte of \fBFLUSHW\fR is sent upstream and downstream. If the +argument is 2, the write queue is flushed of all its data messages and an +\fBM_FLUSH\fR message with a flag byte of \fBFLUSHRW\fR is sent downstream and +placed on the read queue. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTCXONC\fR \fR +.ad +.sp .6 +.RS 4n +If the argument is 0 and output is not already stopped, an \fBM_STOP\fR message +is sent downstream. If the argument is 1 and output is stopped, an +\fBM_START\fR message is sent downstream. If the argument is 2 and input is +not already stopped, an \fBM_STOPI\fR message is sent downstream. If the +argument is 3 and input is stopped, an \fBM_STARTI\fR message is sent +downstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTCSBRK\fR \fR +.ad +.sp .6 +.RS 4n +The message is passed downstream, so the driver has a chance to drain the data +and then send an \fBM_IOCACK\fR message upstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEUC_WSET\fR \fR +.ad +.sp .6 +.RS 4n +This call takes a pointer to an \fBeucioc\fR structure, and uses it to set the +\fBEUC\fR line discipline's local definition for the code set widths to be used +for subsequent operations. Within the stream, the line discipline may +optionally notify other modules of this setting using \fBM_CTL\fR messages. +When this call is received and the \fBeucioc\fRstructure contains valid data, +the line discipline changes into \fBEUC \fRhandling mode once the +\fBeucioc\fRdata is completely transferred to an internal data structure. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEUC_WGET\fR \fR +.ad +.sp .6 +.RS 4n +This call takes a pointer to an \fBeucioc\fR structure, and returns in it the +\fBEUC\fR code set widths currently in use by the \fBEUC\fR line discipline. If +the current codeset of the line discipline is not an \fBEUC\fR one, the result +is meaningless. +.RE + +.SH SEE ALSO +.sp +.LP +\fBtermios\fR(3C), \fBconsole\fR(7D), \fBtermio\fR(7I) +.sp +.LP +\fISTREAMS Programming Guide\fR diff --git a/usr/src/man/man7m/pckt.7m b/usr/src/man/man7m/pckt.7m new file mode 100644 index 0000000000..a6d11ebe49 --- /dev/null +++ b/usr/src/man/man7m/pckt.7m @@ -0,0 +1,53 @@ +'\" te +.\" Copyright 1989 AT&T Copyright (c) 1990, Sun Microsystems, Inc. All Rights Reserved +.\" 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 pckt 7M "3 Jul 1990" "SunOS 5.11" "STREAMS Modules" +.SH NAME +pckt \- STREAMS Packet Mode module +.SH SYNOPSIS +.LP +.nf +int ioctl(\fI fd, \fRI_PUSH, "pckt"); +.fi + +.SH DESCRIPTION +.sp +.LP +\fBpckt\fR is a STREAMS module that may be used with a pseudo terminal to +packetize certain messages. The \fBpckt\fR module should be pushed (see +\fBI_PUSH\fR on \fBstreamio\fR(7I)) onto the master side of a pseudo terminal. +.sp +.LP +Packetizing is performed by prefixing a message with an \fBM_PROTO\fR message. +The original message type is stored in the 1 byte data portion of the +\fBM_PROTO\fR message. +.sp +.LP +On the read-side, only the \fBM_PROTO\fR, \fBM_PCPROTO\fR, \fBM_STOP\fR, +\fBM_START\fR, \fBM_STOPI\fR, \fBM_STARTI\fR, \fBM_IOCTL\fR, \fBM_DATA\fR, +\fBM_FLUSH\fR, and \fBM_READ\fR messages are packetized. All other message +types are passed upstream unmodified. +.sp +.LP +Since all unread state information is held in the master's stream head read +queue, flushing of this queue is disabled. +.sp +.LP +On the write-side, all messages are sent down unmodified. +.sp +.LP +With this module in place, all reads from the master side of the pseudo +terminal should be performed with the \fBgetmsg\fR(2) or \fBgetpmsg\fR() +function. The control part of the message contains the message type. The data +part contains the actual data associated with that message type. The onus is on +the application to separate the data into its component parts. +.SH SEE ALSO +.sp +.LP +\fBgetmsg\fR(2), \fBioctl\fR(2), \fBldterm\fR(7M), \fBptem\fR(7M), +\fBstreamio\fR(7I), \fBtermio\fR(7I) +.sp +.LP +\fISTREAMS Programming Guide\fR diff --git a/usr/src/man/man7m/pfmod.7m b/usr/src/man/man7m/pfmod.7m new file mode 100644 index 0000000000..76d3c69bc1 --- /dev/null +++ b/usr/src/man/man7m/pfmod.7m @@ -0,0 +1,255 @@ +'\" te +.\" Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved +.\" 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 pfmod 7M "18 June 2006" "SunOS 5.11" "STREAMS Modules" +.SH NAME +pfmod \- STREAMS Packet Filter Module +.SH SYNOPSIS +.LP +.nf +#include <sys/pfmod.h> +.fi + +.LP +.nf +ioctl(\fIfd\fR, IPUSH, "pfmod"); +.fi + +.SH DESCRIPTION +.sp +.LP +\fBpfmod\fR is a \fBSTREAMS\fR module that subjects messages arriving on its +read queue to a packet filter and passes only those messages that the filter +accepts on to its upstream neighbor. Such filtering can be very useful for +user-level protocol implementations and for networking monitoring programs that +wish to view only specific types of events. +.SS "Read-side Behavior" +.sp +.LP +\fBpfmod\fR applies the current packet filter to all \fBM_DATA\fR and +\fBM_PROTO\fR messages arriving on its read queue. The module prepares these +messages for examination by first skipping over all leading \fBM_PROTO\fR +message blocks to arrive at the beginning of the message's data portion. If +there is no data portion, \fBpfmod\fR accepts the message and passes it along +to its upstream neighbor. Otherwise, the module ensures that the part of the +message's data that the packet filter might examine lies in contiguous memory, +calling the \fBpullupmsg\fR(9F) utility routine if necessary to force +contiguity. (Note: this action destroys any sharing relationships that the +subject message might have had with other messages.) Finally, it applies the +packet filter to the message's data, passing the entire message upstream to the +next module if the filter accepts, and discarding the message otherwise. See +PACKET FILTERS below for details on how the filter works. +.sp +.LP +If there is no packet filter yet in effect, the module acts as if the filter +exists but does nothing, implying that all incoming messages are accepted. The +ioctls section below describes how to associate a packet filter with an +instance of \fBpfmod\fR. +.sp +.LP +\fBpfmod\fR passes all other messages through unaltered to its upper neighbor. +.SS "Write-side Behavior" +.sp +.LP +\fBpfmod\fR intercepts \fBM_IOCTL\fR messages for the \fIioctl\fR described +below. The module passes all other messages through unaltered to its lower +neighbor. +.SH IOCTLS +.sp +.LP +\fBpfmod\fR responds to the following \fIioctl\fR. +.sp +.ne 2 +.mk +.na +\fB\fBPFIOCSETF\fR \fR +.ad +.RS 14n +.rt +This \fIioctl\fR directs the module to replace its current packet filter, if +any, with the filter specified by the \fBstruct packetfilt\fR pointer named by +its final argument. This structure is defined in \fB<sys/pfmod.h>\fR as: +.RE + +.sp +.in +2 +.nf +struct packetfilt { + uchar_t Pf_Priority; /* priority of filter */ + uchar_t Pf_FilterLen; /* length of filter cmd list */ + ushort_t Pf_Filter[ENMAXFILTERS]; /* filter command list */ +}; +.fi +.in -2 + +.sp +.LP +The \fBPf_Priority\fR field is included only for compatibility with other +packet filter implementations and is otherwise ignored. The packet filter +itself is specified in the \fBPf_Filter\fR array as a sequence of two-byte +commands, with the \fBPf_FilterLen\fR field giving the number of commands in +the sequence. This implementation restricts the maximum number of commands in a +filter (\fBENMAXFILTERS\fR) to 255. The next section describes the available +commands and their semantics. +.SH PACKET FILTERS +.sp +.LP +A packet filter consists of the filter command list length (in units of +\fBushort_t\fRs), and the filter command list itself. (The priority field +mentioned above is ignored in this implementation.) Each filter command list +specifies a sequence of actions that operate on an internal stack of ushort_ts +("shortwords") or an offset register. The offset register is initially zero. +Each shortword of the command list specifies an action and a binary operator. +Using _n_ as shorthand for the next shortword of the instruction stream and +_%oreg_ for the offset register, the list of actions is: +.sp +.in +2 +.nf + COMMAND SHORTWORDS ACTION + ENF_PUSHLIT 2 Push _n_ on the stack. + ENF_PUSHZERO 1 Push zero on the stack. + ENF_PUSHONE 1 Push one on the stack. + ENF_PUSHFFFF 1 Push 0xFFFF on the stack. + ENF_PUSHFF00 1 Push 0xFF00 on the stack. + ENF_PUSH00FF 1 Push 0x00FF on the stack. + ENF_LOAD_OFFSET 2 Load _n_ into _%oreg_. + ENF_BRTR 2 Branch forward _n_ shortwords if + the top element of the stack is + non-zero. + ENF_BRFL 2 Branch forward _n_ shortwords if + the top element of the stack is zero. + ENF_POP 1 Pop the top element from the stack. + ENF_PUSHWORD+m 1 Push the value of shortword (_m_ + + _%oreg_) of the packet onto the stack. +.fi +.in -2 + +.sp +.LP +The binary operators can be from the set {\fBENF_EQ\fR, \fBENF_NEQ\fR, +\fBENF_LT\fR, \fBENF_LE\fR, \fBENF_GT\fR,\fBENF_GE\fR, \fBENF_AND\fR, +\fBENF_OR\fR, \fBENF_XOR\fR} which operate on the top two elements of the stack +and replace them with its result. +.sp +.LP +When both an action and operator are specified in the same shortword, the +action is performed followed by the operation. +.sp +.LP +The binary operator can also be from the set {\fBENF_COR\fR, \fBENF_CAND\fR, +\fBENF_CNOR\fR, \fBENF_CNAND\fR}. These are "short-circuit" operators, in that +they terminate the execution of the filter immediately if the condition they +are checking for is found, and continue otherwise. All pop two elements from +the stack and compare them for equality; \fBENF_CAND\fR returns false if the +result is false; \fBENF_COR\fR returns true if the result is true; +\fBENF_CNAND\fR returns true if the result is false; \fBENF_CNOR\fR returns +false if the result is true. Unlike the other binary operators, these four do +not leave a result on the stack, even if they continue. +.sp +.LP +The short-circuit operators should be used when possible, to reduce the amount +of time spent evaluating filters. When they are used, you should also arrange +the order of the tests so that the filter will succeed or fail as soon as +possible; for example, checking the \fBIP\fR destination field of a \fBUDP\fR +packet is more likely to indicate failure than the packet type field. +.sp +.LP +The special action \fBENF_NOPUSH\fR and the special operator \fBENF_NOP\fR can +be used to only perform the binary operation or to only push a value on the +stack. Since both are (conveniently) defined to be zero, indicating only an +action actually specifies the action followed by \fBENF_NOP\fR, and indicating +only an operation actually specifies \fBENF_NOPUSH\fR followed by the +operation. +.sp +.LP +After executing the filter command list, a non-zero value (true) left on top of +the stack (or an empty stack) causes the incoming packet to be accepted and a +zero value (false) causes the packet to be rejected. (If the filter exits as +the result of a short-circuit operator, the top-of-stack value is ignored.) +Specifying an undefined operation or action in the command list or performing +an illegal operation or action (such as pushing a shortword offset past the end +of the packet or executing a binary operator with fewer than two shortwords on +the stack) causes a filter to reject the packet. +.SH EXAMPLES +.sp +.LP +The packet filter module is not dependent on any particular device driver or +module but is commonly used with datalink drivers such as the Ethernet driver. +If the underlying datalink driver supports the Data Link Provider Interface +(DLPI) message set, the appropriate \fBSTREAMS DLPI\fR messages must be issued +to attach the stream to a particular hardware device and bind a datalink +address to the stream before the underlying driver will route received packets +upstream. Refer to the \fBDLPI\fR Version 2 specification for details on this +interface. +.sp +.LP +The reverse \fBARP\fR daemon program may use code similar to the following +fragment to construct a filter that rejects all but \fBRARP\fR packets. That +is, it accepts only packets whose Ethernet type field has the value +\fBETHERTYPE_REVARP\fR. The filter works whether a VLAN is configured or not. +.sp +.in +2 +.nf +struct ether_header eh; /* used only for offset values */ +struct packetfilt pf; +register ushort_t *fwp = pf.Pf_Filter; +ushort_t offset; +int fd; +/* + * Push packet filter streams module. + */ +if (ioctl(fd, I_PUSH, "pfmod") < 0) + syserr("pfmod"); + +/* + * Set up filter. Offset is the displacement of the Ethernet + * type field from the beginning of the packet in units of + * ushort_ts. + */ +offset = ((uint_t) &eh.ether_type - (uint_t) &eh.ether_dhost) / + sizeof (us_short); + *fwp++ = ENF_PUSHWORD + offset; + *fwp++ = ENF_PUSHLIT; + *fwp++ = htons(ETHERTYPE_VLAN); + *fwp++ = ENF_EQ; + *fwp++ = ENF_BRFL; + *fwp++ = 3; /* If this isn't ethertype VLAN, don't change oreg */ + *fwp++ = ENF_LOAD_OFFSET; + *fwp++ = 2; /* size of the VLAN tag in words */ + *fwp++ = ENF_POP; + *fwp++ = ENF_PUSHWORD + offset; + *fwp++ = ENF_PUSHLIT; + *fwp++ = htons(ETHERTYPE_REVARP); + *fwp++ = ENF_EQ; + pf.Pf_FilterLen = fwp - &pf.PF_Filter[0]; +.fi +.in -2 + +.sp +.LP +This filter can be abbreviated by taking advantage of the ability to combine +actions and operations: +.sp +.in +2 +.nf + *fwp++ = ENF_PUSHWORD + offset; + *fwp++ = ENF_PUSHLIT | ENF_EQ; + *fwp++ = htons(ETHERTYPE_REVARP); + *fwp++ = htons(ETHERTYPE_VLAN); + *fwp++ = ENF_BRFL | ENF_NOP; + *fwp++ = 3; + *fwp++ = ENF_LOAD_OFFSET | ENF_NOP; + *fwp++ = 2; + *fwp++ = ENF_POP | ENF_NOP; + *fwp++ = ENF_PUSHWORD + offset; + *fwp++ = ENF_PUSHLIT | ENF_EQ; + *fwp++ = htons(ETHERTYPE_REVARP); +.fi +.in -2 + +.SH SEE ALSO +.sp +.LP +\fBbufmod\fR(7M), \fBdlpi\fR(7P), \fBpullupmsg\fR(9F) diff --git a/usr/src/man/man7m/pipemod.7m b/usr/src/man/man7m/pipemod.7m new file mode 100644 index 0000000000..b91d3bd4b2 --- /dev/null +++ b/usr/src/man/man7m/pipemod.7m @@ -0,0 +1,56 @@ +'\" te +.\" Copyright (C) 1992 Sun Microsystems, Inc. All Rights Reserved +.\" 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 pipemod 7M "21 Aug 1992" "SunOS 5.11" "STREAMS Modules" +.SH NAME +pipemod \- STREAMS pipe flushing module +.SH DESCRIPTION +.sp +.LP +The typical stream is composed of a stream head connected to modules and +terminated by a driver. Some stream configurations such as pipes and +\fBFIFOs\fR do not have a driver and hence certain features commonly supported +by the driver need to be provided by other means. Flushing is one such feature, +and it is provided by the \fBpipemod\fR module. +.sp +.LP +Pipes and \fBFIFOs\fR in their simplest configurations only have stream heads. +A write side is connected to a read side. This remains true when modules are +pushed. The twist occurs at a point known as the mid-point. When an +\fBM_FLUSH\fR message is passed from a write queue to a read queue the +\fBFLUSHR\fR and/or \fBFLUSHW\fR bits have to be switched. The mid-point of a +pipe is not always easily detectable, especially if there are numerous modules +pushed on either end of the pipe. In that case there needs to be a mechanism to +intercept all message passing through the stream. If the message is an +\fBM_FLUSH\fR message and it is at the mid-point, the flush bits need to be +switched. This bit switching is handled by the \fBpipemod\fR module. +.sp +.LP +\fBpipemod\fR should be pushed onto a pipe or \fBFIFO\fR where flushing of any +kind will take place. The \fBpipemod\fR module can be pushed on either end of +the pipe. The only requirement is that it is pushed onto an end that previously +did not have modules on it. That is, pipemod must be the first module pushed +onto a pipe so that it is at the mid-point of the pipe itself. +.sp +.LP +The \fBpipemod\fR module handles only \fBM_FLUSH\fR messages. All other +messages are passed on to the next module using the \fBputnext()\fR utility +routine. If an \fBM_FLUSH\fR message is passed to \fBpipemod\fR and the +\fBFLUSHR\fR and \fBFLUSHW\fR bits are set, the message is not processed but is +passed to the next module using the \fBputnext()\fR routine. If only the +\fBFLUSHR\fR bit is set, the \fBFLUSHR\fR bit is turned off and the +\fBFLUSHW\fR bit is set. The message is then passed on to the next module using +\fBputnext()\fR. Similarly, if the \fBFLUSHW\fR bit is the only bit set in the +\fBM_FLUSH\fR message, the \fBFLUSHW\fR bit is turned off and the \fBFLUSHR\fR +bit is turned on. The message is then passed to the next module on the stream. +.sp +.LP +The \fBpipemod\fR module can be pushed on any stream that desires the bit +switching. It must be pushed onto a pipe or \fBFIFO\fR if any form of flushing +must take place. +.SH SEE ALSO +.sp +.LP +\fISTREAMS Programming Guide\fR diff --git a/usr/src/man/man7m/ptem.7m b/usr/src/man/man7m/ptem.7m new file mode 100644 index 0000000000..1678048bba --- /dev/null +++ b/usr/src/man/man7m/ptem.7m @@ -0,0 +1,70 @@ +'\" te +.\" Copyright 1989 AT&T +.\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved +.\" 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 ptem 7M "3 Jul 1990" "SunOS 5.11" "STREAMS Modules" +.SH NAME +ptem \- STREAMS Pseudo Terminal Emulation module +.SH SYNOPSIS +.LP +.nf +\fBint ioctl(\fR\fIfd\fR, \fBI_PUSH\fR,\fB "ptem");\fR +.fi + +.SH DESCRIPTION +.sp +.LP +\fBptem\fR is a STREAMS module that, when used in conjunction with a line +discipline and pseudo terminal driver, emulates a terminal. +.sp +.LP +The \fBptem\fR module must be pushed (see \fBI_PUSH\fR, \fBstreamio\fR(7I)) +onto the slave side of a pseudo terminal STREAM, before the \fBldterm\fR(7M) +module is pushed. +.sp +.LP +On the write-side, the \fBTCSETA\fR, \fBTCSETAF\fR, \fBTCSETAW\fR, +\fBTCGETA\fR, \fBTCSETS\fR, \fBTCSETSW\fR, \fBTCSETSF\fR, \fBTCGETS\fR, +\fBTCSBRK\fR, \fBJWINSIZE\fR, \fBTIOCGWINSZ\fR, and \fBTIOCSWINSZ\fR +\fBtermio\fR \fBioctl\fR(2) messages are processed and acknowledged. If remote +mode is not in effect, \fBptem\fR handles the \fBTIOCSTI\fR ioctl by copying +the argument bytes into an \fBM_DATA\fR message and passing it back up the +read side. Regardless of the remote mode setting, \fBptem\fR acknowledges the +ioctl and passes a copy of it downstream for possible further processing. A +hang up (that is, \fBstty 0\fR) is converted to a zero length \fBM_DATA\fR +message and passed downstream. Termio \fBcflags\fR and window row and column +information are stored locally one per stream. \fBM_DELAY\fR messages are +discarded. All other messages are passed downstream unmodified. +.sp +.LP +On the read-side all messages are passed upstream unmodified with the following +exceptions. All \fBM_READ\fR and \fBM_DELAY\fR messages are freed in both +directions. A \fBTCSBRK\fR ioctl is converted to an \fBM_BREAK\fR message and +passed upstream and an acknowledgement is returned downstream. A +\fBTIOCSIGNAL\fR ioctl is converted into an \fBM_PCSIG\fR message, and passed +upstream and an acknowledgement is returned downstream. Finally a +\fBTIOCREMOTE\fR ioctl is converted into an \fBM_CTL\fR message, acknowledged, +and passed upstream; the resulting mode is retained for use in subsequent +\fBTIOCSTI\fR parsing. +.SH FILES +.sp +.ne 2 +.mk +.na +\fB<\fBsys/ptem.h\fR> \fR +.ad +.RS 17n +.rt + +.RE + +.SH SEE ALSO +.sp +.LP +\fBstty\fR(1), \fBioctl\fR(2), \fBldterm\fR(7M), \fBpckt\fR(7M), +\fBstreamio\fR(7I), \fBtermio\fR(7I) +.sp +.LP +\fISTREAMS Programming Guide\fR diff --git a/usr/src/man/man7m/sppptun.7m b/usr/src/man/man7m/sppptun.7m new file mode 100644 index 0000000000..fc370a2c4a --- /dev/null +++ b/usr/src/man/man7m/sppptun.7m @@ -0,0 +1,41 @@ +'\" te +.\" Copyright (c) 2001 by Sun Microsystems, Inc. +.\" All rights reserved. +.\" 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 sppptun 7M "2001" "SunOS 5.11" "STREAMS Modules" +.SH NAME +sppptun \- PPP tunneling pseudo-driver +.SH SYNOPSIS +.LP +.nf +\fB/dev/sppptun\fR +.fi + +.SH DESCRIPTION +.sp +.LP +The \fB/dev/sppptun\fR pseudo-driver provides an interface for tunneling PPP +sessions. This interface provides PPP over Ethernet (PPPoE) service with +Solaris PPP. +.SH FILES +.sp +.ne 2 +.mk +.na +\fB\fB/dev/sppptun\fR \fR +.ad +.RS 17n +.rt +Solaris PPP tunneling device driver. +.RE + +.SH SEE ALSO +.sp +.LP +\fBpppoec\fR(1M), \fBpppoed\fR(1M), \fBsppptun\fR(1M) +.sp +.LP +\fIRFC 2516 \(em A Method for Transmitting PPP Over Ethernet (PPPoE).\fR +Mamakos, et. al. February 1999. diff --git a/usr/src/man/man7m/timod.7m b/usr/src/man/man7m/timod.7m new file mode 100644 index 0000000000..acddcf2fe0 --- /dev/null +++ b/usr/src/man/man7m/timod.7m @@ -0,0 +1,184 @@ +'\" te +.\" Copyright 1989 AT&T +.\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved +.\" 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 timod 7M "26 Mar 1993" "SunOS 5.11" "STREAMS Modules" +.SH NAME +timod \- Transport Interface cooperating STREAMS module +.SH SYNOPSIS +.LP +.nf +#include <sys/stropts.h> +.fi + +.LP +.nf +ioctl(\fIfildes\fR, I_STR, &\fImy_strioctl\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +\fBtimod\fR is a STREAMS module for use with the Transport Interface +("\fBTI\fR") functions of the Network Services library. The \fBtimod\fR module +converts a set of \fBioctl\fR(2) calls into STREAMS messages that may be +consumed by a transport protocol provider that supports the Transport +Interface. This allows a user to initiate certain TI functions as atomic +operations. +.sp +.LP +The \fBtimod\fR module must be pushed onto only a stream terminated by a +transport protocol provider that supports the \fBTI\fR. +.sp +.LP +All STREAMS messages, with the exception of the message types generated from +the \fBioctl\fR commands described below, will be transparently passed to the +neighboring module or driver. The messages generated from the following +\fBioctl\fR commands are recognized and processed by the \fBtimod\fR module. +The format of the \fBioctl\fR call is: +.sp +.in +2 +.nf +\fB#include <sys/stropts.h> + - + - +struct strioctl my_strioctl; + - + - +strioctl.ic_cmd = \fR\fIcmd\fR; +strioctl.ic_timout = INFTIM; +strioctl.ic_len = \fBsize\fR; +strioctl.ic_dp = (char *)\fIbuf\fR +ioctl(\fIfildes\fR, I_STR, &\fImy_strioctl\fR); +.fi +.in -2 + +.sp +.LP +On issuance, \fBsize\fR is the size of the appropriate \fBTI\fR message to be +sent to the transport provider and on return \fBsize\fR is the size of the +appropriate \fBTI\fR message from the transport provider in response to the +issued \fBTI \fRmessage. \fIbuf\fR is a pointer to a buffer large enough to +hold the contents of the appropriate \fBTI\fR messages. The \fBTI\fR message +types are defined in <\fBsys/tihdr.h\fR>. The possible values for the \fIcmd\fR +field are: +.sp +.ne 2 +.mk +.na +\fB\fBTI_BIND\fR \fR +.ad +.RS 15n +.rt +Bind an address to the underlying transport protocol provider. The message +issued to the \fBTI_BIND\fR ioctl is equivalent to the \fBTI\fR message type +\fBT_BIND_REQ\fR and the message returned by the successful completion of the +\fBioctl\fR is equivalent to the \fBTI\fR message type \fBT_BIND_ACK.\fR +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTI_UNBIND\fR \fR +.ad +.RS 15n +.rt +Unbind an address from the underlying transport protocol provider. The message +issued to the \fBTI_UNBIND\fR ioctl is equivalent to the \fBTI\fR message type +\fBT_UNBIND_REQ\fR and the message returned by the successful completion of the +\fBioctl\fR is equivalent to the \fBTI\fR message type \fBT_OK_ACK.\fR +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTI_GETINFO\fR \fR +.ad +.RS 15n +.rt +Get the \fBTI\fR protocol specific information from the transport protocol +provider. The message issued to the \fBTI_GETINFO\fR ioctl is equivalent to +the \fBTI\fR message type \fBT_INFO_REQ\fR and the message returned by the +successful completion of the \fBioctl\fR is equivalent to the \fBTI\fR message +type \fBT_INFO_ACK.\fR +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTI_OPTMGMT\fR \fR +.ad +.RS 15n +.rt +Get, set, or negotiate protocol specific options with the transport protocol +provider. The message issued to the \fBTI_OPTMGMT\fR ioctl is equivalent to +the TI message type \fBT_OPTMGMT_REQ\fR and the message returned by the +successful completion of the \fBioctl\fR is equivalent to the \fBTI\fR message +type \fBT_OPTMGMT_ACK.\fR +.RE + +.SH FILES +.sp +.ne 2 +.mk +.na +\fB<\fBsys/timod.h\fR> \fR +.ad +.RS 19n +.rt +ioctl definitions +.RE + +.sp +.ne 2 +.mk +.na +\fB<\fBsys/tiuser.h\fR> \fR +.ad +.RS 19n +.rt +\fBTLI\fR interface declaration and structure file +.RE + +.sp +.ne 2 +.mk +.na +\fB<\fBsys/tihdr.h\fR> \fR +.ad +.RS 19n +.rt +\fBTPI\fR declarations and user-level code +.RE + +.sp +.ne 2 +.mk +.na +\fB<\fBsys/errno.h\fR> \fR +.ad +.RS 19n +.rt +system error messages file. Please see \fBerrno\fR(3C). +.RE + +.SH SEE ALSO +.sp +.LP +\fBIntro\fR(3), \fBioctl\fR(2), \fBerrno\fR(3C), \fBtirdwr\fR(7M) +.sp +.LP +\fISTREAMS Programming Guide\fR +.SH DIAGNOSTICS +.sp +.LP +If the \fBioctl\fR returns with a value greater than 0, the lower 8 bits of the +return value will be one of the \fBTI \fRerror codes as defined in +<\fBsys/tiuser.h\fR>. If the \fBTI\fR error is of type \fBTSYSERR\fR, then the +next 8 bits of the return value will contain an error as defined in +<\fBsys/errno.h\fR> (see \fBIntro\fR(3)). diff --git a/usr/src/man/man7m/tirdwr.7m b/usr/src/man/man7m/tirdwr.7m new file mode 100644 index 0000000000..7cbd204489 --- /dev/null +++ b/usr/src/man/man7m/tirdwr.7m @@ -0,0 +1,170 @@ +'\" te +.\" Copyright 1989 AT&T +.\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved +.\" 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 tirdwr 7M "3 Jul 1990" "SunOS 5.11" "STREAMS Modules" +.SH NAME +tirdwr \- Transport Interface read/write interface STREAMS module +.SH SYNOPSIS +.LP +.nf +\fBint ioctl( \fR\fIfd, \fR\fBI_PUSH\fR\fI, \fR\fB"tirdwr");\fR +.fi + +.SH DESCRIPTION +.sp +.LP +\fBtirdwr\fR is a STREAMS module that provides an alternate interface to a +transport provider which supports the Transport Interface ("\fBTI\fR") +functions of the Network Services library (see Section 3N). This alternate +interface allows a user to communicate with the transport protocol provider +using the \fBread\fR(2) and \fBwrite\fR(2) system calls. The \fBputmsg\fR(2) +and \fBgetmsg\fR(2) system calls may also be used. However, \fBputmsg\fR and +\fBgetmsg\fR can only transfer data messages between user and stream; control +portions are disallowed. +.sp +.LP +The \fBtirdwr\fR module must only be pushed (see \fBI_PUSH\fR in +\fBstreamio\fR(7I)) onto a stream terminated by a transport protocol provider +which supports the \fBTI\fR. After the \fBtirdwr\fR module has been pushed onto +a stream, none of the \fBTI\fR functions can be used. Subsequent calls to +\fBTI\fR functions cause an error on the stream. Once the error is detected, +subsequent system calls on the stream return an error with \fBerrno\fR set to +\fBEPROTO\fR. +.sp +.LP +The following are the actions taken by the \fBtirdwr\fR module when pushed on +the stream, popped (see \fBI_POP\fR in \fBstreamio\fR(7I)) off the stream, or +when data passes through it. +.sp +.ne 2 +.mk +.na +\fB\fBpush\fR\fR +.ad +.RS 9n +.rt +When the module is pushed onto a stream, it checks any existing data destined +for the user to ensure that only regular data messages are present. It ignores +any messages on the stream that relate to process management, such as messages +that generate signals to the user processes associated with the stream. If any +other messages are present, the \fBI_PUSH\fR will return an error with +\fBerrno\fR set to \fBEPROTO\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBwrite\fR\fR +.ad +.RS 9n +.rt +The module takes the following actions on data that originated from a +\fBwrite\fR system call: +.RS +4 +.TP +.ie t \(bu +.el o +All messages with the exception of messages that contain control portions (see +the \fBputmsg\fR and \fBgetmsg\fR system calls) are transparently passed onto +the module's downstream neighbor. +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Any zero length data messages are freed by the module and they will not be +passed onto the module's downstream neighbor. +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Any messages with control portions generate an error, and any further system +calls associated with the stream fails with \fBerrno\fR set to \fBEPROTO\fR. +.RE +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBread\fR\fR +.ad +.RS 9n +.rt +The module takes the following actions on data that originated from the +transport protocol provider. +.sp +All messages with the exception of those that contain control portions (see the +\fBputmsg\fR and \fBgetmsg\fR system calls) are transparently passed onto the +module's upstream neighbor. The action taken on messages with control portions +will be as follows: +.RS +4 +.TP +.ie t \(bu +.el o +Any data messages with control portions have the control portions removed from +the message before to passing the message on to the upstream neighbor. +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Messages that represent an orderly release indication from the transport +provider generate a zero length data message, indicating the end of file, which +will be sent to the reader of the stream. The orderly release message itself is +freed by the module. +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Messages that represent an abortive disconnect indication from the transport +provider cause all further \fBwrite\fR and \fBputmsg\fR system calls to fail +with \fBerrno\fR set to \fBENXIO\fR. All further \fBread\fR and \fBgetmsg\fR +system calls return zero length data (indicating end of file) once all previous +data has been read. +.RE +.RS +4 +.TP +.ie t \(bu +.el o +With the exception of the above rules, all other messages with control portions +generate an error and all further system calls associated with the stream will +fail with \fBerrno\fR set to \fBEPROTO\fR. +.RE +Any zero length data messages are freed by the module and they are not passed +onto the module's upstream neighbor. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBpop\fR\fR +.ad +.RS 9n +.rt +When the module is popped off the stream or the stream is closed, the module +takes the following action: +.RS +4 +.TP +.ie t \(bu +.el o +If an orderly release indication has been previously received, then an orderly +release request will be sent to the remote side of the transport connection. +.RE +.RE + +.SH SEE ALSO +.sp +.LP +\fBIntro\fR(3), \fBgetmsg\fR(2), \fBputmsg\fR(2), \fBread\fR(2), +\fBwrite\fR(2), \fBIntro\fR(3), \fBstreamio\fR(7I), \fBtimod\fR(7M) +.sp +.LP +\fISTREAMS Programming Guide\fR diff --git a/usr/src/man/man7m/ttcompat.7m b/usr/src/man/man7m/ttcompat.7m new file mode 100644 index 0000000000..f0a991cafb --- /dev/null +++ b/usr/src/man/man7m/ttcompat.7m @@ -0,0 +1,735 @@ +'\" te +.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright 2001 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 ttcompat 7M "2 Oct 2001" "SunOS 5.11" "STREAMS Modules" +.SH NAME +ttcompat \- V7, 4BSD and XENIX STREAMS compatibility module +.SH SYNOPSIS +.LP +.nf +#define BSD_COMP +#include <sys/stropts.h> +#include <sys/ioctl.h> +ioctl(\fIfd\fR, I_PUSH, "ttcompat"); +.fi + +.SH DESCRIPTION +.sp +.LP +\fBttcompat\fR is a STREAMS module that translates the \fBioctl\fR calls +supported by the older \fBVersion\fR \fB7,\fR \fB4BSD,\fR and \fBXENIX\fR +terminal drivers into the \fBioctl\fR calls supported by the \fBtermio\fR +interface (see \fBtermio\fR(7I)). All other messages pass through this module +unchanged; the behavior of \fBread\fR and \fBwrite\fR calls is unchanged, as is +the behavior of \fBioctl\fR calls other than the ones supported by +\fBttcompat\fR. +.sp +.LP +This module can be automatically pushed onto a stream using the \fBautopush\fR +mechanism when a terminal device is opened; it does not have to be explicitly +pushed onto a stream. This module requires that the \fBtermios\fR interface be +supported by the modules and the application can push the driver downstream. +The \fBTCGETS,\fR \fBTCSETS,\fR and \fBTCSETSF\fR \fBioctl\fR calls must be +supported. If any information set or fetched by those \fBioctl\fR calls is not +supported by the modules and driver downstream, some of the \fBV7/4BSD/XENIX\fR +functions may not be supported. For example, if the \fBCBAUD\fR bits in the +\fBc_cflag\fR field are not supported, the functions provided by the +\fBsg_ispeed\fR and \fBsg_ospeed\fR fields of the \fBsgttyb\fR structure (see +below) will not be supported. If the \fBTCFLSH\fR \fBioctl\fR is not supported, +the function provided by the \fBTIOCFLUSH\fR \fBioctl\fR will not be supported. +If the \fBTCXONC\fR \fBioctl\fR is not supported, the functions provided by the +\fBTIOCSTOP\fR and \fBTIOCSTART\fR \fBioctl\fR calls will not be supported. If +the \fBTIOCMBIS\fR and \fBTIOCMBIC\fR \fBioctl\fR calls are not supported, the +functions provided by the \fBTIOCSDTR\fR and \fBTIOCCDTR\fR \fBioctl\fR calls +will not be supported. +.sp +.LP +The basic \fBioctl\fR calls use the \fBsgttyb\fR structure defined by +<\fBsys/ttold.h\fR> (included by <\fBsys/ioctl.h\fR>): +.sp +.in +2 +.nf +struct sgttyb { + char sg_ispeed; + char sg_ospeed; + char sg_erase; + char sg_kill; + int sg_flags; +}; +.fi +.in -2 + +.sp +.LP +The \fBsg_ispeed\fR and \fBsg_ospeed\fR fields describe the input and output +speeds of the device. If the speed set on the device is over B38400, then it +is reported as B38400 for compatibility reasons. If it is set to B38400 and +the current speed is over B38400, the change is ignored. See TIOCGETP and +TIOCSETP below. The \fBsg_erase\fR and \fBsg_kill fields\fR of the argument +structure specify the erase and kill characters respectively, and reflect the +values in the VERASE and VKILL members of the \fBc_cc field\fR of the +\fBtermios\fR structure. +.sp +.LP +The \fBsg_flags\fR field of the argument structure contains several flags that +determine the system's treatment of the terminal. They are mapped into flags in +fields of the terminal state, represented by the \fBtermios\fR structure. +.sp +.LP +Delay type \fB0\fR (NL0, TAB0, CR0, FF0, BS0) is always mapped into the +equivalent delay type \fB0\fR in the \fBc_oflag\fR field of the \fBtermios\fR +structure. Other delay mappings are performed as follows: +.sp + +.sp +.TS +tab() box; +cw(0i) |cw(5.5i) +lw(0i) |lw(5.5i) +. +sg_flagsc_oflag +_ +BS1BS1 +_ +FF1VT1 +_ +CR1CR2 +_ +CR2CR3 +_ +CR3CR0 (not supported) +_ +TAB1TAB1 +_ +TAB2TAB2 +_ +XTABSTAB3 +_ +NL1ONLRET|CR1 +_ +NL2NL1 +_ +NL3NL0 (not supported) +.TE + +.sp +.LP +If previous \fBTIOCLSET\fR or \fBTIOCLBIS\fR \fBioctl\fR calls have not +selected \fBLITOUT\fR or \fBPASS8\fR mode, and if \fBRAW\fR mode is not +selected, the \fBISTRIP\fR flag is set in the \fBc_iflag\fR field of the +\fBtermios\fR structure, and the \fBEVENP\fR and \fBODDP\fR flags control the +parity of characters sent to the terminal and accepted from the terminal, as +follows: +.sp +.ne 2 +.mk +.na +\fB0 (neither EVENP nor ODDP)\fR +.ad +.RS 30n +.rt +Parity is not to be generated on output or checked on input. The character +size is set to \fBCS8\fR and the \fBPARENB\fR flag is cleared in the +\fBc_cflag\fR field of the \fBtermios\fR structure. +.RE + +.sp +.ne 2 +.mk +.na +\fBEVENP\fR +.ad +.RS 30n +.rt +Even parity characters are to be generated on output and accepted on input. The +INPCK flag is set in the \fBc_iflag\fR field of the \fBtermios\fR structure, +the character size is set to \fBCS7\fR and the \fBPARENB\fR flag is set in the +\fBc_iflag\fR field of the \fBtermios\fR structure. +.RE + +.sp +.ne 2 +.mk +.na +\fBODDP\fR +.ad +.RS 30n +.rt +Odd parity characters are to be generated on output and accepted on input. The +\fBINPCK\fR flag is set in the \fBc_iflag\fR, the character size is set to +\fBCS7\fR and the \fBPARENB\fR and \fBPARODD\fR flags are set in the +\fBc_iflag\fR field of the \fBtermios\fR structure. +.RE + +.sp +.ne 2 +.mk +.na +\fBEVENP|ODDP or ANYP\fR +.ad +.RS 30n +.rt +Even parity characters are to be generated on output and characters of +either parity are to be accepted on input. The \fBINPCK\fR flag is cleared in +the \fBc_iflag\fR field, the character size is set to \fBCS7\fR and the +\fBPARENB\fR flag is set in the \fBc_iflag\fR field of the \fBtermios\fR +structure. +.RE + +.sp +.LP +The \fBRAW\fR flag disables all output processing (the \fBOPOST\fR flag in the +\fBc_oflag\fR field, and the \fBXCASE\fR and \fBIEXTEN\fR flags in the +\fBc_iflag\fR field are cleared in the termios structure) and input processing +(all flags in the \fBc_iflag\fR field other than the \fBIXOFF\fR and +\fBIXANY\fR flags are cleared in the \fBtermios\fR structure). Eight bits of +data, with no parity bit are accepted on input and generated on output; the +character size is set to \fBCS8\fR and the \fBPARENB\fR and \fBPARODD\fR flags +are cleared in the \fBc_cflag\fR field of the \fBtermios\fR structure. The +signal-generating and line-editing control characters are disabled by clearing +the \fBISIG\fR and \fBICANON\fR flags in the \fBc_iflag\fR field of the termios +structure. +.sp +.LP +The \fBCRMOD\fR flag turns input carriage return characters into linefeed +characters, and output linefeed characters to be sent as a carriage return +followed by a linefeed. The \fBICRNL\fR flag in the \fBc_iflag\fR field, and +the \fBOPOST\fR and \fBONLCR\fR flags in the \fBc_oflag field\fR, are set in +the termios structure. +.sp +.LP +The \fBLCASE\fR flag maps upper-case letters in the \fBASCII\fR character set +to their lower-case equivalents on input (the \fBIUCLC\fR flag is set in the +\fBc_iflag\fR field), and maps lower-case letters in the \fBASCII\fR character +set to their upper-case equivalents on output (the \fBOLCUC\fR flag is set in +the \fBc_oflag\fR field). Escape sequences are accepted on input, and generated +on output, to handle certain \fBASCII\fR characters not supported by older +terminals (the \fBXCASE\fR flag is set in the \fBc_lflag\fR field). +.sp +.LP +Other flags are directly mapped to flags in the \fBtermios\fR structure: +.sp + +.sp +.TS +tab() box; +cw(0i) |cw(5.5i) +lw(0i) |lw(5.5i) +. +sg_flagsFlags in termios structure +_ +CBREAKComplement of ICANON in c_lflag field +_ +ECHOECHO in c_lflag field +_ +TANDEMIXOFF in c_iflag field +.TE + +.sp +.LP +Another structure associated with each terminal specifies characters that are +special in both the old Version 7 and the newer \fB4BSD\fR terminal interfaces. +The following structure is defined by \fB<sys/ttold.h>\fR: +.sp +.in +2 +.nf +struct tchars { + char t_intrc; /* interrupt */ + char t_quitc; /* quit */ + char t_startc; /* start output */ + char t_stopc; /* stop output */ + char t_eofc; /* end-of-file */ + char t_brkc; /* input delimiter (like nl) */ + }; +.fi +.in -2 + +.sp +.LP +\fBXENIX\fR defines the \fBtchar\fR structure as \fBtc\fR. The characters are +mapped to members of the \fBc_cc\fR field of the \fBtermios\fR structure as +follows: +.sp +.in +2 +.nf + tchars c_cc index + t_intrc VINTR + t_quitc VQUIT + t_startc VSTART + t_stopc VSTOP + t_eofc VEOF + t_brkc VEOL +.fi +.in -2 + +.sp +.LP +Also associated with each terminal is a local flag word (\fBTIOCLSET\fR and +\fBTIOCLGET\fR), specifying flags supported by the new 4BSD terminal +interface. Most of these flags are directly mapped to flags in the +\fBtermios\fR structure: +.sp + +.sp +.TS +tab() box; +cw(0i) |cw(5.5i) +lw(0i) |lw(5.5i) +. +Local flagsFlags in termios structure +_ +LCRTBSNot supported +_ +LPRTERAECHOPRT in the c_lflag field +_ +LCRTERAECHOE in the c_lflag field +_ +LTILDENot supported +_ +LMDMBUFNot supported +_ +LTOSTOPTOSTOP in the c_lflag field +_ +LFLUSHOFLUSHO in the c_lflag field +_ +LNOHANGCLOCAL in the c_cflag field +_ +LCRTKILECHOKE in the c_lflag field +_ +LPASS8CS8 in the c_cflag field +_ +LCTLECHCTLECH in the c_lflag field +_ +LPENDINPENDIN in the c_lflag field +_ +LDECCTQComplement of IXANY in the c_iflag field +_ +LNOFLSHNOFLSH in the c_lflag field +.TE + +.sp +.LP +Each flag has a corresponding equivalent \fBsg_flags\fR value. The +\fBsg_flags\fR definitions omit the leading "L"; for example, TIOCSETP with +\fBsg_flags\fR set to TOSTOP is equivalent to TIOCLSET with LTOSTOP. +.sp +.LP +Another structure associated with each terminal is the \fBltchars\fR structure +which defines control characters for the new \fB4BSD\fR terminal interface. Its +structure is: +.sp +.in +2 +.nf +struct ltchars { + char t_suspc; /* stop process signal */ + char t_dsuspc; /* delayed stop process signal */ + char t_rprntc; /* reprint line */ + char t_flushc; /*flush output (toggles) */ + char t_werasc; /* word erase */ + char t_lnextc; /* literal next character */ +}; +.fi +.in -2 + +.sp +.LP +The characters are mapped to members of the \fBc_cc\fR field of the +\fBtermios\fR structure as follows: +.sp + +.sp +.TS +tab() box; +cw(0i) |cw(5.5i) +lw(0i) |lw(5.5i) +. +ltcharsc_cc index +_ +t_suspc VSUS +_ +t_dsuspcVDSUSP +_ +t_rprntcVREPRINT +_ +t_flushcVDISCARD +_ +t_werascVWERASE +_ +t_lnextcVLNEXT +.TE + +.SH IOCTLS +.sp +.LP +\fBttcompat\fR responds to the following \fBioctl\fR calls. All others are +passed to the module below. +.sp +.ne 2 +.mk +.na +\fB\fBTIOCGETP\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBsgttyb\fR structure. The current terminal +state is fetched; the appropriate characters in the terminal state are +stored in that structure, as are the input and output speeds. If the speed is +over B38400, then B38400 is returned. The values of the flags in the +\fBsg_flags\fR field are derived from the flags in the terminal state and +stored in the structure. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCEXCL\fR \fR +.ad +.RS 14n +.rt +Set ``exclusive-use'' mode; no further opens are permitted until the file has +been closed. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCNXCL\fR \fR +.ad +.RS 14n +.rt +Turn off ``exclusive-use'' mode. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCSETP\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBsgttyb\fR structure. The appropriate +characters and input and output speeds in the terminal state are set from the +values in that structure, and the flags in the terminal state are set to match +the values of the flags in the \fBsg_flags\fR field of that structure. The +state is changed with a \fBTCSETSF\fR \fBioctl\fR so that the interface delays +until output is quiescent, then throws away any unread characters, before +changing the modes. If the current device speed is over B38400 for either input +or output speed, and B38400 is specified through this interface for that speed, +the actual device speed is not changed. If the device speed is B38400 or lower +or if some speed other than B38400 is specified, then the actual speed +specified is set. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCSETN\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBsgttyb\fR structure. The terminal state is +changed as \fBTIOCSETP\fR would change it, but a \fBTCSETS\fR \fBioctl\fR is +used, so that the interface neither delays nor discards input. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCHPCL\fR \fR +.ad +.RS 14n +.rt +The argument is ignored. The \fBHUPCL\fR flag is set in the \fBc_cflag\fR word +of the terminal state. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCFLUSH\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBint\fR variable. If its value is zero, all +characters waiting in input or output queues are flushed. Otherwise, the value +of the \fBint\fR is treated as the logical \fBOR\fR of the \fBFREAD\fR and +\fBFWRITE\fR flags defined by \fB<sys/file.h>\fR\&. If the \fBFREAD\fR bit is +set, all characters waiting in input queues are flushed, and if the +\fBFWRITE\fR bit is set, all characters waiting in output queues are flushed. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCSBRK\fR \fR +.ad +.RS 14n +.rt +The argument is ignored. The break bit is set for the device. (This is not +supported by \fBttcompat\fR. The underlying driver must support TIOCSBRK.) +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCCBRK\fR \fR +.ad +.RS 14n +.rt +The argument is ignored. The break bit is cleared for the device. (This is not +supported by \fBttcompat\fR. The underlying driver must support TIOCCBRK.) +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCSDTR\fR \fR +.ad +.RS 14n +.rt +The argument is ignored. The Data Terminal Ready bit is set for the device. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCCDTR\fR \fR +.ad +.RS 14n +.rt +The argument is ignored. The Data Terminal Ready bit is cleared for the device. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCSTOP\fR \fR +.ad +.RS 14n +.rt +The argument is ignored. Output is stopped as if the \fBSTOP\fR character had +been typed. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCSTART\fR \fR +.ad +.RS 14n +.rt +The argument is ignored. Output is restarted as if the \fBSTART\fR character +had been typed. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCGETC\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to a \fBtchars\fR structure. The current terminal +state is fetched, and the appropriate characters in the terminal state are +stored in that structure. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCSETC\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to a \fBtchars\fR structure. The values of the +appropriate characters in the terminal state are set from the characters in +that structure. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCLGET\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBint\fR. The current terminal state is +fetched, and the values of the local flags are derived from the flags in the +terminal state and stored in the \fBint\fR pointed to by the argument. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCLBIS\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBint\fR whose value is a mask containing +flags to be set in the local flags word. The current terminal state is fetched, +and the values of the local flags are derived from the flags in the terminal +state; the specified flags are set, and the flags in the terminal state are set +to match the new value of the local flags word. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCLBIC\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBint\fR whose value is a mask containing +flags to be cleared in the local flags word. The current terminal state is +fetched, and the values of the local flags are derived from the flags in the +terminal state; the specified flags are cleared, and the flags in the terminal +state are set to match the new value of the local flags word. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCLSET\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an int containing a new set of local flags. The +flags in the terminal state are set to match the new value of the local flags +word. (This \fBioctl\fR was added because \fBsg_flags\fR was once a 16 bit +value. The local modes controlled by TIOCLSET are equivalent to the modes +controlled by TIOCSETP and \fBsg_flags\fR.) +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCGLTC\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBltchars\fR structure. The values of the +appropriate characters in the terminal state are stored in that structure. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTIOCSLTC\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to an \fBltchars\fR structure. The values of the +appropriate characters in the terminal state are set from the characters in +that structure. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFIORDCHK\fR \fR +.ad +.RS 14n +.rt +Returns the number of immediately readable characters. The argument is ignored. +(This ioctl is handled in the stream head, not in the \fBttcompat\fR module.) +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFIONREAD\fR \fR +.ad +.RS 14n +.rt +Returns the number of immediately readable characters in the int pointed to by +the argument. (This ioctl is handled in the stream head, not in the +\fBttcompat\fR module.) +.RE + +.sp +.LP +The following ioctls are returned as successful for the sake of compatibility. +However, nothing significant is done (that is, the state of the terminal is not +changed in any way, and no message is passed through to the underlying +\fBtty\fR driver). +.sp +.in +2 +.nf + +DIOCSETP +DIOCSETP +DIOCGETP +LDCLOSE +LDCHG +LDOPEN +LDGETT +LDSETT +TIOCGETD +TIOCSETD +.fi +.in -2 + +.sp +.LP +The following old \fBioctl\fRs are not supported by \fBttcompat\fR, but are +supported by Solaris \fBtty\fR drivers. As with all ioctl not otherwise listed +in this documentation, these are passed through to the underlying driver and +are handled there. +.sp +.in +2 +.nf +TIOCREMOTE +TIOCGWINSZ +TIOCSWINSZ +.fi +.in -2 + +.sp +.LP +The following \fBioctls\fR are not supported by \fBttcompat\fR, and are +generally not supported by Solaris \fBtty\fR drivers. They are passed through, +and the \fBtty\fR drivers return EINVAL. +.sp +.in +2 +.nf +LDSMAP +LDGMAP +LDNMAP +TIOCNOTTY +TIOCOUTQ +.fi +.in -2 + +.sp +.LP +(Note: LDSMAP, LDGMAP, and LDNMAP are defined in +<\fBsys/termios.h\fR>.) +.SH SEE ALSO +.sp +.LP +\fBioctl\fR(2), \fBtermios\fR(3C), \fBldterm\fR(7M), \fBtermio\fR(7I) diff --git a/usr/src/man/man7m/usb_ah.7m b/usr/src/man/man7m/usb_ah.7m new file mode 100644 index 0000000000..38eddabb3b --- /dev/null +++ b/usr/src/man/man7m/usb_ah.7m @@ -0,0 +1,95 @@ +'\" te +.\" Copyright (c) 2009 by Sun Microsystems, Inc. All rights reserved. +.\" 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 usb_ah 7M "15 May 2009" "SunOS 5.11" "STREAMS Modules" +.SH NAME +usb_ah \- USB audio HID STREAMS module +.SH DESCRIPTION +.sp +.LP +The \fBusb_ah\fR STREAMS module enables the USB input control device which is a +member of the Human Interface Device (HID) class and provides support for +volume change and mute button. The \fBusb_ah\fR module is pushed on top of a +HID class driver instance (see \fBhid\fR(7D)) and below an Audio Control class +driver instance (see \fBusb_ac\fR(7D)). It translates the HID specific events +to the events that are supported by the Solaris audio mixer framework. +.SH FILES +.sp +.ne 2 +.mk +.na +\fB\fB/kernel/strmod/usb_ah\fR\fR +.ad +.sp .6 +.RS 4n +32-bit ELF kernel STREAMS module. (x86 platform only.) +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/kernel/strmod/sparcv9/usb_ah\fR\fR +.ad +.sp .6 +.RS 4n +SPARC 64-bit ELF kernel STREAMS module +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/kernel/strmod/amd64/usb_ah\fR\fR +.ad +.sp .6 +.RS 4n +x8664-bit ELF kernel STREAMS module +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +ArchitecturePCI-based systems +_ +Interface StabilityCommitted +.TE + +.SH SEE ALSO +.sp +.LP +\fBhid\fR(7D), \fBusba\fR(7D), \fBusb_ac\fR(7D), \fBusb_as\fR(7D), +\fBusb_mid\fR(7D), \fBaudio\fR(7I), +.sp +.LP +\fISTREAMS Programming Guide\fR +.sp +.LP +\fISystem Administration Guide: Basic Administration\fR +.sp +.LP +\fIUniversal Serial Bus Specification 1.0 and 1.1\fR +.sp +.LP +\fIDevice Class Definition for Human Interface Devices (HID) 1.1\fR +.SH DIAGNOSTICS +.sp +.LP +None +.SH NOTES +.sp +.LP +If USB audio drivers are not loaded, buttons are not active. diff --git a/usr/src/man/man7m/usbkbm.7m b/usr/src/man/man7m/usbkbm.7m new file mode 100644 index 0000000000..ce0756608a --- /dev/null +++ b/usr/src/man/man7m/usbkbm.7m @@ -0,0 +1,209 @@ +'\" te +.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved +.\" 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 usbkbm 7M "27 June 2005" "SunOS 5.11" "STREAMS Modules" +.SH NAME +usbkbm \- keyboard STREAMS module for Sun USB Keyboard +.SH SYNOPSIS +.LP +.nf +\fB\fR +.fi + +.LP +.nf +open("/dev/kbd", O_RDWR) +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBusbkbm\fR \fBSTREAMS\fR module processes byte streams generated by a +keyboard attached to a \fBUSB\fR port. \fBUSB\fR keyboard is a member of +Human Interface Device (HID) Class, and \fBusbkbm\fR only supports the keyboard +protocol defined in the specification. Definitions for altering keyboard +translation and reading events from the keyboard are in \fB<sys/kbio.h>\fR and +\fB<sys/kbd.h>\fR\&. +.sp +.LP +The \fBusbkbm\fR \fBSTREAMS\fR module adheres to the interfaces exported by +\fBkb\fR(7M). Refer to the \fBDESCRIPTION\fR section of \fBkb\fR(7M) for a +discussion of the keyboard translation modes and the \fBIOCTL\fR section for +the supported \fBioctl\fR(2) requests. +.SS "IOCTLS" +.sp +.LP +\fBUSB\fR Keyboard \fBusbkbm\fR returns different values for the following +ioctls than \fBkb\fR(7M): +.sp +.ne 2 +.mk +.na +\fB\fBKIOCTYPE\fR \fR +.ad +.RS 13n +.rt +This \fBioctl()\fR returns a new keyboard type defined for the \fBUSB\fR +keyboard. All types are listed below: +.RE + +.sp +.in +2 +.nf +KB_SUN3 Sun Type 3 keyboard +KB_SUN4 Sun Type 4 keyboard +KB_ASCII ASCII terminal masquerading as keyboard +KB_PC Type 101 PC keyboard +KB_USB USB keyboard +.fi +.in -2 + +.sp +.LP +The \fBUSB\fR keyboard type is \fBKB_USB\fR; \fBusbkbm\fR will return +\fBKB_USB\fR in response to the \fBKIOCTYPE\fR ioctl. +.sp +.ne 2 +.mk +.na +\fB\fBKIOCLAYOUT\fR \fR +.ad +.RS 15n +.rt +The argument is a pointer to an \fBint\fR. The layout code specified by the +\fBbCountryCode\fR value returned in the \fBHID\fR descriptor is returned in +the int pointed to by the argument. The \fBcountrycodes\fR are defined in 6.2.1 +of the \fBHID\fR 1.0 specifications. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKIOCCMD\fR \fR +.ad +.RS 15n +.rt +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_CLICK/KBD_CMD_NOCLICK\fR \fR +.ad +.sp .6 +.RS 4n +The \fBkb\fR(7M) indicates that inappropriate commands for particular keyboards +are ignored. Because clicking is not supported on the \fBUSB\fR keyboard, +\fBusbkbm\fR ignores this command +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_SETLED\fR \fR +.ad +.sp .6 +.RS 4n +Set keyboard LEDs. Same as \fBkb\fR(7M). +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_GETLAYOUT\fR \fR +.ad +.sp .6 +.RS 4n +The country codes defined in 6.2.1 of the \fBHID\fR 1.0 specification are +returned. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_BELL/KBD_CMD_NOBELL\fR \fR +.ad +.sp .6 +.RS 4n +This command is supported although the \fBUSB\fR keyboard does not have a +buzzer. The request for the bell is rerouted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBKBD_CMD_RESET\fR \fR +.ad +.sp .6 +.RS 4n +There is no notion of resetting the keyboard as there is for the type4 +keyboard. \fBusbkbm\fR ignores this command and does not return an error. +.RE + +.RE + +.SH FILES +.sp +.ne 2 +.mk +.na +\fB/kernel/strmod/usbkbm\fR +.ad +.sp .6 +.RS 4n +32-bit ELF kernel STREAMS module (x86 platform only) +.RE + +.sp +.ne 2 +.mk +.na +\fB/kernel/strmod/sparcv9/usbkbm\fR +.ad +.sp .6 +.RS 4n +SPARC 64-bit ELF kernel STREAMS module +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for a description of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +ArchitecturePCI-based systems +.TE + +.SH SEE ALSO +.sp +.LP +\fBdumpkeys\fR(1), \fBkbd\fR(1), \fBloadkeys\fR(1), \fBioctl\fR(2), +\fBkeytables\fR(4), \fBattributes\fR(5), \fBhid\fR(7D), \fBusba\fR(7D), +\fBvirtualkm\fR(7D), \fBkb\fR(7M) +.sp +.LP +\fISTREAMS Programming Guide\fR +.sp +.LP +\fISystem Administration Guide: Basic Administration\fR +.sp +.LP +http://\fIwww.sun.com/io\fR +.SH DIAGN0STICS +.sp +.LP +None diff --git a/usr/src/man/man7m/usbms.7m b/usr/src/man/man7m/usbms.7m new file mode 100644 index 0000000000..86fa5a7468 --- /dev/null +++ b/usr/src/man/man7m/usbms.7m @@ -0,0 +1,360 @@ +'\" te +.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved +.\" 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 usbms 7M "1 Dec 2005" "SunOS 5.11" "STREAMS Modules" +.SH NAME +usbms \- USB mouse STREAMS module +.SH SYNOPSIS +.LP +.nf +#include <sys/vuid_event.h> +.fi + +.LP +.nf +#include <sys/vuid_wheel.h> +.fi + +.LP +.nf +#include <sys/msio.h> +.fi + +.LP +.nf +#include <sys/msreg.h> +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBusbms\fR \fBSTREAMS\fR module processes byte streams generated by a +\fBUSB\fR mouse. A \fBUSB\fR mouse is a member of the Human Interface Device +(HID) class and the \fBusbms\fR module supports only the mouse boot protocol +defined in the \fBHID\fR specification. +.sp +.LP +The \fBusbms\fR module must be pushed on top of the \fBHID\fR class driver (see +\fBhid\fR(7D)). In the \fBVUID_FIRM_EVENT\fR mode, the \fBusbms\fR module +translates packets from the \fBUSB\fR mouse into Firm events. The Firm event +structure is defined in \fB<sys/vuid_event.h>\fR\&. The \fBSTREAMS\fR module +state is initially set to raw or \fBVUID_NATIVE\fR mode which performs no +message processing. See the \fIHID 1.0\fR specification for the raw format of +the mouse packets. To initiate mouse protocol conversion to Firm events, change +the state to \fBVUID_FIRM_EVENT\fR. +.sp +.LP +When the usb mouse is opened or hot plugged in, the MOUSE_TYPE_ABSOLUTE event +(Firm event) is sent to the upper level to notify the VUID application that it +is the absolute mouse. +.SH IOCTLS +.sp +.ne 2 +.mk +.na +\fB\fBVUIDGFORMAT\fR \fR +.ad +.RS 16n +.rt +This option returns the current state of the \fBSTREAMS\fR module. The state +of the \fBusbms\fR \fBSTREAMS\fR module may be either \fBVUID_NATIVE\fR (no +message processing) or \fBVUID_FIRM_EVENT\fR (convert to Firm events). +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBVUIDSFORMAT\fR \fR +.ad +.RS 16n +.rt +The argument is a pointer to an \fBint\fR. Set the state of the \fBSTREAMS\fR +module to the \fBint\fR pointed to by the argument. +.RE + +.sp +.in +2 +.nf +typedef struct vuid_addr_probe { + short base; /* default vuid device addr directed too */ + union { + short next; /* next addr for default when VUIDSADDR */ + short current; /* current addr of default when VUIDGADDR */ + } data; +} Vuid_addr_probe; +.fi +.in -2 + +.sp +.ne 2 +.mk +.na +\fB\fBVUIDSADDR\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to a \fBVuid_addr_probe\fR structure. +\fBVUIDSADDR\fR sets the virtual input device segment address indicated by base +to next. +.RE + +.sp +.LP +If base does not equal \fBVKEY_FIRST\fR, \fBENODEV\fR is returned. +.sp +.ne 2 +.mk +.na +\fB\fBVUIDGADDR\fR \fR +.ad +.RS 14n +.rt +The argument is a pointer to a \fBVuid_addr_probe\fR structure. Return the +address of the virtual input device segment indicated by base to current. +.RE + +.sp +.LP +If base does not equal \fBVKEY_FIRST\fR, \fBENODEV\fR is returned. +.sp +.ne 2 +.mk +.na +\fBVUIDGWHEELCOUNT\fR +.ad +.sp .6 +.RS 4n +This ioctl takes a pointer to an integer as argument and sets the value of the +integer to the number of wheels available on this device. This ioctl returns 1 +if wheel(s) are present and zero if no wheels are present. +.RE + +.sp +.ne 2 +.mk +.na +\fBVUIDGWHEELINFO\fR +.ad +.sp .6 +.RS 4n +This command returns static information about the wheel that does not change +while a device is in use. Currently the only information defined is the +wheel orientation which is either VUID_WHEEL_FORMAT_VERTICAL or +VUID_WHEEL_FORMAT_HORIZONTAL. If the module cannot distinguish the orientation +of the wheel or the wheel is of some other format, the format is set to +VUID_WHEEL_FORMAT_UNKNOWN. +.sp +.in +2 +.nf + typedef struct { + int vers; + int id; + int format; + } wheel_info; +.fi +.in -2 + +The ioctl takes a pointer to "wheel_info" structure with the "vers" set to +the current version of the "wheel_info" structure and "id" set to the id of the +wheel for which the information is desired. +.RE + +.sp +.ne 2 +.mk +.na +\fBVUIDSWHEELSTATE/VUIDGWHEELSTATE\fR +.ad +.sp .6 +.RS 4n +VUIDSWHEELSTATE sets the state of the wheel to that specified in the +stateflags. VUIDGWHEELSTATE returns the current state settings in the +stateflags field. +.sp +stateflags is an OR'ed set of flag bits. The only flag currently defined is +VUID_WHEEL_STATE_ENABLED. +.sp +When stateflags is set to VUID_WHEEL_STATE_ENABLED the module converts motion +of the specified wheel into VUID events and sends those up stream. +.sp +Wheel events are enabled by default. +.sp +Applications that want to change the stateflags should first get the current +stateflags and then change only the bit they want. +.sp +.in +2 +.nf + typedef struct { + int vers; + int id; + uint32_t stateflags; + } wheel_state; +.fi +.in -2 + +These ioctls take a pointer to "wheel_state" as an argument with the "vers" +and "id" members filled in. These members have the same meaning as that +for 'VUIDGWHEEL INFO' ioctl. +.RE + +.sp +.LP +\fBioctl()\fR requests for changing and retrieving mouse parameters use the +\fBMs_parms\fR structure: +.sp +.in +2 +.nf + typedef struct { + int jitter_thresh; + int speed_law; + int speed_limit; + } Ms_parms; +.fi +.in -2 + +.sp +.LP +\fBjitter_thresh\fR is the "jitter threshold" of the mouse. Motions fewer than +\fBjitter_thresh\fR units along both axes are accumulated and then sent up the +stream after 1/12 second. +.sp +.LP +\fBspeed_law\fR indicates whether extremely large motions are to be ignored. If +it is \fB1,\fR a "speed limit" is applied to mouse motions. Motions along +either axis of more than \fBspeed_limit\fR units are discarded. +.sp +.ne 2 +.mk +.na +\fB\fBMSIOGETPARMS\fR \fR +.ad +.RS 19n +.rt +The argument is a pointer to a \fBMs_params\fR structure. The \fBusbms\fR +module parameters are returned in the structure. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBMSIOSETPARMS\fR\fR +.ad +.RS 19n +.rt +The argument is a pointer to a \fBMs_params\fR structure. The \fBusbms\fR +module parameters are set according to the values in the structure. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBMSIOSRESOLUTION\fR\fR +.ad +.RS 19n +.rt +Used by the absolute mouse to get the current screen resolution. The parameter +is a pointer to the \fBMs_screen_resolution\fR structure: +.sp +.in +2 +.nf +int height; /* height of the screen */ +int width; /* width of the screen */ +}Ms_screen_resolution; +.fi +.in -2 + +The \fBusbms\fR module parameters are set according to the values in the +structure and used to calculate the correct coordinates. +.RE + +.SH FILES +.sp +.ne 2 +.mk +.na +\fB/kernel/strmod/usbms\fR +.ad +.sp .6 +.RS 4n +32-bit ELF kernel STREAMS module (x86 platform only.) +.RE + +.sp +.ne 2 +.mk +.na +\fB/kernel/strmod/sparcv9/usbms\fR +.ad +.sp .6 +.RS 4n +SPARC 64-bit ELF kernel STREAMS module +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for a description of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +ArchitecturePCI-based systems +.TE + +.SH SEE ALSO +.sp +.LP +\fBioctl\fR(2), \fBattributes\fR(5), \fBhid\fR(7D), \fBvirtualkm\fR(7D), +\fBusba\fR(7D) +.sp +.LP +\fISystem Administration Guide: Basic Administration\fR +.sp +.LP +http://\fIwww/sun.com/io\fR +.SH DIAGNOSTICS +.sp +.LP +The following messages may be logged into the system log. They are formatted in +the following manner: +.sp +.in +2 +.nf +<device path><usbms<instance number>): message... +.fi +.in -2 +.sp + +.sp +.ne 2 +.mk +.na +\fBInvalid Hid descriptor tree. Set to default value (3 buttons).\fR +.ad +.sp .6 +.RS 4n +The mouse supplied incorrect information in its HID report. +.RE + +.sp +.ne 2 +.mk +.na +\fBMouse buffer flushed when overrun.\fR +.ad +.sp .6 +.RS 4n +Mouse data was lost. +.RE + diff --git a/usr/src/man/man7m/vuidmice.7m b/usr/src/man/man7m/vuidmice.7m new file mode 100644 index 0000000000..7049d9fe31 --- /dev/null +++ b/usr/src/man/man7m/vuidmice.7m @@ -0,0 +1,316 @@ +'\" te +.\" Copyright (c) 2004, Sun Microsystems, Inc. +.\" 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 vuidmice 7M "21 June 2005" "SunOS 5.11" "STREAMS Modules" +.SH NAME +vuidmice, vuidm3p, vuidm4p, vuidm5p, vuid2ps2, vuid3ps2 \- converts mouse +protocol to Firm Events +.SH SYNOPSIS +.LP +.nf +#include <sys/stream.h> +.fi + +.LP +.nf +#include <sys/vuid_event.h> +.fi + +.LP +.nf +#include <sys/vuid_wheel.h> +.fi + +.LP +.nf +int ioctl(\fIfd\fR, I_PUSH, vuidm3p); +.fi + +.LP +.nf +int ioctl(\fIfd\fR, I_PUSH, vuidm4p); +.fi + +.LP +.nf +int ioctl(\fIfd\fR, I_PUSH, vuidm5p); +.fi + +.LP +.nf +int ioctl(\fIfd\fR, I_PUSH, vuid2ps2); +.fi + +.LP +.nf +int ioctl(\fIfd\fR, I_PUSH, vuid3ps2); +.fi + +.SH DESCRIPTION +.sp +.LP +The STREAMS modules \fBvuidm3p\fR, \fBvuidm4p\fR, \fBvuidm5p\fR, +\fBvuid2ps2\fR, and \fBvuid3ps2\fR convert mouse protocols to Firm events. The +Firm event structure is described in <\fBsys/vuid_event.h\fR>. Pushing a +STREAMS module does not automatically enable mouse protocol conversion to Firm +events. The STREAMS module state is initially set to raw or \fBVUID_NATIVE\fR +mode which performs no message processing. You must change the state to +\fBVUID_FIRM_EVENT\fR mode to initiate mouse protocol conversion to Firm +events. This can be accomplished by the following code: +.sp +.in +2 +.nf +int format; +format = VUID_FIRM_EVENT; +ioctl(fd, VUIDSFORMAT, &format); +.fi +.in -2 + +.sp +.LP +You can also query the state of the STREAMS module by using the +\fBVUIDGFORMAT\fR option. +.sp +.in +2 +.nf +int format; +int fd; /* file descriptor */ +ioctl(fd, VUIDGFORMAT, &format); +if ( format == VUID_NATIVE ); + /* The state of the module is in raw mode. + * Message processing is not enabled. + */ +if ( format == VUID_FIRM_EVENT ); + /* Message processing is enabled. + * Mouse protocol conversion to Firm events + * are performed. +.fi +.in -2 + +.sp +.LP +The remainder of this section describes the processing of STREAMS messages on +the read- and write-side. +.SS "Read Side Behavior" +.sp +.ne 2 +.mk +.na +\fB\fBM_DATA\fR \fR +.ad +.RS 12n +.rt +Incoming messages are queued and converted to Firm events. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBM_FLUSH\fR \fR +.ad +.RS 12n +.rt +The read queue of the module is flushed of all its data messages and all data +in the record being accumulated are also flushed. The message is passed +upstream. +.RE + +.SS "Write Side Behavior" +.sp +.ne 2 +.mk +.na +\fB\fBM_IOCTL\fR \fR +.ad +.RS 16n +.rt +Messages sent downstream as a result of an \fBioctl\fR(2) system call. The two +valid \fBioctl\fR options processed by the \fBvuidmice\fR modules are +\fBVUIDGFORMAT\fR and \fBVUIDSFORMAT\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBM_FLUSH\fR \fR +.ad +.RS 16n +.rt +The write queue of the module is flushed of all its data messages and the +message is passed downstream. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBVUIDGFORMAT\fR \fR +.ad +.RS 16n +.rt +This option returns the current state of the STREAMS module. The state of the +\fBvuidmice\fR STREAMS module may either be \fBVUID_NATIVE\fR (no message +processing) or \fBVUID_FIRM_EVENT\fR (convert to Firm events). +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBVUIDSFORMAT\fR \fR +.ad +.RS 16n +.rt +This option sets the state of the STREAMS module to \fBVUID_FIRM_EVENT.\fR If +the state of the STREAMS module is already in \fBVUID_FIRM_EVENT\fR, this +option is non-operational. It is not possible to set the state back to +\fBVUID_NATIVE\fR once the state becomes \fBVUID_FIRM_EVENT.\fR To disable +message processing, pop the STREAMS module out by calling \fBioctl(fd, 1I_POP, +vuid*)\fR. +.RE + +.sp +.LP +The following wheel support ioctls are defined for PS/2 mouse only: +.sp +.ne 2 +.mk +.na +\fBVUIDGWHEELCOUNT\fR +.ad +.RS 19n +.rt +This ioctl takes a pointer to an integer as argument and sets the value of the +integer to the number of wheels available on this device. +.RE + +.sp +.ne 2 +.mk +.na +\fBVUIDGWHEELINFO\fR +.ad +.RS 19n +.rt +This command returns static information about the wheel that does not +change while a device is in use. Currently the only information defined is +the wheel orientation which is either +VUID_WHEEL_FORMAT_VERTICAL or VUID_WHEEL_FORMAT_HORIZONTAL. +.sp +.in +2 +.nf + typedef struct { + int vers; + int id; + int format; + } wheel_info; +.fi +.in -2 + +The ioctl takes a pointer to "wheel_info" structure with the "vers" set to +the current version of the "wheel_info" structure and "id" set to the id of the +wheel for which the information is desired. +.RE + +.sp +.ne 2 +.mk +.na +\fBVUIDSWHEELSTATE\fR +.ad +.br +.na +\fBVUIDGWHEELSTATE\fR +.ad +.RS 19n +.rt +VUIDSWHEELSTATE sets the state of the wheel to that specified in the +stateflags. VUIDGWHEELSTATE returns the current state settings in the +stateflags field. +.sp +stateflags is an OR'ed set of flag bits. The only flag currently defined is +VUID_WHEEL_STATE_ENABLED. +.sp +When stateflags is set to VUID_WHEEL_STATE_ENABLED the module converts motion +of the specified wheel into VUID events and sends those up stream. +.sp +Wheel events are disabled by default. +.sp +Applications that want to change a flag should first get the current flags +and then change only the bit they want. +.sp +.in +2 +.nf + typedef struct { + int vers; + int id; + uint32_t stateflags; + } wheel_state; +.fi +.in -2 + +These ioctls take pointer to 'wheel_state' as an argument with the 'vers' +and 'id' members filled up. These members have the same meaning as that +for 'VUIDGWHEELINFO' ioctl. +.RE + +.SS "Mouse Configurations" +.sp + +.sp +.TS +tab() box; +cw(1.19i) |cw(2.47i) |cw(1.83i) +lw(1.19i) |lw(2.47i) |lw(1.83i) +. +ModuleProtocol TypeDevice +_ +vuidm3pT{ +3-Byte Protocol Microsoft 2 Button Serial Mouse +T}/dev/tty* +_ +vuidm4pT{ +4-Byte Protocol Logitech 3 Button Mouseman +T}/dev/tty* +_ +vuidm5pT{ +Logitech 3 Button Bus Mouse Microsoft Bus Mouse +T}/dev/logi/ dev/msm +_ +vuid2ps2T{ +PS/2 Protocol 2 Button PS/2 Compatible Mouse +T}/dev/kdmouse +_ +vuid3ps2T{ +PS/2 Protocol 3 Button PS/2 Compatible Mouse +T}/dev/kdmouse +.TE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +lw(2.75i) |lw(2.75i) +lw(2.75i) |lw(2.75i) +. +\fBATTRIBUTE TYPE\fR\fBATTRIBUTE VALUE\fR +_ +Architecturex86 +.TE + +.SH SEE ALSO +.sp +.LP +\fBattributes\fR(5), \fBvirtualkm\fR(7D) +.sp +.LP +\fISTREAMS Programming Guide\fR |
