Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man7d / su.7d
blob12f029d8657d7413a97a609c0051c31480d25594
1 '\" te
2 .\"  Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH SU 7D "April 9, 2016"
7 .SH NAME
8 su \- asynchronous serial port driver
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <fcntl.h>
13 #include <sys/termios.h>
14 open("/dev/tty\fI[a-z]\fR", _\fImode\fR);
15 open("/dev/term\fI[a-z]\fR", _\fImode\fR);
16 open("/dev/cua\fI[a-z]\fR", _\fImode\fR);
17 .fi
19 .LP
20 .nf
22 .fi
24 .SH DESCRIPTION
25 .LP
26 The \fBsu\fR module is a loadable STREAMS driver that provides basic support
27 for standard \fBUARTS\fR that use Intel-8250, National
28 Semiconductor-16450/16550 hardware and Southbridge 1535D (16550 compatible)
29 Super I/O hardware. The module also provides keyboard and mouse I/O support for
30 Sun machines using those same Intel, National Semiconductor and Southbridge
31 chipsets. The \fBsu\fR driver provides basic asynchronous communication support
32 for serial ports. Both the serial devices and keyboard/mouse devices will have
33 streams built with appropriate modules pushed atop the  \fBsu\fR driver by
34 means of either the \fBautopush\fR(8) or \fBdacf.conf\fR(4) facilities,
35 depending on the OS revision and architecture in use.
36 .sp
37 .LP
38 The \fBsu\fR module supports those \fBtermio\fR(7I) device control functions
39 specified by flags in the \fBc_cflag\fR word of the \fBtermios\fR structure,
40 and by the \fBIGNBRK,\fR \fBIGNPAR,\fR \fBPARMRK,\fR or \fBINPCK\fR flags in
41 the \fBc_iflag\fR word of the \fBtermios\fR structure. All other
42 \fBtermio\fR(7I) functions must be performed by \fBSTREAMS\fR modules pushed
43 atop the driver.  When a device is opened, the \fBldterm\fR(7M) and
44 \fBttcompat\fR(7M) \fBSTREAMS\fR modules are automatically pushed on top of the
45 stream, providing the standard \fBtermio\fR(7I) interface.
46 .sp
47 .LP
48 The character-special devices \fB/dev/ttya\fR and \fB/dev/ttyb\fR are used to
49 access the two standard serial ports. The \fBsu\fR module supports up to ten
50 serial ports, including the standard ports. The \fBtty\fR\fI[a-z]\fR devices
51 have minor device numbers in the range 00-03, and may be assigned names of the
52 form \fB/dev/ttyd_\fR\fIn_,\fR where \fI_n_\fR denotes the line to be accessed.
53 These device names are typically used to provide a logical access point for a
54 \fI_dial-in_\fR line that is used with a modem.
55 .sp
56 .LP
57 To allow a single tty line to be connected to a modem and used for incoming and
58 outgoing calls, a special feature is available that is controlled by the minor
59 device number. By accessing character-special devices with names of the form
60 \fB/dev/cua\fR\fI_n, \fR it is possible to open a port without the \fBCarrier
61 Detect\fR signal being asserted, either through hardware or an equivalent
62 software mechanism. These devices are commonly known as \fI_dial-out_\fR lines.
63 .SH APPLICATION PROGRAMMING INTERFACE
64 .LP
65 Once a \fB/dev/cua\fR\fI_n_\fR line is opened, the corresponding tty, or ttyd
66 line cannot be opened until the \fB/dev/cua\fR\fI_n_\fR line is closed. A
67 blocking open will wait until the \fB/dev/cua\fR\fI_n_\fR line is closed (which
68 will drop \fBData Terminal Ready\fR, after which \fBCarrier Detect\fR will
69 usually drop as well) and carrier is detected again. A non-blocking open will
70 return an error. If the \fB/dev/ttyd\fR\fI_n_\fR line has been opened
71 successfully (usually only when carrier is recognized on the modem), the
72 corresponding \fB/dev/cua\fR\fI_n_\fR line cannot be opened. This allows a
73 modem to be attached to a device, (for example, \fB/dev/ttyd0\fR, which is
74 renamed from \fB/dev/tty00\fR) and used for dial-in (by enabling the line for
75 login in \fB/etc/inittab\fR) or dial-out (by \fBtip\fR(1)) as
76 \fB/dev/cua0\fR when no one is logged in on the line.
77 .SH IOCTLS
78 .LP
79 The standard set of \fBtermio\fR \fBioctl()\fR calls are supported by \fBsu\fR.
80 .sp
81 .LP
82 Breaks can be generated by the \fBTCSBRK,\fR \fBTIOCSBRK,\fR and \fBTIOCCBRK\fR
83 \fBioctl()\fR calls.
84 .sp
85 .LP
86 The input and output line speeds may be set to any of the following baud rates:
87 0, 50, 75, 110, 134, 150, 200, 300, 600,   1200, 1800, 2400, 4800, 9600, 19200,
88 38400, 57600 or 115200. The speeds cannot be set independently; for example,
89 when the output speed is set, the input speed is automatically set to the same
90 speed.
91 .sp
92 .LP
93 When the  \fBsu\fR module is used to service the serial console port, it
94 supports a BREAK condition that allows the system to enter the debugger or the
95 monitor. The BREAK condition is generated by hardware and it is usually enabled
96 by default.
97 .sp
98 .LP
99 A BREAK condition originating from erroneous electrical signals cannot be
100 distinguished from one deliberately sent by remote DCE. The Alternate Break
101 sequence can be used as a remedy against this. Due to a risk of incorrect
102 sequence interpretation, SLIP and certain other binary protocols should not be
103 run over the serial console port when Alternate Break sequence is in effect.
104 Although PPP is a binary protocol, it is able to avoid these sequences using
105 the ACCM feature in \fIRFC 1662\fR. For Solaris PPP 4.0, you do this by adding
106 the following line to the \fB/etc/ppp/options\fR file (or other configuration
107 files used for the connection; see \fBpppd\fR(8) for details):
109 .in +2
111 asyncmap  0x00002000
113 .in -2
117 By default, the Alternate Break sequence is a three character sequence:
118 carriage return, tilde and control-B (CR ~ CTRL-B), but may be changed by the
119 driver. For more information on breaking (entering the debugger or monitor),
120 see \fBkbd\fR(1) and \fBkb\fR(7M).
121 .SH ERRORS
123 An \fBopen()\fR will fail under the following conditions:
125 .ne 2
127 \fB\fBENXIO\fR\fR
129 .RS 9n
130 The unit being opened does not exist.
134 .ne 2
136 \fB\fBEBUSY\fR\fR
138 .RS 9n
139 The dial-out device is being opened while the dial-in device is already open,
140 or the dial-in device is being opened with a no-delay open and the dial-out
141 device is already open.
145 .ne 2
147 \fB\fBEBUSY\fR\fR
149 .RS 9n
150 The unit has been marked as exclusive-use by another process with a
151 \fBTIOCEXCL\fR \fBioctl()\fR call.
154 .SH FILES
155 .ne 2
157 \fB\fB/dev/cua/[a-z]\fR\fR
159 .RS 19n
160 dial-out tty lines
164 .ne 2
166 \fB\fB/dev/term/[a-z]\fR\fR
168 .RS 19n
169 dial-in tty lines
173 .ne 2
175 \fB\fB/dev/tty[a-z]\fR\fR
177 .RS 19n
178 binary compatibility package device names
181 .SH ATTRIBUTES
183 See \fBattributes\fR(5) for descriptions of the following attributes:
188 box;
189 c | c
190 l | l .
191 ATTRIBUTE TYPE  ATTRIBUTE VALUE
193 Architecture     SPARC
196 .SH SEE ALSO
198 \fBstrconf\fR(1), \fBkbd\fR(1), \fBtip\fR(1),
199 \fBautopush\fR(8), \fBkstat\fR(8), \fBpppd\fR(8), \fBioctl\fR(2),
200 \fBopen\fR(2), \fBtermios\fR(3C), \fBdacf.conf\fR(4), \fBattributes\fR(5),
201 \fBkb\fR(7M), \fBldterm\fR(7M), \fBttcompat\fR(7M), \fBtermio\fR(7I)
202 .SH DIAGNOSTICS
204 The \fBsu\fR driver keeps track of various warning and error conditions using
205 \fBkstat\fR counters. The output of the \fBkstat su\fR command provides
206 \fBkstat\fR counters. The counters and their meaning follow:
208 .ne 2
210 \fBsilo overflow\fR
212 .RS 24n
213 The internal chip FIFO received more data than it could handle. This indicates
214 that the Solaris operating environment was not servicing data interrupts fast
215 enough possibly due to a system with too many interrupts or a data line with a
216 data rate that is too high.
220 .ne 2
222 \fBring buffer overflow\fR
224 .RS 24n
225 The \fBsu\fR module was unable to  store  data it removed from the chips
226 internal FIFO into a software buffer. The user process is not reading data fast
227 enough, possibly due to an overloaded system. If  possible, the application
228 should enable flow control (either CTSRTS or XONXOFF) to allow the driver to
229 backpressure the remote system when the local buffers fill up.