# pragma ident "@(#)bnu:Devices	1.9 91/11/07 "
#
# Copyright 1991 Apple Computer, Inc.
# All Rights Reserved.
#
# Copyright 1984-85 AT&T
# AT&T K18 bnu:Devices 2.7 
# Devices 1.1 12/10/90 common
# common:Devices 1.2 1/17/90 10:08:59
#
# 'Devices' Basic Networking Utilities (BNU) Data Base Support File.
# [Related files: Dialers, Systems and Dialcodes]
# -----------------------------------------------------------------------------
# This file contains information about all the devices that may be used to
# establish a link to a remote computer.  Provisions are make for several types
# of devices, such as automatic call units, direct links, and network
# connections.  Each device entry type has the following format (each entry
# must have at least 5 fields; you can use '-' as a place holder if necessary):
#
#     Type[,protocol] Line[,modifier] Line2 Class Dialer-Token-Pairs
#
#     Type[,protocol]
#         This field may contain one of two keywords (Direct or ACU), the name
#         of a Local Area Network, switch, or system.  It also may contain
#         an optional protocol and any related parameters. This field is matched
#         against the third field (Type) in the 'Systems' file.  Type may be
#         any of:
#
#             Direct
#                 This built-in keyword indicates a direct link to another
#                 computer or switch.
#
#             ACU
#                 This built-in keyword specifies that the link to the remote
#                 computer is made through an automatic call unit.
#
#             <LAN_switch>
#                 This is the name of the LAN or switch.
#
#             <Sys_Name>
#                 This value specifies a direct link to a particular computer.
#                 This naming scheme is used to convey the fact that the line
#                 associated with this entry is for a particular computer in
#                 the 'Systems' file.
#
#         [,protocol]
#             The protocol determines how information will be transmitted and
#             received over the communication link.  Protocols are named by
#             use of a single upper/lowercase letter (could use a number also
#             I suppose...).  Normally, it's not necessary to specify a
#             protocol -- uucico will use the default 'g'.  Some protocols
#	      accept extra parameter information besides the protocol letter
#	      itself, and each has it's own format.  Each side of the
#	      communication line must support the desired protocol, and during
#	      the initial handshake period, the two uucico's will exchange the
#	      list of protocols they know about and the first protocol in the
#	      list that they both agree on will be used. The six available 
#	      protocols:
#
#                 e   This protocol assumes error free transmission and
#                     performs no error detecting or retransmission.  
#                     No checksums, windows, or or packets in this protocol --
#		      just straight reads and writes of 1,024 bytes at a time.
#		      Requires an 8-bit datapath.  The protocol begins by
#		      sending a message telling the other side how many
#		      bytes will be written.
#
#		      Not recommended for serial I/O.
#
#		  f   This protocol relies on flow control of the data stream.
#		      It is meant for working over links that can (almost) be
#		      guaranteed to be errorfree, specifically X.25/PAD links.
#		      A sumcheck is carried out over a whole file only (added
#		      at the end). If a transport fails the receiver can
#		      request retransmission(s).  This protocol uses a 7-bit
#		      datapath, so it can be used on links that are not 8-bit
#		      transparent.  The default parity is "even".
#
#                     To specify the parity:
#
#                         f(parity)
#
#		      examples:   f(even) f(odd)
#
#                 g   This is the generic protocol that every uucp understands.
#                     It provides error detection and retransmission over
#                     noisy lines.  It's the slowest of the protocols because
#		      each packet carries a checksum.  It has a window size of
#	 	      3, packet size of 64 bytes and requires a 8-bit datapath.
#
#                     To specify the number of windows and packet size:
#
#                         g(windows,packet_size)
#
#                 G   Same as the 'g' protocol except you can change the window
#                     and packet size.  Windowsizes can be range from 1 to 7,
#                     and packet sizes can be 32, 64, 128, 256, 512, 1024, 2048
#                     and 4096.
#
#		      To specify the number of windows and packet size:
#
#                         G(windows,packet_size)
#
#		  t   This protocol assumes error free transmission and
#                     performs no error detecting or retransmission.  
#                     No checksums or windows, but does have a simple
#		      "packet" that stores the data and length.  Packet can
#		      hold 1,024 bytes. Requires an 8-bit datapath.  
#
#		      Not recommended for serial I/O.
#
#                 x   This protocol assumes error free transmission and
#                     performs no error detecting or retransmission.
#                     No checksums, windows, or or packets in this protocol --
#                     just straight reads and writes of 512 bytes at a time.
#                     Requires an 8-bit datapath.
#
#		      Not recommended for serial I/O.
#
#             Examples:
#
#                 lan,eG(7,4096)g
#                     This says that if you can use the 'e' protocol, go ahead
#                     otherwise try the 'G' protocol with lots of windows and
#                     large packet sizes.  If both those protocols aren't
#                     understood by the other system, then use the very common,
#                     but slow 'g' protocol.
#
#                 ACU,G(7,512)g
#                     Try the 'G' protocol with lots of windows and fairly
#                     large packet sizes unless the other system doesn't agree,
#                     then use the 'g' protocol.
#
#     Line[,modifer]
#         This field contains the device name of the line (port) associated
#         with this device entry type.  For lines in the '/dev' directory,
#         you should strip off the 'dev' part, for example, let's assume the
#         line you want to communicate over is '/dev/tty1', you would then list
#         this as 'tty' here.
#
#         [,modifer]
#             Modifiers are used to tell the 'uucico', 'cu' or 'ct' programs
#             that this line requires special processing.  Each modifier is
#             a single character and more than one modifier can be specified.
#             The Macintosh internal Serial Ports (/dev/tty0 and /dev/tty1)
#	      have exactly one HandShake Output pin (HSKo) and one 
#	      HandShake Input pin (HSKi).  There's another pin named the
#	      General Purpose Input (GPi), but it is not used under A/UX.
#	      You can use only one of the 'D' and 'N' options at a time.
#	      These options don't affect the state of the HSKo pin; it'll 
#	      be placed in the MARK (asserted) state during the open.  The
#	      The HSKi pin is usually connected to the modem's CTS (Clear to
#	      Send) signal and the HSKo pin is connected to the modem's DTR
#	      (Data Terminal Ready).
#           
#                 M	Open this line without checking the state of the HSKi
#			pin. This means you do not wish to wait for
#			Data Carrier Detect (DCD), Data Set Ready (DSR) or
#			Clear To Send (CTS).  When the BNU program opens this
#			line, it'll use the 'O_NDELAY' flag to the open(2)
#			library function.  After the open completes, the HSKo
#			pin will be asserted and the 'O_NDELAY' flag will be
#			reset so the read(2)/write(2) functions will think the
#			line was opened without the flag. 
#
#		  D	After the line is opened, set the 'UIOCDTRFLOW' modem
#			control flag.  With this flag set, characters written
#			out to this line (by the BNU program) will be
#			"throttled" out the line by monitoring the HSKi pin.
#			The throttling is accomplished by transmitting
#			characters as long as the HSKi pin is NOT in the MARK
#			state (-5V to -15V).  Transmission continues (without
#			loss of characters) when the HSKi pin is no longer in
#			the MARK state.  In other words, by bouncing the pin
#			between the non-MARK (anything more positive than -5V)
#			and MARK states, you are starting and stopping the flow
#			of data from A/UX to the modem.  This option has no
#			effect on the data flow from the modem to A/UX.
#						
#                 N	This line is not to have any modem control.  The HSKi
#			pin state is ignored.
#		
#                 C	Like the 'M' modifier, the line is opened without
#			checking the state of the HSKi pin.  After the line is
#			opened and the other modifiers have been set, and just
#			before the chat script is called, the line is placed in
#			CLOCAL mode.  This will allow reads and writes to the
#			line without waiting for the carrier (DCD or HSKi). As
#			soon as the chat script is complete, the original
#			CLOCAL state is restored.  Thus, you can issue the
#			necessary commands to a modem and still be able to
#			monitor the state of the carrier.
#
#			For example, say the modem does't raise the DCD until
#			it's talking to another modem, but it can't talk to
#			another modem until you can issue the commands to make
#			it do so, but you can't issue commands until the DCD
#			is raised.  
#
#			You can also use the \M and \m flags to control CLOCAL
#			for the same purpose.
#
#     Line2
#         This field is used only by the 801 ACU dialer units and it specifies
#         the line (port) where the 801 dialer is connected.  The Line field
#         would specify the modem connection.  If you aren't using an 801
#         dialer, place a hyphen ('-') in this field to act as a place holder.
#
#     Class
#         This field usually will contain a speed (baud) for ACU or Direct
#         device entry types.  It can be anything as long as it matches the
#         forth field (Class) in the 'Systems' file.   It further divides the
#         device entry type.  For example, an ACU might be able to communicate
#         at more than one baud rate, so this field is used to select the
#         desired baud rate within this device entry type.  If this device
#         entry type can run at any speed, you can set this field to 'Any' and
#         it'll match any speed in the 'Systems' file for this device entry
#         type (if the 'Systems' file contains the string 'Any' in the Class
#         field for this device entry type also. the default speed will be
#         9600).
#     
#     Dialer-Token-Pairs
#         This field contains pairs of dialers and tokens.  This field is 
#         broken down into subfields in this format:
#
#             dialer token [dialer token ...]
#
#         The 'dialer' must be one of the built-in dialer names or a name 
#         listed in the 'Dialers' file.  The built-in dialer names are:
#
#             801	- 801 ACU Auto-Dialer
#             212	- 212 ACU Modem
#             TCP	- TCP (BSD sockets)
#
#         The 'token' part of the pair isn't required and if missing, the
#         necessary data will be taken from the 'Phone' field in the 'Systems'
#         file (unless the 'Dialers' file entry decides otherwise).  The token
#         field can also contain two escape codes:
#
#             \T
#                 Translate the phone number using the 'Dialcodes' file.
#            
#             \D
#                 Don't translate the phone number using the 'Dialcodes' file.
#
#         Entries listed in the 'Dialers' file should have a token of \D here
#         because the 'Dialers' entry can translate the phone number if it
#         so desires. If a phone number is expected and a \D or \T is not
#         present a \T is used for a built-in, and \D is used for an entry
#	  referencing the Dialers file. 
#

