
attach


Attaching the ports on a PC

    attach <hw_type> <io_addr> <vector> <mode> <label> <bufsize> <mtu>
    [<speed>]

     Configure and attach a hardware interface to the system. Detailed
instructions for each driver are in the Attach Commands chapter.  An
easy way to obtain a summary of the parameters required for a given
device is to issue a partial attach command (e.g., attach asy). This
produces a message giving the complete command format.

        <hw_type> is the kind of I/O device being attached to the
                system.  Choices include asy, kiss, packet, netrom, scc...
        <io_addr> is the base address of the control registers for the
                  device.
        <vector>  is the interrupt vector number.  Both the address
               and the vector must be in hexadecimal.  You may put "0x" in
               front of the numbers, but they will be interpreted in
               hexadecimal even without the prefix.
        <mode> controls how IP datagrams are to be encapsulated in
               the device's link level protocol.
               Choices include ax25, slip, pkiss, nrs, ppp...

     slip      Encapsulates IP datagrams directly in SLIP frames
     without a link header.  This is for operating point-to-point
     lines and is compatible with 4.2BSD UNIX SLIP.

     ax25      Similar to slip, except that an AX.25 header and a KISS
     TNC control header are added to the front of the datagram before
     SLIP encoding.  Either UI (connectionless) or I (connection-
     oriented) AX.25 frames can be used.
        
     pkiss     Similar to ax25, except that packets are checksummed and
     the interfaced devices are queried (polled) regularly for data.
     Used by G8BPQ polled-kiss software.
 
     nrs       Similar to ax25, except that packets are transmitted only
     when permitted by flow-control signals.  Typical of Netrom node stacks
     using Netrom serial protocol.

     ppp       Similar to slip, except the protocol is different and
     typically is capable of compression.

        <label>   defines the name by which the interface will be
        known to various commands, such as "connect", "route",
        "trace", etc.
        
        <bufsize> For ASYNCHRONOUS PORTS, specifies the size of the
        ring buffer in bytes to be statically allocated to the
        receiver; incoming bursts larger than <bufsize> may cause data
        to be lost.
        For ETHERNET, specifies how many PACKETS may be queued in the
        receive queue at one time.  Excess packets will be discarded
        as they are received.  This is useful to prevent the system
        from running out of memory should another node suddently
        develop a case of diarrhea.
        
        <mtu>     is the Maximum Transmission Unit size in bytes.
        See the section 'Of PACLEN, MTU, MSS, and More' in the JNOS40
        Configuration Manual for a discussion of the effect of MTU on
        system performance.

    attach asy <io_addr> <vector> <mode> <label> <bufsize> <mtu>
    [<speed>] [<flags>]

     Configure and attach a standard PC asynchronous I/O port using
the National 8250, 16450, or 16550(A) chip or equivalent to the system,
where:

        <io_addr> is the comm port address; e.g., com1 = 0x3f8
        <vector>  is the comm port IRQ value.  If it is suffixed by "_C"
                  then the interrupt service routine for this port is
                  chained to the server list for this IRQ.
        <mode>    one of: slip, ax25, ppp, pkiss, nrs
        <flags>   string of characters, specifying options:
                  c - do BPQ checksumming of ax.25 kiss packets
                  v - do Van Jacobson TCP header compression on slip intfc
                  f - force use of 16550a uart features (eg UM16C550 chip)
                  fN - set 16550a trigger level to N (1,4,8, or 14. Default=4)
                  n - use NRS-CTS protocol on nrs interface
        
                  Flag  for_mode  #define_needed_in_config.h
                  c     ax25      AX25 and POLLEDKISS
                  v     slip      SLIP and VJCOMPRESS
                  n     nrs       NRS
                  f     (any)     ASY

    The UNIX version of "attach asy" is slightly different, such that:
        <io_addr> is the Unix device name, eg, cua0 or ttyS2.
        <vector>  is ignored presently.
	<flags>   include c,v,f, and n.  The fifo trigger level flag, "fN",
                  is reinterpreted as providing a packet size.  The value
                  can range from 0 to 255;  if it is 0, the
                  original input mechanism is used, otherwise blocking reads
                  are used with termios VMIN set to the specified value.  At
                  the moment there is no error checking; if you set the buffer
                  size smaller than VMIN you could lose incoming data.  Under
                  some unix versions, setting it to anything other than a
                  multiple of VMIN could cause problems.  The tradeoff here
                  is that when the VMIN mechanism is used, input could be
                  delayed by up to 1/5 second on a mostly quiet channel, but
                  on an active channel JNOS will use *much* less CPU time
                  and generally will be much more efficient.


    attach axip <iface> <mtu> <ipaddress> [<callsign>]

     Create a RFC1226 compatible AX.25 frame encapsulator for
