1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
'\" te
.\" Copyright 1989 AT&T Copyright (c) 1997 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 STTYDEFS 8 "Sep 14, 1992"
.SH NAME
sttydefs \- maintain line settings and hunt sequences for TTY ports
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/sttydefs\fR \fB-a\fR \fIttylabel\fR [\fB-b\fR] [\fB-f\fR \fIfinal-flags\fR]
[\fB-i\fR \fIinitial-flags\fR] [\fB-n\fR \fInextlabel\fR]
.fi
.LP
.nf
\fB/usr/sbin/sttydefs\fR \fB-l\fR [\fIttylabel\fR]
.fi
.LP
.nf
\fB/usr/sbin/sttydefs\fR \fB-r\fR \fIttylabel\fR
.fi
.SH DESCRIPTION
.sp
.LP
\fBsttydefs\fR is an administrative command that maintains the line settings
and hunt sequences for the system's TTY ports by making entries in, and
deleting entries from the \fB/etc/ttydefs\fR file.
.sp
.LP
\fBsttydefs\fR with a \fB-a\fR or \fB-r\fR option may be invoked only by the
super-user. \fBsttydefs\fR with \fB-l\fR may be invoked by any user on the
system.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR \fIttylabel\fR\fR
.ad
.RS 20n
Add a record to the \fBttydefs\fR file, using \fIttylabel\fR as its label. The
following describes the effect of the \fB-b\fR, \fB-n\fR, \fB-i\fR, or \fB-f\fR
options when used in conjunction with the \fB-a\fR option:
.RE
.sp
.ne 2
.na
\fB\fB-b\fR\fR
.ad
.RS 20n
Enable autobaud. Autobaud allows the system to set the line speed of a given
TTY port to the line speed of the device connected to the port without the
user's intervention.
.RE
.sp
.ne 2
.na
\fB\fB-f\fR \fIfinal-flags\fR\fR
.ad
.RS 20n
Specify the value to be used in the \fIfinal-flags\fR field in
\fB/etc/ttydefs\fR. \fIfinal-flags\fR must be in a format recognized by the
\fBstty\fR command. \fIfinal-flags\fR are the \fBtermio\fR(4I) settings used by
\fBttymon\fR after receiving a successful connection request and immediately
before invoking the service on the port. If this option is not specified,
\fBsttydefs\fR will set \fIfinal-flags\fR equal to the \fBtermio\fR(4I) flags
\fB9600\fR and \fBsane\fR.
.RE
.sp
.ne 2
.na
\fB\fB-i\fR \fIinitial-flags\fR\fR
.ad
.RS 20n
Specify the value to be used in the \fIinitial-flags\fR field in
\fB/etc/ttydefs\fR. \fIinitial-flags\fR must be in a format recognized by the
\fBstty\fR command. These flags are used by \fBttymon\fR when searching for the
correct baud rate. They are set prior to writing the prompt. If this option is
not specified, \fBsttydefs\fR will set \fIinitial-flags\fR equal to the
\fBtermio\fR(4I) flag \fB9600\fR.
.RE
.sp
.ne 2
.na
\fB\fB-n\fR \fInextlabel\fR\fR
.ad
.RS 20n
Specify the value to be used in the \fInextlabel\fR field in
\fB/etc/ttydefs\fR. If this option is not specified, \fBsttydefs\fR will set
\fInextlabel\fR equal to \fIttylabel\fR.
.RE
.sp
.ne 2
.na
\fB\fB-l\fR[\fIttylabel\fR]\fR
.ad
.RS 20n
If a \fIttylabel\fR is specified, \fBsttydefs\fR displays the record from
\fB/etc/ttydefs\fR whose TTY label matches the specified \fIttylabel\fR. If no
\fIttylabel\fR is specified, \fBsttydefs\fR displays the entire contents of
\fB/etc/ttydefs\fR. \fBsttydefs\fR verifies that each entry it displays is
correct and that the entry's \fInextlabel\fR field references an existing
.RE
.sp
.ne 2
.na
\fB\fB-r\fR \fIttylabel\fR\fR
.ad
.RS 20n
Remove any record in the \fBttydefs\fR file that has \fIttylabel\fR as its
label.
.RE
.SH OUTPUT
.sp
.LP
If successful, \fBsttydefs\fR will exit with a status of \fB0\fR.
\fBsttydefs\fR \fB-l\fR will generate the requested information and send it to
standard output.
.SH EXAMPLES
.LP
\fBExample 1 \fRA sample of \fBsttydefs\fR command.
.sp
.LP
The following command lists all the entries in the \fBttydefs\fR file and
prints an error message for each invalid entry that is detected.
.sp
.in +2
.nf
example# \fBsttydefs\fR \fB-l\fR
.fi
.in -2
.sp
.sp
.LP
The following shows a command that requests information for a single label and
its output:
.sp
.in +2
.nf
example# \fBsttydefs\fR \fB-l\fR 9600
------------------------------------------------------------------
9600:9600 hupcl erase ^h:9600 sane ixany tab3 hupcl erase ^h::4800
------------------------------------------------------------------
ttylabel: 9600
initial flags: 9600 hupcl erase ^h
final flags: 9600 sane ixany tab3 hupcl erase ^h
autobaud: no
nextlabel: 4800
.fi
.in -2
.sp
.sp
.LP
The following sequence of commands will add the labels \fB1200\fR, \fB2400\fR,
\fB4800\fR, and \fB9600\fR and put them in a circular list:
.sp
.in +2
.nf
sttydefs \fB-a\fR 1200 \fB-n\fR 2400 \fB-i\fR 1200 \fB-f\fR "1200 sane"
sttydefs \fB-a\fR 2400 \fB-n\fR 4800 \fB-i\fR 2400 \fB-f\fR "2400 sane"
sttydefs \fB-a\fR 4800 \fB-n\fR 9600 \fB-i\fR 4800 \fB-f\fR "4800 sane"
sttydefs \fB-a\fR 9600 \fB-n\fR 1200 \fB-i\fR 9600 \fB-f\fR "9600 sane"
.fi
.in -2
.sp
.SH FILES
.sp
.LP
\fB/etc/ttydefs\fR
.SH SEE ALSO
.sp
.LP
.BR termio (4I),
.BR attributes (7)
|