#-- TCP/IP connections
TCP    TCP     -   port TCP
TCP    TCP     -   uucp TCP
TCP    TCP     - telnet TCP 23

#-- Direct machine-to-machine connection
Direct tty0    -   Any direct
Direct tty1    -   Any direct

#-- Automatic Calling Units (Apple Data Modem 2400 Modem)
ACU    tty0    -   300 apple_data_modem_2400
ACU    tty0    -  1200 apple_data_modem_2400
ACU    tty0    -  2400 apple_data_modem_2400
ACU    tty1    -   300 apple_data_modem_2400
ACU    tty1    -  1200 apple_data_modem_2400
ACU    tty1    -  2400 apple_data_modem_2400

#-- Automatic Calling Units (Apple Personal Modem)
#ACU    tty0    -   300 apple_personal_modem
#ACU    tty0    -  1200 apple_personal_modem
#ACU    tty0    -  2400 apple_personal_modem
#ACU    tty1    -   300 apple_personal_modem
#ACU    tty1    -  1200 apple_personal_modem
#ACU    tty1    -  2400 apple_personal_modem

#-- Automatic Calling Units (Telebit Trailblazer Plus Modem)
#ACU    tty0,D -   300 telebit
#ACU    tty0,D -  1200 telebit
#ACU    tty0,D -  2400 telebit
#ACU    tty0,D -  4800 telebit
#ACU    tty0,D -  9600 telebit
#ACU    tty0,D - 19200 telebit
#ACU    tty1,D -   300 telebit
#ACU    tty1,D -  1200 telebit
#ACU    tty1,D -  2400 telebit
#ACU    tty1,D -  4800 telebit
#ACU    tty1,D -  9600 telebit
#ACU    tty1,D - 19200 telebit