transmission of AX.25 frames over the IP.  This command is used to
establish a point-to-point AX.25 'tunnel' between two systems.


        <iface>   will be the name of the new interface,
        <mtu>     is the maximum transmission unit for the interface,
        <ipaddress> is the address of the system on the other side of
        the 'tunnel,
        <callsign> is the optional AX.25 callsign this station is
        listening on for frames to digipeat. Note that if you want
        cross-tunnel digipeating to work, each attached axip interface
        should listen to a different callsign.  These should also be
        different from other callsigns used on this station.
          
          attach axip axip1 256 44.26.1.19 WG7J-15
          
          
    attach kiss <asy_iface_label> <port> <label> [mtu]

     Attach a second kiss interface on the serial port. This command
     allows the use of multiport TNCs.  The first port should be attached
     by a prior "attach asy ..." command with <mode> set to ax25 or pkiss.
     Use pkiss if G8BPQ polled kiss mode is desired.  It is up to the
     tnc's firmware to select which port is at what baud.  For example,
     the KPC9612 uses the MYDROP command for this purpose.
     
     
        <asy_iface_label>   is the name of the serial port interface.
        <port>    is the port number (1-15) to use, and probably
                  should be 1. (the original asy port is automatically
                  port 0 !)
        <label>   is the name for this second kiss port.
        <mtu>     is an optional mtu, if different from the mtu on the
                  first kiss port.

          # Attach a dualport tnc in kiss mode.
          # Ports are labelled 'port1' and 'port2'
          
          # Attach a PC asynch port (com1 in this example)
          attach asy 03f8 4 ax25 port1 512 256 9600
          
          # Attach the second port on the multiport tnc
          attach kiss port1 1 port2
          
    
    attach netrom

     This makes available a pseudo interface to enable NET/ROM
     operations.  This command is automatically executed when the
     netrom server is started with the 'start netrom' command.


    attach packet <softintr#> <iface_label> <maxqueue> <mtu> [ipaddress]

     Driver for use with separate software "packet drivers" which
     conform to the FTP Software, Inc., Software Packet Driver
     specification.  See the Crynwr (TM) packet driver collection at
     ftp.crynwr.com, if your hardware (e.g. ethernet card) came without
     a packet driver.  [ipaddress] is an optional ip address for the
     interface.  If not set, the system 'ip address' will be used.

     Note that the packet driver is often loaded as a TSR in config.sys
     or autoexec.bat.  It is the driver that must be supplied with
     information such as hardware IRQ, i/o address, and software IRQ.
     Jnos only needs to know the software IRQ value to interact with this
     driver.  You must pick a software IRQ that is otherwise unused.
     Values between 0x78 and 0x7f are often suitable.

     Example: attach packet 0x7e eth0 5 1500

     
    attach scc   AND   attach escc

     G8FSL/PE1CHL driver for generic Z8530 cards, including DRSI cards.  Use
     escc if the Z85230 chip is installed, otherwise use scc.  Specify only
     one 'easy' or one 'init' command, and as many 'mode' commands as required.

     attach scc <board label> baycom|drsi|opto <base address> <interrupt number>
         [t<timing channel>]

     attach scc <board label> <#chips> init <base address> <spacing between SCC
         chip base addresses> <offset to channel A control register> <offset to
         channel B control register> <offset from each channels control
         register to data register> <address of INTACK/Read Vector port.
         (0 to read from RR3A/RR2B)> <CPU interrupt vector number> <clock
         frequency (PCLK/RTxC) prefix with "p" for PCLK> <optional hardware
         type> <optional parameter for special hardware> <optional t<tick chan>
         specification to use a channel to improve timing>

     attach scc <board label> <SCC channel number to attach, 0/1 for first chip A/B>
         <mode, can be "slip", "kiss", "ax25" or "nrs"> <interface label>
         <maximum transmission unit, bytes> <interface speed, e.g, "1200".
         prefix with "d" when an external divider is available to
         generate the TX clock.> <buffer size> <optional callsign used on radio
         channel> <optional s flag to specify software-derived DCD detection>

     Example: (see sccg8fsl.txt and scc.c, in Jnos src zipfile, for more info)
     attach scc scc0 drsi 300 7     (easy form of init command which follows)
     attach scc scc0 1 init 300 16 2 0 1 0 7 p4915200 8
     attach scc scc0 0 ax25 vhfa 235 d1200 512 k5arh-3 s
     attach scc scc0 1 ax25 vhfb 235 d1200 512 k5arh-2 s


    attach bpq init <vec> <stream>
    attach bpq <port> <label> [<mtu> [<callsign>]]

     The Jnos BPQ driver allows Jnos to attach interfaces directly
     to bpqcode without having to use the packet driver interface and
     the nodedrv4.com TSR. Jnos will talk to bpqcode using the bpq_host
     interrupt code in version 4.00 and up of bpqcode. This eliminates
     the extra memory and processing time used by nodedrv4.com to send
     packets between Jnos and bpqcode.

     The "attach bpq init" sub-command attaches the bpq_host TSR driver,
     which is accessed via software interrupt <vec> (in hex) for BPQ
     stream <stream> (in decimal).  "attach bpq init" may only be called
     once.

     The second form of the "attach bpq" sub-command is called once per
     <port>. It associates a BPQ <port> number with an interface name
     <label>. <mtu> may not exceed 256, and defaults to the ax.25 paclen
     value. <callsign> defaults to the ax25 mycall value, and establishes
     the callsign used by this BPQ port.

