The ttydefs file
is an administrative file used by
It defines the speed and terminal settings for TTY ports.
Each line in
/etc/ttydefs contains five fields
(``ttylabel'', ``initial-flags'', ``final-flags'',
``autobaud'', and ``nextlabel''),
each of which is described below:
settings supported by the
are supported as options in the
For example, you can specify
the default erase and kill characters.
initializes a port, it searches the
file for the entry that contains the
settings for that port.
The correct entry is the one whose ``ttylabel''
matches the ``ttylabel'' for the port.
The ``ttylabel'' for the port is part of
the pmspecific information included in
By convention, ``ttylabel'' identifies a baud rate (for
example, ``1200''), but it need not.
options to which the terminal is initially set.
``initial-flags'' must be specified
using the syntax recognized by the
options set by
after a connection request has been made
and immediately before invoking a port's service.
Final flags must be specified
using the syntax recognized by
Autobaud is a line-speed option.
When autobaud is used instead of a baud rate setting,
determines the line speed of the TTY port
by analyzing the first carriage return entered
and sets the speed
If the autobaud field contains the character
the autobaud facility is enabled.
Otherwise, autobaud is disabled.
If the user indicates (by sending a BREAK)
that the current
entry does not provide a compatible line speed,
will search for the
entry whose ``ttylabel'' matches the
will then use that field as its ``ttylabel'' field.
A series of speeds is often linked together
in this way into a closed set called a hunt sequence.
may be linked to
which, in turn, is linked to
which is finally linked to
The following figure shows the relationship between the
``ttylabel'' and ``nextlabel'' fields in the
administrative files and
Links between the port monitor administrative file and the ttydefs file
The format of the /etc/ttydefs file
may change in future releases.
For continuity across releases,
to access this file.
The following is a sample ttydefs file:
38400:38400 hupcl erase ^h:38400 sane ixany tab3 hupcl erase ^h::19200
19200:19200 hupcl erase ^h:19200 sane ixany tab3 hupcl erase ^h::9600
9600:9600 hupcl erase ^h:9600 sane ixany tab3 hupcl erase ^h::4800
4800:4800 hupcl erase ^h:4800 sane ixany tab3 hupcl erase ^h::2400
2400:2400 hupcl erase ^h:2400 sane ixany tab3 hupcl erase ^h::1200
1200:1200 hupcl erase ^h:1200 sane ixany tab3 hupcl erase ^h::300
300:300 hupcl erase ^h:300 sane ixany tab3 hupcl erase ^h::19200
The autobaud option
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.
Each time a service to be monitored by a ttymon port monitor is
added, a ttylabel must be supplied
``Configuring terminal line settings'').
If this ttylabel points to an entry in the
/etc/ttydefs file that has an ``A'' in the autobaud field,
ttymon will try to determine the proper line speed before
printing the prompt.
After receiving a carrier indication on
one of its TTY ports,
but before printing a prompt,
ttymon does the following:
for more information about the autobaud option.
It reads the next character received from the port.
Provided the character read is
a newline character and that it is transmitted at a line speed autobaud
can support, ttymon will determine this line speed
and change the port's line speed to that speed.
If a baud rate cannot be determined from the character that is
read (for example, if
the user entered a character other than a newline) or if a
break is received rather than a character, ttymon considers this
to be an autobaud failure and the character is discarded.
If after five opportunities, a newline is not recognized, the
search proceeds to the next ttydefs entry in the hunt
If an autobaud flag is encounted again, the prompt will
not be written and the procedure just described is repeated.
If no autobaud flag is set, the search again proceeds to the next
ttydefs entry in the hunt sequence.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004