#-- Automatic Calling Units (Penril Modem)
#ACU    tty0   -  1200 penril
#ACU    tty1   -  1200 penril

#-- Automatic Calling Units (Ventel Modem on a Develcon Switch)
#   (vent is the token given to the develcon to reach the ventel modem)
#ACU    tty0   -  1200 develcon vent ventel
#ACU    tty0   -  1200 develcon vent ventel \D
#ACU    tty1   -  1200 develcon vent ventel
#ACU    tty1   -  1200 develcon vent ventel \D

#-- Apple's PBX system connection via a Data Interface Unit
#
#   This is split into three dialer/token pairs:
#	ibx1 9600		(sets DIU Interface Speed to 9600 baud)
#	ibx2 12			(sets outside modem poll speed to 1200 baud)
#	ibx3			(dials the outside number)
#
#ibx    tty0   -   1200 ibx1 9600 ibx2 12 ibx3
#ibx    tty1   -   1200 ibx1 9600 ibx2 12 ibx3

#-- To reach a system on the local develcon switch
#Develcon tty0 -   Any develcon \D
#Develcon tty1 -   Any develcon \D

#-- Access a direct connection to a system
#   (systemx Any systemx 1200 unused  "" in:-\r\d-in: nuucp word: nuucp)
#systemx tty0  -   Any -
#systemx tty1  -   Any -

