Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ports(5) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

attributes

connect.con

environ-

ment

termio

ports

Purpose

     Describes the ports.

Description

     The ports file contains  the names and characteristics of
     all the system terminal  ports.  It provides a convenient
     means to  associate values with named  keyword parameters
     on  a  port-by-port  basis,  with  defaults  supplied  as
     desired.

     The getty process  is the principal user  of the informa-
     tion in this  file.  Since programs using  this file look
     for specific  keyword parameters  and ignore  all others,
     parameters other  than those discussed here  can be added
     to this file as necessary.

     File Format

     The  ports file  consists of  one or  more named  stanzas
     usually  separated by  blank lines.   Each stanza  begins
     with its name  followed by a colon,  and contains assign-
     ments of  values to  keyword attributes.  The  values, in
     turn, may be alphanumeric  strings or arbitrary character
     strings enclosed in double quotes.

     Stanzas  headed by  the name  default specify  attribute-
     value pairs  that are  associated with  all of  the ports
     following it to the next default stanza.  Explicit values
     within a port stanza override this association.

     Port-Control Parameters

     Most of  the parameters in  the ports file are  port con-
     trols  for login  terminals.   Because  there are  system
     defaults,  specified  in the  getty  process,  it is  not
     usually necessary  to specify more than  a few attributes
     in the ports  file, as in the example.   The port control
     parameters and their meanings are as follows:

     enabled      The  init  program  uses this  attribute  to
                  determine whether or not  to create a logger
                  on the  port.  If  the port should  permit a
                  logger,  the value  may be  true, share,  or
                  delay;   otherwise  the   value  is   false.
                  Normally the  value of  true is used  if the
                  port is to be  enabled; however, if the port
                  is  to be  shared (bi-directional  use) then
                  the  value should  be share  or delay.   The
                  value  share is  used to  make the  port bi-
                  directional with  the device  locking scheme

                  used by  uucp, cu,  ate and  connect.  Delay
                  operates like share except  that one or more
                  characters must be read from the port by the
                  getty process  before the login  herald will
                  be  printed.  Delay  is  useful with  direct
                  connections  and  intelligent  modems.   The
                  penable, pshare, pdelay, pdisable, and phold
                  commands will override  the value specified.
                  Note that penable,  pdisable, and phold com-
                  mands override the value specified.

     eof          An  octal integer  specifying the  character
                  code that causes an end of file to be gener-
                  ated from the  terminal.  The system default
                  is 004  (or 0x04), the ASCII  EOT character,
                  which is generated by Ctrl-D.

     eol          An optional  and seldom used  alternate line
                  termination character to  use in addition to
                  the ASCII new-line (line-feed) character.

     erase        An  octal integer  specifying the  character
                  code  that deletes  the previously  received
                  character.  The system default for the erase
                  character is 010 (or 0x08), Ctrl-h, which is
                  generated by the Backspace  key on many ter-
                  minals.

     herald       An  arbitrary  string,  enclosed  in  double
                  quotes,  printed  by  the getty  process  to
                  prompt   for   login.     The   C   language
                  \(backslash) escapes \r, \n,  \t, \b, and \f
                  are recognized as carriage return, new-line,
                  tab, backspace, and formfeed, respectively.

     imap         This attribute  is used by getty  to set the
                  terminal input  map.  If imap is  not speci-
                  fied,  getty resets  the map  to the  system
                  default.

     intr         An  octal integer  specifying the  character
                  code  that interrupts  the running  process.
                  The system default is  0177 (or 0x7f), which
                  is usually generated by a key labeled Del or
                  Rubout.

     kill         An  octal integer  specifying the  character
                  code  that  deletes  the  input  line.   The
                  system default for the kill character is 025
                  (or 0x15),  Ctrl-u, which  is the  ASCII NAK
                  character.

     lock         This  attribute  is  used  to  request  port
                  locking.  If the value is true, init creates
                  a  file  in  /etc/locks  when  the  port  is
                  enabled and  deletes the lock file  when the
                  port is  disabled.  Similarly,  penable does
                  not enable  a port  whose lock  attribute is
                  true  when   the  corresponding   lock  file
                  exists.   Programs using  the port  for some

                  other  purpose  (such   as  a  link  between
                  processors) should check  for an outstanding
                  lock (and create a  lock file, if necessary)
                  before opening the port.

     log          This parameter causes  logins to be recorded
                  for  a  port  on  the  console  or  in  file
                  /usr/adm/sulog.  If log=true, all logins are
                  reported,  and if  log=root, logins  by root
                  (superuser) are recorded.   See super param-
                  eter on  for related information.

     logger       A  character  string  giving the  names  the
                  program  to use  at login.   The default  is
                  /bin/login.

     logmodes     Console modes in  effect while prompting for
                  and  reading in  the user  name.  Modes  are
                  specified  as a  series of  terminal options
                  separated by  a + (plus).   Terminal options
                  are  as listed  in  the  stty command.   All
                  listed modes not preceded  with - (dash) are
                  recognized.    For   example,  the   default
                  logmodes parameter is specified as:

                         logmodes = cread+cs8+hupcl+echoe+echok

                  Because a  speed value is not  recognized in
                  logmodes under  any circumstances,  the baud
                  rate must  be set  with the  speed parameter
                  (see below).

     min          See the discussion of ICANON under "termio."

     omap         This attribute  is used by getty  to set the
                  terminal output map.  If  omap is not speci-
                  fied,  getty resets  the map  to the  system
                  default.

     owner        Normally,  when a  port  is  logged in,  the
                  login program sets the  logged-in user to be
                  the owner of that port.  Specifying an owner
                  (either  a UID  or  user  name), the  system
                  manager forces the getty process to set own-
                  ership even before opening the port.

     parity       The  values odd,  even, and  none cause  the
                  generation  of  odd,  even, and  no  parity,
                  respectively,   while  inpck,   ignpar,  and
                  parmrk cause  the checking input  for parity
                  errors,   ignoring  input   characters  with
                  parity  errors, and  "marking" input  parity
                  errors  as specified  under "termio."  These
                  values    can    be    combined,    as    in
                  "parity=odd+inpck".

     program      If a value is specified,  it is taken as the
                  name of  a program to run  immediately after
                  setting  the  logmodes.    This  feature  is
                  useful  for   establishing  special  purpose

                  server  ports that  respond to  a connection
                  with  a special  protocol  handler.  If  the
                  special  assignment  program=HOLD is  speci-
                  fied, no  program runs on the  port, but the
                  logmodes, ownership, and  protection are set
                  and the  port is held open.   This is useful
                  to keep the desired  modes associated with a
                  port  that is  occasionally seized  for some
                  special purpose.

     protection   Normally the  protection on terminal  is set
                  to rw--w--w- (octal 622 or 0x192).  The pro-
                  tection  parameter  overrides this  default.
                  The value can  be set to an octal  mask or a
                  string  such  as  rw-rw-rw-  (octal  666  or
                  0x1b6).

     quit         An  octal integer  specifying the  character
                  code  that  causes  the running  process  to
                  abort.  The system default is 026 (or 0x16),
                  which is generated by pressing Ctrl-V.

     runmodes     Console modes in effect  after the user name
                  is  read.  The  mode  in which  the port  is
                  left, specified similar to logmodes.

     speed        A decimal integer from the set {50, 75, 110,
                  134.5,  150,  300,  600, 1200,  1800,  2000,
                  2400,   3600,  4800,   7200,  9600,   19200}
                  depending on the hardware capability.

     super        This parameter  is passed  on the  logger in
                  its environment.  If super=false, then login
                  does not  allow root (the superuser)  to log
                  in on the port.  This is useful for security
                  on  off-site  terminal connections  such  as
                  telephone  links.   (See log  parameter,  on
                  page .)

     term         This parameter  is passed to the  logger and
                  shell  in their  environment (see  "environ-
                  ment") in the  variable TERM.  Some applica-
                  tion  software  uses   this  information  to
                  determine the  type of terminal the  user is
                  using.

     time         See the discussion of ICANON under "termio."

     timeout      A decimal  integer.  If  a user name  is not
                  specified   before  the   given  number   of
                  seconds, the  getty process advances  to the
                  next port setting, or  exits if all settings
                  were exhausted.

     Multiple values, separated by commas, can be specified as
     in the  speed=300,1200 line for dial-in  terminals.  This
     causes the port  to be set up according to  the first set
     of values for each attribute.  If a framing error occurs,
     as a  result of a user-generated  BREAK on the line  or a

     speed mismatch  between the  terminal and the  set speed,
     the getty process advances to the next value on the list.

     If multiple specifications occur for more than one param-
     eter, all are  advanced at the same time.   Thus, a spec-
     ification such as:

          speed=300,1200
          parity=none,odd+inpck

     first tries  the line at 300  baud with no parity.   If a
     framing error  occurs, it tries 1200  baud generation and
     checks for odd parity.

     Other Port Parameters

     The ports has all the port-specific information, not just
     information about  loggers.  The other parameters  in the
     file are:

     loc          The  location of  the terminal  connected to
                  the  port.   This   parameter  is  presently
                  unused by any RT  PC software.  Because pro-
                  grams that access  this file ignore keywords
                  they do not use,  helpful information can be
                  added to keep  all port-specific information
                  together in one area.

     printer      The hard  copy device  used for  output from
                  optional word processing packages.

Example

     The following example of a ports file illustrates some of
     its features:

       default:
            enabled = false
            speed = 9600
            herald = "\033[H\033[J\rRT PC(noname)\r\nlogin: "
            printer = lp0
            term = dumb
            erase = 010
            kill = 025
            intr = 0177

       /dev/console:
            loc = "console"
            term = hft
            enabled = true
            herald = "\033[H\033[J\rRT PC(/dev/console)\r\nlogin:"

Files

     /etc/ports
     /etc/locks

Related Information

     In  this book:   "attributes,"  "connect.con,"  "environ-
     ment," and  "termio."

     The su,  pstart, pdisable,  getty, login, init,  and stty
     commands in AIX Operating System Commands Reference.

     "Overview of International Character Support" in Managing
     the AIX Operating System.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026