home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 11 / IOPROG_11.ISO / docs / ax25-h~1 < prev    next >
Encoding:
Text File  |  1997-06-30  |  130.0 KB  |  3,342 lines

  1.   Linux AX25-HOWTO, Amateur Radio.
  2.   Terry Dawson, VK2KTJ, terry@perf.no.itg.telstra.com.au
  3.   v1.4, 20 June 1997
  4.  
  5.   The Linux Operating System is perhaps the only operating system in the
  6.   world that can boast native and standard support for the AX.25 packet
  7.   radio protocol utilised by Amateur Radio Operators worldwide. This
  8.   document aims to describe how to install and configure this support.
  9.  
  10.   1.  Introduction.
  11.  
  12.   This document was originally an appendix to the HAM-HOWTO, but grew
  13.   too large to be reasonably managed in that fashion. This document
  14.   describes how to install and configure the native AX.25, NetRom and
  15.   Rose support for Linux. A few typical configurations are described
  16.   that could be used as models to work from.
  17.  
  18.   The Linux implementation of the amateur radio protocols is very
  19.   flexible.  To people relatively unfamiliar with the Linux operating
  20.   system the configuration process may look daunting and complicated. It
  21.   will take you a little time to come to understand how the whole thing
  22.   fits together. You will find configuration very difficult if you have
  23.   not properly prepared yourself by learning about Linux in general. You
  24.   cannot expect to switch from some other environment to Linux without
  25.   learning about Linux itself.
  26.  
  27.   1.1.  Changes from the previous version
  28.  
  29.   Additions:
  30.           Added the section missing from the BayCom configuration section.
  31.           Added 'hdlcdrv' to the list of modules needed to 'insmod' for BayCom.
  32.           Added Rose Uplink and Downlink configuration - thanks Rick
  33.  
  34.   Corrections/Updates:
  35.           Added kernel compile options into low level configuration section.
  36.           Removed that nasty axctl error.
  37.           Many small changes here and there to the BayCom and SoundModem sections.
  38.           Hopefully I've unconfused the kernel/tools issue.
  39.           Updated the home ftp site.
  40.  
  41.   ToDo:
  42.           Fix up the SCC section, this is probably wrong.
  43.           Expand on the programming section.
  44.           Add some references to AX.25 and NetRom source documentation.
  45.  
  46.   1.2.  Other related documentation.
  47.  
  48.   There is a lot of related documentation. There are many documents that
  49.   relate to Linux networking in more general ways and I strongly
  50.   recommend you also read these as they will assist you in your efforts
  51.   and provide you with stronger insight into other possible
  52.   configurations.
  53.  
  54.   They are:
  55.  
  56.   The HAM-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/HAM-HOWTO.html>,
  57.  
  58.   the NET-3-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/NET-3-HOWTO.html>,
  59.  
  60.   the Ethernet-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Ethernet-
  61.   HOWTO.html>,
  62.  
  63.   and:
  64.  
  65.   the Firewall-HOWTO <http://sunsite.unc.edu/LDP/HOWTO/Firewall-
  66.   HOWTO.html>
  67.  
  68.   More general Linux information may be found by reference to other
  69.   Linux HOWTO <http://sunsite.unc.edu/LDP/HOWTO/> documents.
  70.  
  71.   2.  Where to obtain new versions of this document.
  72.  
  73.   The best place to obtain the latest version of this document is from a
  74.   Linux Documentation Project archive. The Linux Documentation Project
  75.   runs a Web Server and this document appears there as The AX25-HOWTO
  76.   <http://sunsite.unc.edu/LDP/HOWTO/AX25-HOWTO.html>. You can always
  77.   contact me, but I pass new versions of the document directly to the
  78.   LDP HOWTO coordinator, so if it isn't there then chances are I haven't
  79.   finished it.
  80.  
  81.   3.  The Packet Radio Protocols and Linux.
  82.  
  83.   The AX.25 protocol offers both connected and connectionless modes of
  84.   operation, and is used either by itself for point-point links, or to
  85.   carry other protocols such as TCP/IP and NetRom.
  86.  
  87.   It is similar to X.25 level 2 in structure, with some extensions to
  88.   make it more useful in the amateur radio environment.
  89.  
  90.   The NetRom protocol is an attempt at a full network protocol and uses
  91.   AX.25 at its lowest layer as a datalink protocol. It provides a
  92.   network layer that is an adapted form of AX.25. The NetRom protocol
  93.   features dynamic routing and node aliases.
  94.  
  95.   The Rose protocol was conceived and first implemented by Tom Moulton
  96.   W2VY and is an implementation of the X.25 packet layer protocol and is
  97.   designed to operate with AX.25 as its datalink layer protocol. It too
  98.   provides a network layer. Rose addresses take the form of 10 digit
  99.   numbers. The first four digits are called the Data Network
  100.   Identification Code (DNIC) and are taken from Appendix B of the CCITT
  101.   X.121 recommendation. More information on the Rose protocol may be
  102.   ontained from the RATS Web server <http://www.rats.org/>.
  103.  
  104.   Alan Cox developed some early kernel based AX.25 software support for
  105.   Linux.  Jonathon Naylor <g4klx@g4klx.demon.co.uk> has taken up ongoing
  106.   development of the code, has added NetRom and Rose support and is now
  107.   the developer of the AX.25 related kernel code. DAMA support was
  108.   developed by Joerg, DL1BKE, jreuter@lykos.tng.oche.de. Baycom and
  109.   SoundModem support were added by Thomas Sailer,
  110.   <sailer@ife.ee.ethz.ch>. The AX.25 utility software is now maintained
  111.   by me.
  112.  
  113.   The Linux code supports KISS based TNC's (Terminal Node Controllers),
  114.   the Ottawa PI card, the Gracilis PacketTwin card and other Z8530 SCC
  115.   based cards with the generic SCC driver and both the Parallel and
  116.   Serial port Baycom modems. Thomas's new soundmodem driver supports
  117.   Soundblaster and soundcards based on the Crystal chipset.
  118.  
  119.   The User programs contain a simple PMS (Personal Message System), a
  120.   beacon facility, a line mode connect program, `listen' an example of
  121.   how to capture all AX.25 frames at raw interface level and programs to
  122.   configure the NetRom protocol. Included also are an AX.25 server style
  123.   program to handle and despatch incoming AX.25 connections and a NetRom
  124.   daemon which does most of the hard work for NetRom support.
  125.  
  126.   3.1.  How it all fits together.
  127.  
  128.   The Linux AX.25 implementation is a brand new implementation. While in
  129.   many ways it may looks similar to NOS, or BPQ or other AX.25
  130.   implementations, it is none of these and is not identical to any of
  131.   them. The Linux AX.25 implementation is capable of being configured to
  132.   behave almost identically to other implementations, but the
  133.   configuration process is very different.
  134.  
  135.   To assist you in understanding how you need to think when configuring
  136.   this section describes some of the structural features of the AX.25
  137.   implementation and how it fits into the context of the overall Linux
  138.   structure.
  139.  
  140.   Simplified Protocol Layering Diagram
  141.  
  142.        -----------------------------------------------
  143.        | AF_AX25 | AF_NETROM |  AF_INET    | AF_ROSE |
  144.        |=========|===========|=============|=========|
  145.        |         |           |             |         |
  146.        |         |           |    TCP/IP   |         |
  147.        |         |           ----------    |         |
  148.        |         |   NetRom           |    | Rose    |
  149.        |         -------------------------------------
  150.        |            AX.25                            |
  151.        -----------------------------------------------
  152.  
  153.   This diagram simply illustrates that NetRom, Rose and TCP/IP all run
  154.   directly on top of AX.25, but that each of these protocols is treated
  155.   as a seperate protocol at the programming interface. The `AF_' names
  156.   are simply the names given to the `Address Family' of each of these
  157.   protocols when writing programs to use them. The important thing to
  158.   note here is the implicit dependence on the configuration of your
  159.   AX.25 devices before you can configure your NetRom, Rose or TCP/IP
  160.   devices.
  161.  
  162.   Software module diagram on Linux Network Implementation
  163.  
  164.   ----------------------------------------------------------------------------
  165.    User    | Programs  |   call        node    ||  Daemons | ax25d  mheardd
  166.            |           |   pms         mheard  ||          | inetd  netromd
  167.   ----------------------------------------------------------------------------
  168.            | Sockets   | open(), close(), listen(), read(), write(), connect()
  169.            |           |------------------------------------------------------
  170.            |           |    AF_AX25   |  AF_NETROM  |   AF_ROSE   |  AF_INET
  171.            |------------------------------------------------------------------
  172.   Kernel   | Protocols |    AX.25     |   NetRom    |     Rose    | IP/TCP/UDP
  173.            |------------------------------------------------------------------
  174.            | Devices   |    ax0,ax1   |  nr0,nr1    | rose0,rose1 | eth0,ppp0
  175.            |------------------------------------------------------------------
  176.            | Drivers   |  Kiss   PI2   PacketTwin   SCC   BPQ     | slip ppp
  177.            |           |      Soundmodem      Baycom              | ethernet
  178.   ----------------------------------------------------------------------------
  179.   Hardware | PI2 Card, PacketTwin Card, SCC card, Serial port, Ethernet Card
  180.   ----------------------------------------------------------------------------
  181.  
  182.   This diagram is a little more general than the first. This diagram
  183.   attempts to show the relationship between user applications, the ker¡
  184.   nel and the hardware.  It also shows the relationship between the
  185.   Socket application programming interface, the actual protocol modules,
  186.   the kernel networking devices and the device drivers. Anything in this
  187.   diagram is dependent on anything underneath it, and in general you
  188.   must configure from the bottom of the diagram upwards.  So for exam¡
  189.   ple, if you want to run the call program you must also configure the
  190.   Hardware, then ensure that the kernel has the appropriate device
  191.   driver, that you create the appropriate network device, that the ker¡
  192.   nel includes the desired protocol that presents a programming inter¡
  193.   face that the call program can use. I have attempted to lay out this
  194.   document in roughly that order.
  195.  
  196.   4.  The AX.25/NetRom/Rose software components.
  197.  
  198.   The AX.25 software is comprised of three components, the kernel
  199.   source, the network configuration tools and the utility programs.
  200.  
  201.   The version 2.0.xx Linux kernels include the AX.25, NetRom, Z8530 SCC,
  202.   PI card and PacketTwin drivers by default. These have been
  203.   significantly enhanced in the 2.1.* kernels. Unfortunately, the rest
  204.   of the 2.1.*  kernels makes them fairly unstable at the moment and not
  205.   a good choice for a production system. To solve this problem Jonathon
  206.   Naylor has prepared a patch kit which will bring the amateur radio
  207.   protocol support in a 2.0.28 kernel up to the standard of the 2.1.*
  208.   kernels. This is very simple to apply, and provides a range of
  209.   facilities not present in the standard kernel such as Rose support.
  210.  
  211.   4.1.  Finding the kernel, tools and utility packages.
  212.  
  213.   4.1.1.  The kernel source:
  214.  
  215.   The kernel source can be found in its usual place at:
  216.  
  217.   ftp.funet.fi
  218.  
  219.        /pub/Linux/PEOPLE/Linus/v2.0/linux-2.0.30.tar.gz
  220.  
  221.   The current version of Jonathons upgrade patch is available at:
  222.  
  223.   ftp.pspt.fi
  224.  
  225.        /pub/linux/ham/ax25/ax25-module-14b.tar.gz
  226.  
  227.   4.1.2.  The network tools:
  228.  
  229.   The latest alpha release of the standard Linux network tools support
  230.   AX.25 and NetRom and can be found at:
  231.  
  232.   ftp.inka.de
  233.  
  234.   /pub/comp/Linux/networking/net-tools/net-tools-1.33.tar.gz
  235.  
  236.   The latest ipfwadm package can be found at:
  237.  
  238.   ftp.xos.nl
  239.  
  240.        /pub/linux/ipfwadm/
  241.  
  242.   4.1.3.  The AX25 utilities:
  243.  
  244.   There are two different families of AX25-utilities. One is for the
  245.   2.0.* kernels and the other will work with either the 2.1.* kernels or
  246.   the 2.0.*+moduleXX kernels. The ax25-utils version number indicate the
  247.   oldest version of kernel that they will work with. Please choose a
  248.   version of the ax25-utils appropriate to your kernel. The following
  249.   are working combinations.  You must use one of the following
  250.   combinations, any other combination will not work, or will not work
  251.   well.
  252.  
  253.        Linux Kernel            AX25 Utility set
  254.        ---------------------   -------------------------
  255.        linux-2.0.29            ax25-uitls-2.0.12c.tar.gz
  256.        linux-2.0.28+module12   ax25-utils-2.1.22b.tar.gz
  257.        linux-2.0.30+module14   ax25-utils-2.1.42.tar.gz
  258.        linux-2.1.22++          ax25-utils-2.1.22b.tar.gz
  259.        linux-2.1.42++          ax25-utils-2.1.42.tar.gz
  260.  
  261.   The AX.25 utility programs can be found at:
  262.  
  263.   ftp.pspt.fi <ftp://ftp.pspt.fi/pub/linux/ham/ax25/>
  264.  
  265.   or at:
  266.  
  267.   sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/apps/ham/>
  268.  
  269.   5.  Installing the AX.25/NetRom/Rose software.
  270.  
  271.   To successfully install AX.25 support on your linux system you must
  272.   configure and install an appropriate kernel and then install the AX.25
  273.   utilities.
  274.  
  275.   5.1.  Compiling the kernel.
  276.  
  277.   If you are already familiar with the process of compiling the Linux
  278.   Kernel then you can skip this section, just be sure to select the
  279.   appropriate options when compiling the kernel. If you are not, then
  280.   read on.
  281.  
  282.   The normal place for the kernel source to be unpacked to is the
  283.   /usr/src directory into a subdirectory called linux.  To do this you
  284.   should be logged in as root and execute a series of commands similar
  285.   to the following:
  286.  
  287.        # mv linux linux.old
  288.        # cd /usr/src
  289.        # tar xvfz linux-2.0.30.tar.gz
  290.        # tar xvfz /pub/net/ax25/ax25-module-14b.tar.gz
  291.        # patch -p0 </usr/src/ax25-module-14b/ax25-2.0.30-2.1.42-5.diff
  292.        # cd linux
  293.  
  294.   After you have unpacked the kernel source and applied the upgrade, you
  295.   need to run the configuration script and choose the options that suit
  296.   your hardware configuration and the options that you wish built into
  297.   your kernel.  You do this by using the command:
  298.  
  299.        # make menuconfig
  300.  
  301.   You might also try:
  302.  
  303.        # make config
  304.  
  305.   I'm going to describe the full screen method (menuconfig) because it
  306.   is easier to move around, but you use whichever you are most
  307.   comfortable with.
  308.  
  309.   In either case you will be offered a range of options at which you
  310.   must answer `Y' or `N'. (Note you may also answer `M' if you are using
  311.   modules.  For the sake of simplicity I will assume you are not, please
  312.   make appropriate modifications if you are).
  313.  
  314.   The options most relevant to an AX.25 configuration are:
  315.  
  316.   Code maturity level options  --->
  317.       ...
  318.       [*] Prompt for development and/or incomplete code/drivers
  319.       ...
  320.   General setup  --->
  321.       ...
  322.       [*] Networking support
  323.       ...
  324.   Networking options  --->
  325.       ...
  326.       [*] TCP/IP networking
  327.       [?] IP: forwarding/gatewaying
  328.       ...
  329.       [?] IP: tunneling
  330.       ...
  331.       [?] IP: Allow large windows (not recommended if <16Mb of memory)
  332.       ...
  333.       [*] Amateur Radio AX.25 Level 2
  334.       [?] Amateur Radio NET/ROM
  335.       [?] Amateur Radio X.25 PLP (Rose)
  336.       ...
  337.   Network device support  --->
  338.       [*] Network device support
  339.       ...
  340.       [*] Radio network interfaces
  341.       [?] BAYCOM ser12 and par96 driver for AX.25
  342.       [?] Soundcard modem driver for AX.25
  343.       [?] Soundmodem support for Soundblaster and compatible cards
  344.       [?] Soundmodem support for WSS and Crystal cards
  345.       [?] Soundmodem support for 1200 baud AFSK modulation
  346.       [?] Soundmodem support for 4800 baud HAPN-1 modulation
  347.       [?] Soundmodem support for 9600 baud FSK G3RUH modulation
  348.       [?] Serial port KISS driver for AX.25
  349.       [?] BPQ Ethernet driver for AX.25
  350.       [?] Gracilis PackeTwin support for AX.25
  351.       [?] Ottawa PI and PI/2 support for AX.25
  352.       [?] Z8530 SCC KISS emulation driver for AX.25
  353.       ...
  354.  
  355.   The options I have flagged with a `*' are those that you must must
  356.   answer `Y' to. The rest are dependent on what hardware you have and
  357.   what other options you want to include. Some of these options are
  358.   described in more detail later on, so if you don't know what you want
  359.   yet, then read ahead and come back to this step later.
  360.  
  361.   After you have completed the kernel configuration you should be able
  362.   to cleanly compile your new kernel:
  363.  
  364.        # make dep
  365.        # make clean
  366.        # make zImage
  367.  
  368.   maake sure you move your arch/i386/boot/zImage file wherever you want
  369.   it and then edit your /etc/lilo.conf file and rerun lilo to ensure
  370.   that you actually boot from it.
  371.  
  372.   5.1.1.  A word about Kernel modules
  373.  
  374.   I recommend that you don't compile any of the drivers as modules. In
  375.   nearly all installations you gain nothing but additional complexity.
  376.   Many people have problems trying to get the modularised components
  377.   working, not because the software is faulty but because modules are
  378.   more complicated to install and configure.
  379.  
  380.   If you've chosen to compile any of the components as modules, then
  381.   you'll also need to use:
  382.  
  383.        # make modules
  384.        # make modules_install
  385.  
  386.   to install your modules in the appropriate location.
  387.  
  388.   You will also need to add some entries into your /etc/conf.modules
  389.   file that will ensure that the kerneld program knows how to handle the
  390.   kernel modules. You should add/modify the following:
  391.  
  392.        alias net-pf-3     ax25
  393.        alias net-pf-6     netrom
  394.        alias net-pf-11    rose
  395.        alias tty-ldisc-1  slip
  396.        alias tty-ldisc-3  ppp
  397.        alias tty-ldisc-5  mkiss
  398.        alias bc0          baycom
  399.        alias nr0          netrom
  400.        alias pi0a         pi2
  401.        alias pt0a         pt
  402.        alias scc0         optoscc    (or one of the other scc drivers)
  403.        alias sm0          soundmodem
  404.        alias tunl0        newtunnel
  405.        alias char-major-4 serial
  406.        alias char-major-5 serial
  407.        alias char-major-6 lp
  408.  
  409.   5.1.2.  What's new in 2.0.*+ModuleXX or 2.1.* Kernels ?
  410.  
  411.   The 2.1.* kernels have enhanced versions of nearly all of the
  412.   protocols and drivers. The most significant of the enhancements are:
  413.  
  414.      modularised
  415.         the protocols and drivers have all been modularised so that you
  416.         can insmod and rmmod them whenever you wish. This reduces the
  417.         kernel memory requirements for infrequently used modules and
  418.         makes development and bug hunting much simpler. That being said,
  419.         it also makes configuration slightly more difficult.
  420.  
  421.      All drivers are now network drivers
  422.         all of the network devices such as Baycom, SCC, PI, Packettwin
  423.         etc now present a normal network interface, that is they now
  424.         look like the ethernet driver does, they no longer look like
  425.         KISS TNC's. A new utility called net2kiss allows you to build a
  426.         kiss interface to these devices if you wish.
  427.      bug fixed
  428.         there have been many bug fixes and new features added to the
  429.         drivers and protocols. The Rose protocol is one important
  430.         addition.
  431.  
  432.   5.2.  The network configuration tools.
  433.  
  434.   Now that you have compiled the kernel you should compile the new
  435.   network configuration tools. These tools allow you to modify the
  436.   configuration of network devices and to add routes to the routing
  437.   table.
  438.  
  439.   The new alpha release of the standard net-tools package includes
  440.   support for AX.25 and NetRom support. I've tested this and it seems to
  441.   work well for me.
  442.  
  443.   5.2.1.  Building the standard net-tools release.
  444.  
  445.   Don't forget to read the Release file and follow any instructions
  446.   there. The steps I used to compile the tools were:
  447.  
  448.        # cd /usr/src
  449.        # tar xvfz net-tools-1.33.tar.gz
  450.        # cd net-tools-1.33
  451.        # make config
  452.  
  453.   At this stage you will be presented with a series of configuration
  454.   questions, similar to the kernel configuration questions. Be sure to
  455.   include support for all of the protocols and network devices types
  456.   that you intend to use. If you do not know how to answer a particular
  457.   question then answer `Y'.
  458.  
  459.   The tools will compile cleanly against the source after you remove the
  460.   first line "usage und man page, info text von alexey" from the file
  461.   arp.c.
  462.  
  463.   When the compilation is complete, you should use the:
  464.  
  465.        # make install
  466.  
  467.   command to install the programs in their proper place.
  468.  
  469.   If you wish to use the IP firewall facilities then you will need the
  470.   latest firewall administration tool ipfwadm. This tool replaces the
  471.   older ipfw tool which will not work with new kernels.
  472.  
  473.   I compiled the ipfwadm utility with the following commands:
  474.  
  475.   # cd /usr/src
  476.   # tar xvfz ipfwadm-2.0beta2.tar.gz
  477.   # cd ipfwadm-2.0beta2
  478.   # make install
  479.   # cp ipfwadm.8 /usr/man/man8
  480.   # cp ipfw.4 /usr/man/man4
  481.  
  482.   5.3.  The AX.25 user and utility programs.
  483.  
  484.   After you have successfully compiled and booted your new kernel, you
  485.   need to compile the user programs. To compile and install the user
  486.   programs you should use a series of commands similar to the following:
  487.  
  488.        # cd /usr/src
  489.        # tax xvfz ax25-utils-2.1.42.tar.gz
  490.        # cd ax25-utils-2.1.42
  491.        # make config
  492.        # make
  493.        # make install
  494.  
  495.   The files will be installed under the /usr directory by default in
  496.   subdirectories: bin, sbin, etc and man.
  497.  
  498.   If this is a first time installation, that is you've never installed
  499.   any ax25 utilities on your machine before you should also use the:
  500.  
  501.        # make installconf
  502.  
  503.   command to install some sample configuration files into the /etc/ax25/
  504.   directory from which to work.
  505.  
  506.   If you get messages something like:
  507.  
  508.   gcc -Wall -Wstrict-prototypes -O2 -I../lib -c call.c
  509.   call.c: In function `statline':
  510.   call.c:268: warning: implicit declaration of function `attron'
  511.   call.c:268: `A_REVERSE' undeclared (first use this function)
  512.   call.c:268: (Each undeclared identifier is reported only once
  513.   call.c:268: for each function it appears in.)
  514.  
  515.   then you should double check that you have the ncurses package
  516.   properly installed on your system. The configuration script attempts
  517.   to locate your ncurses packages in the common locations, but some
  518.   installations have ncurses badly installed and it is unable to locate
  519.   them.
  520.  
  521.   6.  A note on callsigns, addresses and things before we start.
  522.  
  523.   Each AX.25 and NetRom port on your system must have a callsign/ssid
  524.   allocated to it. These are configured in the configuration files that
  525.   will be described in detail later on.
  526.  
  527.   Some AX.25 implementations such as NOS and BPQ will allow you to
  528.   configure the same callsign/ssid on each AX.25 and NetRom port. For
  529.   somewhat complicated technical reasons Linux does not allow this. This
  530.   isn't as big a problem in practise as it might seem.
  531.  
  532.   This means that there are things you should be aware of and take into
  533.   consideration when doing your configurations.
  534.  
  535.   1. Each AX.25 and NetRom port must be configured with a unique
  536.      callsign/ssid.
  537.  
  538.   2. TCP/IP will use the callsign/ssid of the AX.25 port it is being
  539.      transmitted or received by, ie the one you configured for the AX.25
  540.      interface in point 1.
  541.  
  542.   3. NetRom will use the callsign/ssid specified for it in its
  543.      configuration file, but this callsign is only used when your NetRom
  544.      is speaking to another NetRom, this is not the callsign/ssid that
  545.      AX.25 users who wish to use your NetRom `node' will use. More on
  546.      this later.
  547.  
  548.   4. Rose will, by default, use the callsign/ssid of the AX.25 port,
  549.      unless the Rose callsign has been specifically set using the
  550.      `rsparms' command.  If you set a callsign/ssid using the `rsparms'
  551.      command then Rose will use this callsign/ssid on all ports.
  552.  
  553.   5. Other programs, such as the `ax25d' program can listen using any
  554.      callsign/ssid that they wish and these may be duplicated across
  555.      different ports.
  556.  
  557.   6. If you are careful with routing you can configure the same IP
  558.      address on all ports if you wish.
  559.  
  560.   6.1.  What are all those T1, T2, N2 and things ?
  561.  
  562.   Not every AX.25 implementation is a TNC2. Linux uses nomenclature that
  563.   differs in some respects from that you will be used to if your sole
  564.   experience with packet is a TNC. The following table should help you
  565.   interpret what each of the configurable items are, so that when you
  566.   come across them later in this text you'll understand what they mean.
  567.  
  568.   -------------------------------------------------------------------
  569.   Linux  | TAPR TNC | Description
  570.   -------------------------------------------------------------------
  571.   T1     | FRACK    | How long to wait before retransmitting an
  572.          |          | unacknowledged frame.
  573.   -------------------------------------------------------------------
  574.   T2     | RESPTIME | The minimum amount of time to wait for another
  575.          |          | frame to be received before transmitting
  576.          |          | an acknowledgement.
  577.   -------------------------------------------------------------------
  578.   T3     | CHECK    | The period of time we wait between sending
  579.          |          | a check that the link is still active.
  580.   -------------------------------------------------------------------
  581.   N2     | RETRY    | How many times to retransmit a frame before
  582.          |          | assuming the connection has failed.
  583.   -------------------------------------------------------------------
  584.   Idle   |          | The period of time a connection can be idle
  585.          |          | before we close it down.
  586.   -------------------------------------------------------------------
  587.   Window | MAXFRAME | The maximum number of unacknowledged
  588.          |          | transmitted frames.
  589.   -------------------------------------------------------------------
  590.  
  591.   6.2.  Run time configurable parameters
  592.  
  593.   The 2.1.* and 2.0.* +moduleXX kernels have a new feature that allows
  594.   you to change many previously unchangable parameters at run time. If
  595.   you take a careful look at the /proc/sys/net/ directory structure you
  596.   will see many files with useful names that describe various parameters
  597.   for the network configuration. The files in the /proc/sys/net/ax25/
  598.   directory each represents one configured AX.25 port. The name of the
  599.   file relates to the name of the port.
  600.  
  601.   The structure of the files in /proc/sys/net/ax25/<portname>/ is as
  602.   follows:
  603.  
  604.   FileName              Meaning              Values                  Default
  605.   ip_default_mode       IP Default Mode      0=DG 1=VC               0
  606.   ax25_default_mode     AX.25 Default Mode   0=Normal 1=Extended     0
  607.   backoff_type          Backoff              0=Linear 1=Exponential  1
  608.   connect_mode          Connected Mode       0=No 1=Yes              1
  609.   standard_window_size  Standard Window      1  <= N <= 7            2
  610.   extended_window_size  Extended Window      1  <= N <= 63           32
  611.   t1_timeout            T1 Timeout           1s <= N <= 30s          10s
  612.   t2_timeout            T2 Timeout           1s <= N <= 20s          3s
  613.   t3_timeout            T3 Timeout           0s <= N <= 3600s        300s
  614.   idle_timeout          Idle Timeout         0m <= N                 20m
  615.   maximum_retry_count   N2                   1  <= N <= 31           10
  616.   maximum_packet_length AX.25 Frame Length   1  <= N <= 512          256
  617.  
  618.   In the table T1, T2 and T3 are given in seconds, and the Idle Timeout
  619.   is given in minutes. But please note that the values used in the
  620.   sysctl interface are given in internal units where the time in seconds
  621.   is multiplied by 10, this allows resolution down to 1/10 of a second.
  622.   With timers that are allowed to be zero, eg T3 and Idle, a zero value
  623.   indicates that the timer is disabled.
  624.  
  625.   The structure of the files in /proc/sys/net/netrom/ is as follows:
  626.  
  627.   FileName                       Values                  Default
  628.   default_path_quality                                   10
  629.   link_fails_count                                       2
  630.   network_ttl_initialiser                                16
  631.   obsolescence_count_initialiser                         6
  632.   routing_control                                        1
  633.   transport_acknowledge_delay                            50
  634.   transport_busy_delay                                   1800
  635.   transport_maximum_tries                                3
  636.   transport_requested_window_size                        4
  637.   transport_timeout                                      1200
  638.  
  639.   The structure of the files in /proc/sys/net/rose/ is as follows:
  640.  
  641.   FileName                       Values                  Default
  642.   acknowledge_hold_back_timeout                          50
  643.   call_request_timeout                                   2000
  644.   clear_request_timeout                                  1800
  645.   link_fail_timeout                                      1200
  646.   maximum_virtual_circuits                               50
  647.   reset_request_timeout                                  1800
  648.   restart_request_timeout                                1800
  649.   routing_control                                        1
  650.   window_size                                            3
  651.  
  652.   To set a parameter all you need to do is write the desired value to
  653.   the file itself, for example to check and set the Rose window size
  654.   you'd use something like:
  655.  
  656.        # cat /proc/sys/net/rose/window_size
  657.        3
  658.        # echo 4 >/proc/sys/net/rose/window_size
  659.        # cat /proc/sys/net/rose/window_size
  660.        4
  661.  
  662.   7.  Configuring an AX.25 port.
  663.  
  664.   Each of the AX.25 applications read a particular configuration file to
  665.   obtain the parameters for the various AX.25 ports configured on your
  666.   Linux machine.  For AX.25 ports the file that is read is the
  667.   /etc/ax25/axport file.  You must have an entry in this file for each
  668.   AX.25 port you want on your system.
  669.  
  670.   7.1.  Creating the AX.25 network device.
  671.  
  672.   The network device is what is listed when you use the `ifconfig'
  673.   command. This is the object that the Linux kernel sends and receives
  674.   network data from. Nearly always the network device has a physical
  675.   port associated with it, but there are occasions where this isn't
  676.   necessary. The network device does relate directly to a device driver.
  677.  
  678.   In the Linux AX.25 code there are a number of device drivers. The most
  679.   common is probably the KISS driver, but others are the SCC driver(s),
  680.   the Baycom driver and the SoundModem driver.
  681.   Each of these device drivers will create a network device when it is
  682.   started.
  683.  
  684.   7.1.1.  Creating a KISS device.
  685.  
  686.   Kernel Compile Options:
  687.  
  688.        General setup  --->
  689.            [*] Networking support
  690.        Network device support  --->
  691.            [*] Network device support
  692.            ...
  693.            [*] Radio network interfaces
  694.            [*] Serial port KISS driver for AX.25
  695.  
  696.   Probably the most common configuration will be for a KISS TNC on a
  697.   serial port.  You will need to have the TNC preconfigured and
  698.   connected to your serial port.  You can use a communications program
  699.   like minicom or seyon to configure the TNC into kiss mode.
  700.  
  701.   To create a KISS device you use the kissattach program. In it simplest
  702.   form you can use the kissattach program as follows:
  703.  
  704.        # /usr/sbin/kissattach /dev/ttyS0 radio
  705.        # kissparms -p radio -t 100 -s 100 -r 25
  706.  
  707.   The kissattach command will create a KISS network device. These
  708.   devices are called `ax[0-9]'. The first time you use the kissattach
  709.   command it creates `ax0', the second time it creates `ax1' etc. Each
  710.   KISS device has an associated serial port.
  711.  
  712.   The kissparms command allows you to set various KISS parameters on a
  713.   KISS device.
  714.  
  715.   Specifically the example presented would create a KISS network device
  716.   using the serial device `/dev/ttyS0' and the entry from the
  717.   /etc/ax25/axports with a port name of `radio'. It then configures it
  718.   with a txdelay and slottime of 100 milliseconds and a ppersist value
  719.   of 25.
  720.  
  721.   Please refer to the man pages for more information.
  722.  
  723.   7.1.1.1.  Configuring for Dual Port TNC's
  724.  
  725.   The mkiss utility included in the ax25-utils distribution allows you
  726.   to make use of both modems on a dual port TNC. Configuration is fairly
  727.   simple. It works by taking a single serial device connected to a
  728.   single multiport TNC and making it look like a number of devices each
  729.   connected to a single port TNC. You do this before you do any of the
  730.   AX.25 configuration. The devices that you then do the AX.25
  731.   configuration on are pseudo-TTY interfaces, (/dev/ttyp*), and not the
  732.   actual serial device. Pseudo-TTY devices create a kind of pipe through
  733.   which programs designed to talk to tty devices can talk to other
  734.   programs designed to talk to tty devices. Each pipe has a master and a
  735.   slave end. The master end is generally called `/dev/ptyp*' and the
  736.   slave ends are called `/dev/ttyp*'. There is a one to one relationship
  737.   between masters and slaves, so /dev/ptyp0 is the master end of a pipe
  738.   with /dev/ttyp0 as its slave. You must open the master end of a pipe
  739.   before opening the slave end. mkiss exploits this mechanism to split a
  740.   single serial device into seperate devices.
  741.  
  742.   Example: if you have a dual port tnc and it is connected to your
  743.   /dev/ttyS0 serial device at 9600 bps, the command:
  744.  
  745.        # /usr/sbin/mkiss -s 9600 /dev/ttyS0 /dev/ptyp0 /dev/ptyp1
  746.        # /usr/sbin/kissattach /dev/ttyp0 port1
  747.        # /usr/sbin/kissattach /dev/ttyp1 port2
  748.  
  749.   would create two pseudo-tty devices that each look like a normal
  750.   single port TNC. You would then treat /dev/ttyp0 and /dev/ttyp1 just
  751.   as you would a conventional serial device with TNC connected. This
  752.   means you'd then use the kissattach command as described above, on
  753.   each of those, in the example for AX.25 ports called port1 and port2.
  754.   You shouldn't use kissattach on the actual serial device as the mkiss
  755.   program uses it.
  756.  
  757.   The mkiss command has a number of optional arguments that you may wish
  758.   to use. They are summarised as follows:
  759.  
  760.      -c enables the addition of a one byte checksum to each KISS frame.
  761.         This is not supported by most KISS implementation, it is
  762.         supported by the G8BPG KISS rom.
  763.  
  764.      -s <speed>
  765.         sets the speed of the serial port.
  766.  
  767.      -h enables hardware handshaking on the serial port, it is off by
  768.         default. Most KISS implementation do not support this, but some
  769.         do.
  770.  
  771.      -l enables logging of information to the syslog logfile.
  772.  
  773.   7.1.2.  Creating a Baycom device.
  774.  
  775.   Kernel Compile Options:
  776.  
  777.        Code maturity level options  --->
  778.            [*] Prompt for development and/or incomplete code/drivers
  779.        General setup  --->
  780.            [*] Networking support
  781.        Network device support  --->
  782.            [*] Network device support
  783.            ...
  784.            [*] Radio network interfaces
  785.            [*] BAYCOM ser12 and par96 driver for AX.25
  786.  
  787.   Thomas Sailer, <sailer@ife.ee.ethz.ch>, despite the popularly held
  788.   belief that it would not work very well, has developed Linux support
  789.   for Baycom modems. His driver supports the Ser12 serial port, Par96
  790.   and the enhanced PicPar parallel port modems.  Further information
  791.   about the modems themselves may be obtained from the Baycom Web site
  792.   <http://www.baycom.de/>.
  793.  
  794.   Your first step should be to determine the i/o and addresses of the
  795.   serial or parallel port(s) you have Baycom modem(s) connected to.
  796.   When you have these you must configure the Baycom driver with them.
  797.  
  798.   The BayCom driver creates network devices called: bc0, bc1, bc2 etc.
  799.   when it is configured.
  800.  
  801.   The sethdlc utility allows you to configure the driver with these
  802.   parameters, or, if you have only one Baycom modem installed you may
  803.   specify the parameters on the insmod commmand line when you load the
  804.   Baycom module.
  805.  
  806.   For example, a simple configuration.  Disable the serial driver for
  807.   COM1: then configure the Baycom driver for a Ser12 serial port modem
  808.   on COM1: with the software DCD option enabled:
  809.  
  810.        # setserial /dev/ttyS0 uart none
  811.        # insmod hdlcdrv
  812.        # insmod baycom mode="ser12*" iobase=0x3f8 irq=4
  813.  
  814.   Par96 parallel port type modem on LPT1: using hardware DCD detection:
  815.  
  816.        # insmod hdlcdrv
  817.        # insmod baycom mode="par96" iobase=0x378 irq=7 options=0
  818.  
  819.   This is not really the preferred way to do it. The sethdlc utility
  820.   works just as easily with one device as with many.
  821.  
  822.   The sethdlc man page has the full details, but a couple of examples
  823.   will illustrate the most important aspects of this configuration. The
  824.   following examples assume you have already loaded the Baycom module
  825.   using:
  826.  
  827.        # insmod hdlcdrv
  828.        # insmod baycom
  829.  
  830.   or that you compiled the kernel with the driver inbuilt.
  831.  
  832.   Configure the bc0 device driver as a Parallel port Baycom modem on
  833.   LPT1: with software DCD:
  834.  
  835.        # sethdlc -p -i bc0 mode par96 io 0x378 irq 7
  836.  
  837.   Configure the bc1 device driver as a Serial port Baycom modem on COM1:
  838.  
  839.   # sethdlc -p -i bc1 mode "ser12*" io 0x3f8 irq 4
  840.  
  841.   7.1.3.  Configuring the AX.25 channel access parameters.
  842.  
  843.   The AX.25 channel access parameters are the equivalent of the KISS
  844.   ppersist, txdelay and slottime type parameters. Again you use the
  845.   sethdlc utility for this.
  846.  
  847.   Again the sethdlc man page is the source of the most complete
  848.   information but another example of two won't hurt:
  849.  
  850.   Configure the bc0 device with TxDelay of 200 mS, SlotTime of 100 mS,
  851.   PPersist of 40 and half duplex:
  852.  
  853.        # sethdlc -i bc0 -a txd 200 slot 100 ppersist 40 half
  854.  
  855.   Note that the timing values are in milliseconds.
  856.  
  857.   7.1.3.1.  Configuring the Kernel AX.25 to use the BayCom device
  858.  
  859.   The BayCom driver creates standard network devices that the AX.25
  860.   Kernel code can use. Configuration is much the same as that for a PI
  861.   or PacketTwin card.
  862.  
  863.   The first step is to configure the device with an AX.25 callsign. The
  864.   ifconfig utility may be used to perform this.
  865.  
  866.        # /sbin/ifconfig bc0 hw ax25 VK2KTJ-15 up
  867.  
  868.   will assign the BayCom device bc0 the AX.25 callsign VK2KTJ-15.
  869.   Alternatively you can use the axparms command, you'll still need to
  870.   use the ifconfig command to bring the device up though:
  871.  
  872.        # ifconfig bc0 up
  873.        # axparms -setcall bc0 vk2ktj-15
  874.  
  875.   The next step is to create an entry in the /etc/ax25/axports file as
  876.   you would for any other device. The entry in the axports file is
  877.   associated with the network device you've configured by the callsign
  878.   you configure. The entry in the axports file that has the callsign
  879.   that you configured the BayCom device with is the one that will be
  880.   used to refer to it.
  881.  
  882.   You may then treat the new AX.25 device as you would any other. You
  883.   can configure it for TCP/IP, add it to ax25d and run NetRom or Rose
  884.   over it as you please.
  885.  
  886.   7.1.4.  Creating a SoundModem device.
  887.  
  888.   Kernel Compile Options:
  889.  
  890.        Code maturity level options  --->
  891.            [*] Prompt for development and/or incomplete code/drivers
  892.        General setup  --->
  893.            [*] Networking support
  894.        Network device support  --->
  895.            [*] Network device support
  896.            ...
  897.            [*] Radio network interfaces
  898.            [*] Soundcard modem driver for AX.25
  899.            [?] Soundmodem support for Soundblaster and compatible cards
  900.            [?] Soundmodem support for WSS and Crystal cards
  901.            [?] Soundmodem support for 1200 baud AFSK modulation
  902.            [?] Soundmodem support for 4800 baud HAPN-1 modulation
  903.            [?] Soundmodem support for 9600 baud FSK G3RUH modulation
  904.  
  905.   Thomas Sailer has built a new driver for the kernel that allows you to
  906.   use your soundcard as a modem. Connect your radio directly to your
  907.   soundcard to play packet! Thomas recommends at least a 486DX2/66 if
  908.   you want to use this software as all of the digital signal processing
  909.   is done by the main CPU.
  910.  
  911.   The driver currently emulates 1200 bps AFSK, 4800 HAPN and 9600 FSK
  912.   (G3RUH compatible) modem types. The only sound cards currently
  913.   supported are SoundBlaster and WindowsSoundSystem Compatible models.
  914.   The sound cards require some circuitry to help them drive the Push-To-
  915.   Talk circuitry, and information on this is available from Thomas's
  916.   SoundModem PTT circuit web page
  917.   <http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html>. There are
  918.   quite a few possible options, they are: detect the sound output from
  919.   the soundcard, or use output from a parallel port, serial port or midi
  920.   port. Circuit examples for each of these are on Thomas's site.
  921.  
  922.   The SoundModem driver creates network devices called: sm0, sm1, sm2
  923.   etc when it is configured.
  924.  
  925.   Note: the SoundModem driver competes for the same resources as the
  926.   Linux sound driver. So if you wish to use the SoundModem driver you
  927.   must ensure that the Linux sound driver is not installed. You can of
  928.   course compile them both as modules and insert and remove them as you
  929.   wish.
  930.  
  931.   7.1.4.1.  Configuring the sound card.
  932.  
  933.   The SoundModem driver does not initialise the sound card. The
  934.   ax25-utils package includes a utility to do this called `setcrystal'
  935.   that may be used for SoundCards based on the Crystal chipset. If you
  936.   have some other card then you will have to use some other software to
  937.   initialise it.  Its syntax is fairly straightforward:
  938.  
  939.        setcrystal [-w wssio] [-s sbio] [-f synthio] [-i irq] [-d dma] [-c dma2]
  940.  
  941.   So, for example, if you wished to configure a soundblaster card at i/o
  942.   base address 0x388, irq 10 and DMA 1 you would use:
  943.        # setcrystal -s 0x388 -i 10 -d 1
  944.  
  945.   To configure a WindowSoundSystem card at i/o base address 0x534, irq
  946.   5, DMA 3 you would use:
  947.  
  948.        # setcrystal -w 0x534 -i 5 -d 3
  949.  
  950.   The [-f synthio] parameter is the set the synthesiser address, and the
  951.   [-c dma2] parameter is to set the second DMA channel to allow full
  952.   duplex operation.
  953.  
  954.   7.1.4.2.  Configuring the SoundModem driver.
  955.  
  956.   When you have configured the soundcard you need to configure the
  957.   driver telling it where the sound card is located and what sort of
  958.   modem you wish it to emulate.
  959.  
  960.   The sethdlc utility allows you to configure the driver with these
  961.   parameters, or, if you have only one soundcard installed you may
  962.   specify the parameters on the insmod commmand line when you load the
  963.   SoundModem module.
  964.  
  965.   For example, a simple configuration, with one SoundBlaster soundcard
  966.   configured as described above emulating a 1200 bps modem:
  967.  
  968.        # insmod hdlcdrv
  969.        # insmod soundmodem mode="sbc:afsk1200" iobase=0x220 irq=5 dma=1
  970.  
  971.   This is not really the preferred way to do it. The sethdlc utility
  972.   works just as easily with one device as with many.
  973.  
  974.   The sethdlc man page has the full details, but a couple of examples
  975.   will illustrate the most important aspects of this configuration. The
  976.   following examples assume you have already loaded the SoundModem
  977.   modules using:
  978.  
  979.        # insmod hdlcdrv
  980.        # insmod soundmodem
  981.  
  982.   or that you compiled the kernel with the driver inbuilt.
  983.  
  984.   Configure the driver to support the WindowsSoundSystem card we
  985.   configured above to emulate a G3RUH 9600 compatible modem as device
  986.   sm0 using a parallel port at 0x378 to key the Push-To-Talk:
  987.  
  988.        # sethdlc -p -i sm0 mode wss:fsk9600 io 0x534 irq 5 dma 3 pario 0x378
  989.  
  990.   Configure the driver to support the SoundBlaster card we configured
  991.   above to emulate a 4800 bps HAPN modem as device sm1 using the serial
  992.   port located at 0x2f8 to key the Push-To-Talk:
  993.  
  994.        # sethdlc -p -i sm1 mode sbc:hapn4800 io 0x388 irq 10 dma 1 serio 0x2f8
  995.  
  996.   Configure the driver to support the SoundBlaster card we configured
  997.   above to emulate a 1200 bps AFSK modem as device sm1 using the serial
  998.   port located at 0x2f8 to key the Push-To-Talk:
  999.  
  1000.        # sethdlc -p -i sm1 mode sbc:afsk1200 io 0x388 irq 10 dma 1 serio 0x2f8
  1001.  
  1002.   7.1.4.3.  Configuring the AX.25 channel access parameters.
  1003.  
  1004.   The AX.25 channel access parameters are the equivalent of the KISS
  1005.   ppersist, txdelay and slottime type parameters. You use the sethdlc
  1006.   utility for this as well.
  1007.  
  1008.   Again the sethdlc man page is the source of the most complete
  1009.   information but another example of two won't hurt:
  1010.  
  1011.   Configure the sm0 device with TxDelay of 100 mS, SlotTime of 50mS,
  1012.   PPersist of 128 and full duplex:
  1013.  
  1014.        # sethdlc -i sm0 -a txd 100 slot 50 ppersist 128 full
  1015.  
  1016.   Note that the timing values are in milliseconds.
  1017.  
  1018.   7.1.4.4.  Setting the audio levels and tuning the driver.
  1019.  
  1020.   It is very important that the audio levels be set correctly for any
  1021.   radio based modem to work. This is equally true of the SoundModem.
  1022.   Thomas has developed some utility programs that make this task easier.
  1023.   They are called smdiag and smmixer.
  1024.  
  1025.      smdiag
  1026.         provides two types of display, either an oscilloscope type
  1027.         display or an eye pattern type display.
  1028.  
  1029.      smmixer
  1030.         allows you to actually adjust the transmit and receive audio
  1031.         levels.
  1032.  
  1033.   To start the smdiag utility in 'eye' mode for the SoundModem device
  1034.   sm0 you would use:
  1035.  
  1036.        # smdiag -i sm0 -e
  1037.  
  1038.   To start the smmixer utility for the SoundModem device sm0 you would
  1039.   use:
  1040.  
  1041.        # smmixer -i sm0
  1042.  
  1043.   7.1.4.5.  Configuring the Kernel AX.25 to use the SoundModem
  1044.  
  1045.   The SoundModem driver creates standard network devices that the AX.25
  1046.   Kernel code can use. Configuration is much the same as that for a PI
  1047.   or PacketTwin card.
  1048.  
  1049.   The first step is to configure the device with an AX.25 callsign.  The
  1050.   ifconfig utility may be used to perform this.
  1051.  
  1052.        # /sbin/ifconfig sm0 hw ax25 VK2KTJ-15 up
  1053.  
  1054.   will assign the SoundModem device sm0 the AX.25 callsign VK2KTJ-15.
  1055.   Alternatively you can use the axparms command, but you still need the
  1056.   ifconfig utility to bring the device up:
  1057.  
  1058.        # ifconfig sm0 up
  1059.        # axparms -setcall sm0 vk2ktj-15
  1060.  
  1061.   The next step is to create an entry in the /etc/ax25/axports file as
  1062.   you would for any other device. The entry in the axports file is
  1063.   associated with the network device you've configured by the callsign
  1064.   you configure. The entry in the axports file that has the callsign
  1065.   that you configured the SoundModem device with is the one that will be
  1066.   used to refer to it.
  1067.  
  1068.   You may then treat the new AX.25 device as you would any other. You
  1069.   can configure it for TCP/IP, add it to ax25d and run NetRom or Rose
  1070.   over it as you please.
  1071.  
  1072.   7.1.5.  Creating a PI card device.
  1073.  
  1074.   Kernel Compile Options:
  1075.  
  1076.        General setup  --->
  1077.            [*] Networking support
  1078.        Network device support  --->
  1079.            [*] Network device support
  1080.            ...
  1081.            [*] Radio network interfaces
  1082.            [*] Ottawa PI and PI/2 support for AX.25
  1083.  
  1084.   The PI card device driver creates devices named `pi[0-9][ab]'. The
  1085.   first PI card detected will be allocated `pi0', the second `pi1' etc.
  1086.   The `a' and `b' refer to the first and second physical interface on
  1087.   the PI card. If you have built your kernel to include the PI card
  1088.   driver, and the card has been properly detected then you can use the
  1089.   following command to configure the network device:
  1090.  
  1091.        # /sbin/ifconfig pi0a hw ax25 VK2KTJ-15 up
  1092.  
  1093.   This command would configure the first port on the first PI card
  1094.   detected with the callsign VK2KTJ-15 and make it active. To use the
  1095.   device all you now need to do is to configure an entry into your
  1096.   /etc/ax25/axports file with a matching callsign/ssid and you will be
  1097.   ready to continue on.
  1098.  
  1099.   The PI card driver was written by David Perry, <dp@hydra.carleton.edu>
  1100.  
  1101.   7.1.6.  Creating a PacketTwin device.
  1102.  
  1103.   Kernel Compile Options:
  1104.  
  1105.        General setup  --->
  1106.            [*] Networking support
  1107.        Network device support  --->
  1108.            [*] Network device support
  1109.            ...
  1110.            [*] Radio network interfaces
  1111.            [*] Gracilis PackeTwin support for AX.25
  1112.  
  1113.   The PacketTwin card device driver creates devices named `pt[0-9][ab]'.
  1114.   The first PacketTwin card detected will be allocated `pt0', the second
  1115.   `pt1' etc. The `a' and `b' refer to the first and second physical
  1116.   interface on the PacketTwin card. If you have built your kernel to
  1117.   include the PacketTwin card driver, and the card has been properly
  1118.   detected then you can use the following command to configure the
  1119.   network device:
  1120.  
  1121.        # /sbin/ifconfig pt0a hw ax25 VK2KTJ-15 up
  1122.  
  1123.   This command would configure the first port on the first PacketTwin
  1124.   card detected with the callsign VK2KTJ-15 and make it active. To use
  1125.   the device all you now need to do is to configure an entry into your
  1126.   /etc/ax25/axports file with a matching callsign/ssid and you will be
  1127.   ready to continue on.
  1128.  
  1129.   The PacketTwin card driver was written by Craig Small VK2XLZ,
  1130.   <csmall@triode.apana.org.au>.
  1131.  
  1132.   7.1.7.  Creating a generic SCC device.
  1133.  
  1134.   Kernel Compile Options:
  1135.  
  1136.        General setup  --->
  1137.            [*] Networking support
  1138.        Network device support  --->
  1139.            [*] Network device support
  1140.            ...
  1141.            [*] Radio network interfaces
  1142.            [*] Z8530 SCC KISS emulation driver for AX.25
  1143.  
  1144.   Joerg Reuter, DL1BKE, jreuter@lykos.tng.oche.de has developed generic
  1145.   support for Z8530 SCC based cards. His driver is configurable to
  1146.   support a range of different types of cards and present an interface
  1147.   that looks like a KISS TNC so you can treat it as though it were a
  1148.   KISS TNC.
  1149.  
  1150.   7.1.7.1.  Obtaining and building the configuration tool package.
  1151.  
  1152.   While the kernel driver is included in the standard kernel
  1153.   distribution, Joerg distributes more recent versions of his driver
  1154.   with the suite of configuration tools that you will need to obtain as
  1155.   well.
  1156.  
  1157.   You can obtain the configuration tools package from:
  1158.  
  1159.   db0bm.automation.fh-aachen.de
  1160.  
  1161.        /incoming/dl1bke/
  1162.  
  1163.   or:
  1164.  
  1165.   insl1.etec.uni-karlsruhe.de
  1166.  
  1167.        /pub/hamradio/linux/z8530/
  1168.  
  1169.   or:
  1170.  
  1171.   ftp.ucsd.edu
  1172.  
  1173.        /hamradio/packet/tcpip/linux
  1174.        /hamradio/packet/tcpip/incoming/
  1175.  
  1176.   You will find multiple versions, choose the one that best suits the
  1177.   kernel you intend to use:
  1178.  
  1179.   z8530drv-2.4a.dl1bke.tar.gz   2.0.*
  1180.   z8530drv-utils-3.0.tar.gz    2.1.6 or greater
  1181.  
  1182.   The following command were what I used to compile and install the
  1183.   package for kernel version 2.0.25:
  1184.  
  1185.        # cd /usr/src
  1186.        # gzip -dc z8530drv-2.4a.dl1bke.tar.gz | tar xvpofz -
  1187.        # cd z8530drv
  1188.        # make clean
  1189.        # make dep
  1190.        # make module         # If you want to build the driver as a module
  1191.        # make for_kernel     # If you want the driver to built into your kernel
  1192.        # make install
  1193.  
  1194.   After the above is complete you should have three new programs
  1195.   installed in your /sbin directory: gencfg, sccinit and sccstat. It is
  1196.   these programs that you will use to configure the driver for your
  1197.   card.
  1198.  
  1199.   You will also have a group of new special device files created in your
  1200.   /dev called scc0 .. scc7. These will be used later and will be the
  1201.   `KISS' devices you will end up using.
  1202.  
  1203.   If you chose to 'make for_kernel' then you will need to recompile your
  1204.   kernel. To ensure that you include support for the z8530 driver you
  1205.   must be sure to answer `Y' to: `Z8530 SCC kiss emulation driver for
  1206.   AX.25' when asked during a kernel `make config'.
  1207.  
  1208.   If you chose to 'make module' then the new scc.o will have been
  1209.   installed in the appropriate /lib/modules directory and you do not
  1210.   need to recompile your kernel. Remember to use the insmod command to
  1211.   load the module before your try and configure it.
  1212.  
  1213.   7.1.7.2.  Configuring the driver for your card.
  1214.  
  1215.   The z8530 SCC driver has been designed to be as flexible as possible
  1216.   so as to support as many different types of cards as possible. With
  1217.   this flexibility has come some cost in configuration.
  1218.  
  1219.   There is more comprehensive documentation in the package and you
  1220.   should read this if you have any problems. You should particularly
  1221.   look at doc/scc_eng.doc or doc/scc_ger.doc for more detailed
  1222.   information. I've paraphrased the important details, but as a result
  1223.   there is a lot of lower level detail that I have not included.
  1224.  
  1225.   The main configuration file is read by the sccinit program and is
  1226.   called /etc/z8530drv.conf. This file is broken into two main stages:
  1227.   Configuration of the hardware parameters and channel configuration.
  1228.   After you have configured this file you need only add:
  1229.  
  1230.        # sccinit
  1231.  
  1232.   into the rc file that configures your network and the driver will be
  1233.   initialised according to the contents of the configuration file. You
  1234.   must do this before you attempt to use the driver.
  1235.  
  1236.   7.1.7.2.1.  Configuration of the hardware parameters.
  1237.  
  1238.   The first section is broken into stanzas, each stanza representing an
  1239.   8530 chip. Each stanza is a list of keywords with arguments. You may
  1240.   specify up to four SCC chips in this file by default. The #define
  1241.   MAXSCC 4 in scc.c can be increased if you require support for more.
  1242.  
  1243.   The allowable keywords and arguments are:
  1244.  
  1245.      chip
  1246.         the chip keyword is used to separate stanzas. It will take
  1247.         anything as an argument. The arguments are not used.
  1248.  
  1249.      data_a
  1250.         this keyword is used to specify the address of the data port for
  1251.         the z8530 channel `A'. The argument is a hexadecimal number e.g.
  1252.         0x300
  1253.  
  1254.      ctrl_a
  1255.         this keyword is used to specify the address of the control port
  1256.         for the z8530 channel `A'. The arguments is a hexadecimal number
  1257.         e.g. 0x304
  1258.  
  1259.      data_b
  1260.         this keyword is used to specify the address of the data port for
  1261.         the z8530 channel `B'. The argument is a hexadecimal number e.g.
  1262.         0x301
  1263.  
  1264.      ctrl_b
  1265.         this keyword is used to specify the address of the control port
  1266.         for the z8530 channel `B'. The arguments is a hexadecimal number
  1267.         e.g. 0x305
  1268.  
  1269.      irq
  1270.         this keyword is used to specify the IRQ used by the 8530 SCC
  1271.         described in this stanza. The argument is an integer e.g. 5
  1272.  
  1273.      pclock
  1274.         this keyword is used to specify the frequency of the clock at
  1275.         the PCLK pin of the 8530. The argument is an integer frequency
  1276.         in Hz which defaults to 4915200 if the keyword is not supplied.
  1277.  
  1278.      board
  1279.         the type of board supporting this 8530 SCC. The argument is a
  1280.         character string. The allowed values are:
  1281.  
  1282.         PA0HZP
  1283.            the PA0HZP SCC Card
  1284.  
  1285.         EAGLE
  1286.            the Eagle card
  1287.  
  1288.         PC100
  1289.            the DRSI PC100 SCC card
  1290.  
  1291.         PRIMUS
  1292.            the PRIMUS-PC (DG9BL) card
  1293.  
  1294.         BAYCOM
  1295.            BayCom (U)SCC card
  1296.  
  1297.      escc
  1298.         this keyword is optional and is used to enable support for the
  1299.         Extended SCC chips (ESCC) such as the 8580, 85180, or the 85280.
  1300.         The argument is a character string with allowed values of `yes'
  1301.         or `no'. The default is `no'.
  1302.  
  1303.      vector
  1304.         this keyword is optional and specifies the address of the vector
  1305.         latch (also known as "intack port") for PA0HZP cards. There can
  1306.         be only one vector latch for all chips. The default is 0.
  1307.  
  1308.      special
  1309.         this keyword is optional and specifies the address of the
  1310.         special function register on several cards. The default is 0.
  1311.  
  1312.      option
  1313.         this keyword is optional and defaults to 0.
  1314.  
  1315.   Some example configurations for the more popular cards are as follows:
  1316.  
  1317.      BayCom USCC
  1318.  
  1319.           chip    1
  1320.           data_a  0x300
  1321.           ctrl_a  0x304
  1322.           data_b  0x301
  1323.           ctrl_b  0x305
  1324.           irq     5
  1325.           board   BAYCOM
  1326.           #
  1327.           # SCC chip 2
  1328.           #
  1329.           chip    2
  1330.           data_a  0x302
  1331.           ctrl_a  0x306
  1332.           data_b  0x303
  1333.           ctrl_b  0x307
  1334.           board   BAYCOM
  1335.  
  1336.      PA0HZP SCC card
  1337.  
  1338.      chip 1
  1339.      data_a 0x153
  1340.      data_b 0x151
  1341.      ctrl_a 0x152
  1342.      ctrl_b 0x150
  1343.      irq 9
  1344.      pclock 4915200
  1345.      board PA0HZP
  1346.      vector 0x168
  1347.      escc no
  1348.      #
  1349.      #
  1350.      #
  1351.      chip 2
  1352.      data_a 0x157
  1353.      data_b 0x155
  1354.      ctrl_a 0x156
  1355.      ctrl_b 0x154
  1356.      irq 9
  1357.      pclock 4915200
  1358.      board PA0HZP
  1359.      vector 0x168
  1360.      escc no
  1361.  
  1362.      DRSI SCC card
  1363.  
  1364.           chip 1
  1365.           data_a 0x303
  1366.           data_b 0x301
  1367.           ctrl_a 0x302
  1368.           ctrl_b 0x300
  1369.           irq 7
  1370.           pclock 4915200
  1371.           board DRSI
  1372.           escc no
  1373.  
  1374.   If you already have a working configuration for your card under NOS,
  1375.   then you can use the gencfg command to convert the PE1CHL NOS driver
  1376.   commands into a form suitable for use in the z8530 driver
  1377.   configuration file.
  1378.  
  1379.   To use gencfg you simply invoke it with the same parameters as you
  1380.   used for the PE1CHL driver in NET/NOS. For example:
  1381.  
  1382.        # gencfg 2 0x150 4 2 0 1 0x168 9 4915200
  1383.  
  1384.   will generate a skeleton configuration for the OptoSCC card.
  1385.  
  1386.   7.1.7.3.  Channel Configuration
  1387.  
  1388.   The Channel Configuration section is where you specify all of the
  1389.   other parameters associated with the port you are configuring. Again
  1390.   this section is broken into stanzas. One stanza represents one logical
  1391.   port, and therefore there would be two of these for each one of the
  1392.   hardware parameters stanzas as each 8530 SCC supports two ports.
  1393.  
  1394.   These keywords and arguments are also written to the
  1395.   /etc/z8530drv.conf file and must appear after the hardware parameters
  1396.   section.
  1397.  
  1398.   Sequence is very important in this section, but if you stick with the
  1399.   suggested sequence it should work ok. The keywords and arguments are:
  1400.  
  1401.      device
  1402.         this keyword must be the first line of a port definition and
  1403.         specifies the name of the special device file that the rest of
  1404.         the configuration applies to. e.g. /dev/scc0
  1405.  
  1406.      speed
  1407.         this keyword specifies the speed in bits per second of the
  1408.         interface. The argument is an integer: e.g. 1200
  1409.  
  1410.      clock
  1411.         this keyword specifies where the clock for the data will be
  1412.         sourced. Allowable values are:
  1413.  
  1414.         dpll
  1415.            normal halfduplex operation
  1416.  
  1417.         external
  1418.            MODEM supplies its own Rx/Tx clock
  1419.  
  1420.         divider
  1421.            use fullduplex divider if installed.
  1422.  
  1423.      mode
  1424.         this keyword specifies the data coding to be used. Allowable
  1425.         arguments are: nrzi or nrz
  1426.  
  1427.      rxbuffers
  1428.         this keyword specifies the number of receive buffers to allocate
  1429.         memory for. The argument is an integer, e.g. 8.
  1430.  
  1431.      txbuffers
  1432.         this keyword specifies the number of transmit buffers to
  1433.         allocate memory for. The argument is an integer, e.g. 8.
  1434.  
  1435.      bufsize
  1436.         this keyword specifies the size of the receive and transmit
  1437.         buffers. The arguments is in bytes and represents the total
  1438.         length of the frame, so it must also take into account the AX.25
  1439.         headers and not just the length of the data field. This keyword
  1440.         is optional and default to 384
  1441.  
  1442.      txdelay
  1443.         the KISS transmit delay value, the argument is an integer in mS.
  1444.  
  1445.      persist
  1446.         the KISS persist value, the argument is an integer.
  1447.  
  1448.      slot
  1449.         the KISS slot time value, the argument is an integer in mS.
  1450.  
  1451.      tail
  1452.         the KISS transmit tail value, the argument is an integer in mS.
  1453.  
  1454.      fulldup
  1455.         the KISS full duplex flag, the argument is an integer.  1==Full
  1456.         Duplex, 0==Half Duplex.
  1457.  
  1458.      wait
  1459.         the KISS wait value, the argument is an integer in mS.
  1460.  
  1461.      min
  1462.         the KISS min value, the argument is an integer in S.
  1463.  
  1464.      maxkey
  1465.         the KISS maximum keyup time, the argument is an integer in S.
  1466.  
  1467.      idle
  1468.         the KISS idle timer value, the argument is an integer in S.
  1469.  
  1470.      maxdef
  1471.         the KISS maxdef value, the argument is an integer.
  1472.  
  1473.      group
  1474.         the KISS group value, the argument is an integer.
  1475.  
  1476.      txoff
  1477.         the KISS txoff value, the argument is an integer in mS.
  1478.  
  1479.      softdcd
  1480.         the KISS softdcd value, the argument is an integer.
  1481.  
  1482.      slip
  1483.         the KISS slip flag, the argument is an integer.
  1484.  
  1485.   7.1.7.4.  Using the driver.
  1486.  
  1487.   To use the driver you simply treat the /dev/scc* devices just as you
  1488.   would a serial tty device with a KISS TNC connected to it. For
  1489.   example, to configure Linux Kernel networking to use your SCC card you
  1490.   could use something like:
  1491.  
  1492.        # kissattach -s 4800 /dev/scc0 VK2KTJ
  1493.  
  1494.   You can also use NOS to attach to it in precisely the same way. From
  1495.   JNOS for example you would use something like:
  1496.  
  1497.        attach asy scc0 0 ax25 scc0 256 256 4800
  1498.  
  1499.   7.1.7.5.  The sccstat and sccparam tools.
  1500.  
  1501.   To assist in the diagnosis of problems you can use the sccstat program
  1502.   to display the current configuration of an SCC device. To use it try:
  1503.  
  1504.        # sccstat /dev/scc0
  1505.  
  1506.   you will displayed a very large amount of information relating to the
  1507.   configuration and health of the /dev/scc0 SCC port.
  1508.   The sccparam command allows you to change or modify a configuration
  1509.   after you have booted. Its syntax is very similar to the NOS param
  1510.   command, so to set the txtail setting of a device to 100mS you would
  1511.   use:
  1512.  
  1513.        # sccparam /dev/scc0 txtail 0x8
  1514.  
  1515.   7.1.8.  Creating a BPQ ethernet device.
  1516.  
  1517.   Kernel Compile Options:
  1518.  
  1519.        General setup  --->
  1520.            [*] Networking support
  1521.        Network device support  --->
  1522.            [*] Network device support
  1523.            ...
  1524.            [*] Radio network interfaces
  1525.            [*] BPQ Ethernet driver for AX.25
  1526.  
  1527.   Linux supports BPQ Ethernet compatibility. This enables you to run the
  1528.   AX.25 protocol over your Ethernet LAN and to interwork your linux
  1529.   machine with other BPQ machines on the LAN.
  1530.  
  1531.   The BPQ network devices are named `bpq[0-9]'. The `bpq0' device is
  1532.   associated with the `eth0' device, the `bpq1' device with the `eth1'
  1533.   device etc.
  1534.  
  1535.   Configuration is quite straightforward. You firstly must have
  1536.   configured a standard Ethernet device. This means you will have
  1537.   compiled your kernel to support your Ethernet card and tested that
  1538.   this works. Refer to the Ethernet-HOWTO <Ethernet-HOWTO.html> for more
  1539.   information on how to do this.
  1540.  
  1541.   To configure the BPQ support you need to configure the Ethernet device
  1542.   with an AX.25 callsign. The following command will do this for you:
  1543.  
  1544.        # /sbin/ifconfig bpq0 hw ax25 vk2ktj-14 up
  1545.  
  1546.   Again, remember that the callsign you specify should match the entry
  1547.   in the /etc/ax25/axports file that you wish to use for this port.
  1548.  
  1549.   7.1.9.  Configuring the BPQ Node to talk to the Linux AX.25 support.
  1550.  
  1551.   BPQ Ethernet normally uses a multicast address. The Linux
  1552.   implementation does not, and instead it uses the normal Ethernet
  1553.   broadcast address. The NET.CFG file for the BPQ ODI driver should
  1554.   therefore be modifified to look similar to this:
  1555.  
  1556.        LINK SUPPORT
  1557.  
  1558.                MAX STACKS 1
  1559.                MAX BOARDS 1
  1560.  
  1561.        LINK DRIVER E2000                    ; or other MLID to suit your card
  1562.  
  1563.                INT 10                       ;
  1564.                PORT 300                     ; to suit your card
  1565.  
  1566.                FRAME ETHERNET_II
  1567.  
  1568.                PROTOCOL BPQ 8FF ETHERNET_II ; required for BPQ - can change PID
  1569.  
  1570.        BPQPARAMS                            ; optional - only needed if you want
  1571.                                             ; to override the default target addr
  1572.  
  1573.                ETH_ADDR  FF:FF:FF:FF:FF:FF  ; Target address
  1574.  
  1575.   7.2.  Creating the /etc/ax25/axports file.
  1576.  
  1577.   The /etc/ax25/axports is a simple text file that you create with a
  1578.   text editor. The format of the /etc/ax25/axports file is as follows:
  1579.  
  1580.        portname  callsign  baudrate  paclen  window  description
  1581.  
  1582.   where:
  1583.  
  1584.      portname
  1585.         is a text name that you will refer to the port by.
  1586.  
  1587.      callsign
  1588.         is the AX.25 callsign you want to assign to the port.
  1589.  
  1590.      baudrate
  1591.         is the speed at which you wish the port to communicate with your
  1592.         TNC.
  1593.  
  1594.      paclen
  1595.         is the maximum packet length you want to configure the port to
  1596.         use for AX.25 connected mode connections.
  1597.  
  1598.      window
  1599.         is the AX.25 window (K) parameter. This is the same as the
  1600.         MAXFRAME setting of many tnc's.
  1601.  
  1602.      description
  1603.         is a textual description of the port.
  1604.  
  1605.   In my case, mine looks like:
  1606.  
  1607.        radio    VK2KTJ-15       4800        256     2       4800bps 144.800 MHz
  1608.        ether    VK2KTJ-14       10000000    256     2       BPQ/ethernet device
  1609.  
  1610.   Remember, you must assign unique callsign/ssid to each AX.25 port you
  1611.   create.  Create one entry for each AX.25 device you want to use, this
  1612.   includes KISS, Baycom, SCC, PI, PT and SoundModem ports. Each entry
  1613.   here will describe exactly one AX.25 network device. The entries in
  1614.   this file are associated with the network devices by the
  1615.   callsign/ssid. This is at least one good reason for requiring unique
  1616.   callsign/ssid.
  1617.  
  1618.   7.3.  Configuring AX.25 routing.
  1619.  
  1620.   You may wish to configure default digipeaters paths for specific
  1621.   hosts.  This is useful for both normal AX.25 connections and also IP
  1622.   based connections.  The axparms command enables you to do this. Again,
  1623.   the man page offers a complete description, but a simple example might
  1624.   be:
  1625.  
  1626.        # /usr/sbin/axparms -route add radio VK2XLZ VK2SUT
  1627.  
  1628.   This command would set a digipeater entry for VK2XLZ via VK2SUT on the
  1629.   AX.25 port named radio.
  1630.  
  1631.   8.  Configuring an AX.25 interface for TCP/IP.
  1632.  
  1633.   It is very simple to configure an AX.25 port to carry TCP/IP.  If you
  1634.   have KISS interfaces then there are two methods for configuring an IP
  1635.   address. The kissattach command has an option that allows you to do
  1636.   specify an IP address. The more conventional method using the ifconfig
  1637.   command will work on all interface types.
  1638.  
  1639.   So, modifying the previous KISS example:
  1640.  
  1641.        # /usr/sbin/kissattach -i 44.136.8.5 -m 512 /dev/ttyS0 radio
  1642.        # /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 ax0
  1643.        # /sbin/route add default ax0
  1644.  
  1645.   to create the AX.25 interface with an IP address of 44.136.8.5 and an
  1646.   MTU of 512 bytes. You should still use the ifconfig to configure the
  1647.   other parameters if necessary.
  1648.  
  1649.   If you have any other interface type then you use the ifconfig program
  1650.   to configure the ip address and netmask details for the port and add a
  1651.   route via the port, just as you would for any other TCP/IP interface.
  1652.   The following example is for a PI card device, but would work equally
  1653.   well for any other AX.25 network device:
  1654.  
  1655.        # /sbin/ifconfig pi0a 44.136.8.5 netmask 255.255.255.0 up
  1656.        # /sbin/ifconfig pi0a broadcast 44.136.8.255 mtu 512
  1657.        # /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 pi0a
  1658.        # /sbin/route add default pi0a
  1659.  
  1660.   The commands listed above are typical of the sort of configuration
  1661.   many of you would be familiar with if you have used NOS or any of its
  1662.   derivatives or any other TCP/IP software. Note that the default route
  1663.   might not be required in your configuration if you have some other
  1664.   network device configured.
  1665.  
  1666.   To test it out, try a ping or a telnet to a local host.
  1667.  
  1668.        # ping -i 5 44.136.8.58
  1669.  
  1670.   Note the use of the `-i 5' arguments to ping to tell it to send pings
  1671.   every 5 seconds instead of its default of 1 second.
  1672.  
  1673.   9.  Configuring a NetRom port.
  1674.  
  1675.   The NetRom protocol relies on, and uses the AX.25 ports you have
  1676.   created.  The NetRom protocol rides on top of the AX.25 protocol. To
  1677.   configure NetRom on an AX.25 interface you must configure two files.
  1678.   One file describes the Netrom interfaces, and the other file describes
  1679.   which of the AX.25 ports will carry NetRom. You can configure multiple
  1680.   NetRom ports, each with its own callsign and alias, the same procedure
  1681.   applies for each.
  1682.  
  1683.   9.1.  Configuring /etc/ax25/nrports
  1684.  
  1685.   The first is the /etc/ax25/nrports file. This file describes the
  1686.   NetRom ports in much the same way as the /etc/ax25/axports file
  1687.   describes the AX.25 ports. Each NetRom device you wish to create must
  1688.   have an entry in the /etc/ax25/nrports file. Normally a Linux machine
  1689.   would have only one NetRom device configured that would use a number
  1690.   of the AX.25 ports defined. In some situations you might wish a
  1691.   special service such as a BBS to have a seperate NetRom alias and so
  1692.   you would create more than one.
  1693.  
  1694.   This file is formatted as follows:
  1695.  
  1696.        name callsign  alias  paclen   description
  1697.  
  1698.   Where:
  1699.  
  1700.      name
  1701.         is the text name that you wish to refer to the port by.
  1702.  
  1703.      callsign
  1704.         is the callsign that the NetRom traffic from this port will use.
  1705.         Note, this is not that address that users should connect to to
  1706.         get access to a node style interface. (The node program is
  1707.         covered later). This callsign/ssid should be unique and should
  1708.         not appear elsewhere in either of the /etc/ax25/axports or the
  1709.         /etc/ax25/nrports files.
  1710.  
  1711.      alias
  1712.         is the NetRom alias this port will have assigned to it.
  1713.  
  1714.      paclen
  1715.         is the maximum size of NetRom frames transmitted by this port.
  1716.  
  1717.      description
  1718.         is a free text description of the port.
  1719.  
  1720.   An example would look something like the following:
  1721.  
  1722.        netrom  VK2KTJ-9        LINUX   236     Linux Switch Port
  1723.  
  1724.   This example creates a NetRom port known to the rest of the NetRom
  1725.   network as `LINUX:VK2KTJ-9'.
  1726.  
  1727.   This file is used by programs such as the call program.
  1728.  
  1729.   9.2.  Configuring /etc/ax25/nrbroadcast
  1730.  
  1731.   The second file is the /etc/ax25/nrbroadcast file. This file may
  1732.   contain a number of entries. There would normally be one entry for
  1733.   each AX.25 port that you wish to allow NetRom traffic on.
  1734.  
  1735.   This file is formatted as follows:
  1736.  
  1737.        axport min_obs def_qual worst_qual verbose
  1738.  
  1739.   Where:
  1740.  
  1741.      axport
  1742.         is the port name obtained from the /etc/ax25/axports file. If
  1743.         you do not have an entry in /etc/ax25/nrbroadcasts for a port
  1744.         then this means that no NetRom routing will occur and any
  1745.         received NetRom broadcasts will be ignored for that port.
  1746.  
  1747.      min_obs
  1748.         is the minimum obselesence value for the port.
  1749.  
  1750.      def_qual
  1751.         is the default quality for the port.
  1752.  
  1753.      worst_qual
  1754.         is the worst quality value for the port, any routes under this
  1755.         quality will be ignored.
  1756.  
  1757.      verbose
  1758.         is a flag determining whether full NetRom routing broadcasts
  1759.         will occur from this port or only a routing broadcast
  1760.         advertising the node itself.
  1761.  
  1762.   An example would look something like the following:
  1763.  
  1764.        radio    1       200      100         1
  1765.  
  1766.   9.3.  Creating the NetRom Network device
  1767.  
  1768.   When you have the two configuration files completed you must create
  1769.   the NetRom device in much the same way as you did for the AX.25
  1770.   devices.  This time you use the nrattach command. The nrattach works
  1771.   in just the same way as the axattach command except that it creates
  1772.   NetRom network devices called `nr[0-9]'. Again, the first time you use
  1773.   the nrattach command it creates the `nr0' device, the second time it
  1774.   creates the `nr1' network devices etc. To create the network device
  1775.   for the NetRom port we've defined we would use:
  1776.  
  1777.        # nrattach netrom
  1778.  
  1779.   This command would start the NetRom device (nr0) named netrom
  1780.   configured with the details specified in the /etc/ax25/nrports file.
  1781.  
  1782.   9.4.  Starting the NetRom daemon
  1783.  
  1784.   The Linux kernel does all of the NetRom protocol and switching, but
  1785.   does not manage some functions. The NetRom daemon manages the NetRom
  1786.   routing tables and generates the NetRom routing broadcasts. You start
  1787.   NetRom daemon with the command:
  1788.  
  1789.        # /usr/sbin/netromd -i
  1790.  
  1791.   You should soon see the /proc/net/nr_neigh file filling up with
  1792.   information about your NetRom neighbours.
  1793.  
  1794.   Remember to put the /usr/sbin/netromd command in your rc files so that
  1795.   it is started automatically each time you reboot.
  1796.  
  1797.   9.5.  Configuring NetRom routing.
  1798.  
  1799.   You may wish to configure static NetRom routes for specific hosts.
  1800.   The nrparms command enables you to do this. Again, the man page offers
  1801.   a complete description, but a simple example might be:
  1802.  
  1803.        # /usr/sbin/nrparms -nodes VK2XLZ-10 + #MINTO 120 5 radio VK2SUT-9
  1804.  
  1805.   This command would set a NetRom route to #MINTO:VK2XLZ-10 via a
  1806.   neighbour VK2SUT-9 on my AX.25 port called `radio'.
  1807.  
  1808.   You can manually create entries for new neighbours using the nrparms
  1809.   command as well. For example:
  1810.  
  1811.   # /usr/sbin/nrparms -routes radio VK2SUT-9 + 120
  1812.  
  1813.   This command would create VK2SUT-9 as a NetRom neighbour with a
  1814.   quality of 120 and this will be locked and will not be deleted
  1815.   automatically.
  1816.  
  1817.   10.  Configuring a NetRom interface for TCP/IP.
  1818.  
  1819.   Configuring a NetRom interface for TCP/IP is almost identical to
  1820.   configuring an AX.25 interface for TCP/IP.
  1821.  
  1822.   Again you can either specify the ip address and mtu on the nrattach
  1823.   command line, or use the ifconfig and route commands, but you need to
  1824.   manually add arp entries for hosts you wish to route to because there
  1825.   is no mechanism available for your machine to learn what NetRom
  1826.   address it should use to reach a particular IP host.
  1827.  
  1828.   So, to create an nr0 device with an IP address of 44.136.8.5, an mtu
  1829.   of 512 and configured with the details from the /etc/ax25/nrports file
  1830.   for a NetRom port named netrom you would use:
  1831.  
  1832.        # /usr/sbin/nrattach -i 44.136.8.5 -m 512 netrom
  1833.        # route add 44.136.8.5 nr0
  1834.  
  1835.   or you could use something like the following commands manually:
  1836.  
  1837.        # /usr/sbin/nrattach netrom
  1838.        # ifconfig nr0 44.136.8.5 netmask 255.255.255.0 hw netrom VK2KTJ-9
  1839.        # route add 44.136.8.5 nr0
  1840.  
  1841.   Then for each IP host you wish to reach via NetRom you need to set
  1842.   route and arp entries. To reach a destination host with an IP address
  1843.   of 44.136.80.4 at NetRom address BBS:VK3BBS via a NetRom neighbour
  1844.   with callsign VK2SUT-0 you would use commands as follows:
  1845.  
  1846.        # route add 44.136.80.4 nr0
  1847.        # arp -t netrom -s 44.136.80.4 vk2sut-0
  1848.        # nrparms -nodes vk3bbs + BBS 120 6 sl0 vk2sut-0
  1849.  
  1850.   The `120' and `6' arguments to the nrparms command are the NetRom
  1851.   quality and obsolescence count values for the route.
  1852.  
  1853.   11.  Configuring a Rose port.
  1854.  
  1855.   The Rose packet layer protocol is similar to layer three of the X.25
  1856.   specification. The kernel based Rose support is a modified version of
  1857.   the FPAC Rose implementation
  1858.   <http://fpac.lmi.ecp.fr/f1oat/f1oat.html>.
  1859.  
  1860.   The Rose packet layer protocol protocol relies on, and uses the AX.25
  1861.   ports you have created. The Rose protocol rides on top of the AX.25
  1862.   protocol.  To configure Rose you must create a configuration file that
  1863.   describes the Rose ports you want. You can create multiple Rose ports
  1864.   if you wish, the same procedure applies for each.
  1865.  
  1866.   11.1.  Configuring /etc/ax25/rsports
  1867.  
  1868.   The file where you configure your Rose interfaces is the
  1869.   /etc/ax25/rsports file. This file describes the Rose port in much the
  1870.   same way as the /etc/ax25/axports file describes the AX.25 ports.
  1871.  
  1872.   This file is formatted as follows:
  1873.  
  1874.        name  addresss  description
  1875.  
  1876.   Where:
  1877.  
  1878.      name
  1879.         is the text name that you wish to refer to the port by.
  1880.  
  1881.      address
  1882.         is the 10 digit Rose address you wish to assign to this port.
  1883.  
  1884.      description
  1885.         is a free text description of the port.
  1886.  
  1887.   An example would look something like the following:
  1888.  
  1889.        rose  5050294760  Rose Port
  1890.  
  1891.   Note that Rose will use the default callsign/ssid configured on each
  1892.   AX.25 port unless you specify otherwise.
  1893.  
  1894.   To configure a seperate callsign/ssid for Rose to use on each port you
  1895.   use the rsparms command as follows:
  1896.  
  1897.        # /usr/sbin/rsprams -call VK2KTJ-10
  1898.  
  1899.   This example would make Linux listen for and use the callsign/ssid
  1900.   VK2KTJ-10 on all of the configured AX.25 ports for Rose calls.
  1901.  
  1902.   11.2.  Creating the Rose Network device.
  1903.  
  1904.   When you have created the /etc/ax25/rsports file you may create the
  1905.   Rose device in much the same way as you did for the AX.25 devices.
  1906.   This time you use the rsattach command. The rsattach command creates
  1907.   network devices named `rose[0-5]'. The first time you use the rsattach
  1908.   command it create the `rose0' device, the second time it creates the
  1909.   `rose1' device etc. For example:
  1910.  
  1911.        # rsattach rose
  1912.  
  1913.   This command would start the Rose device (rose0) configured with the
  1914.   details specified in the /etc/ax25/rsports file for the entry named
  1915.   `rose'.
  1916.  
  1917.   11.3.  Configuring Rose Routing
  1918.  
  1919.   The Rose protocol currently supports only static routing. The rsparms
  1920.   utility allows you to configure your Rose routing table under Linux.
  1921.  
  1922.   For example:
  1923.  
  1924.        # rsparms -nodes add 5050295502 radio vk2xlz
  1925.  
  1926.   would add a route to Rose node 5050295502 via an AX.25 port named
  1927.   `radio' in your /etc/ax25/axports file to a neighbour with the call¡
  1928.   sign VK2XLZ.
  1929.  
  1930.   You may specify a route with a mask to capture a number of Rose
  1931.   destinations into a single routing entry. The syntax looks like:
  1932.  
  1933.        # rsparms -nodes add 5050295502/4 radio vk2xlz
  1934.  
  1935.   which would be identical to the previous example except that it would
  1936.   match any destination address that matched the first four digits sup¡
  1937.   plied, in this case any address commencing with the digits 5050. An
  1938.   alternate form for this command is:
  1939.  
  1940.        # rsparms -nodes add 5050/4 radio vk2xlz
  1941.  
  1942.   which is probably the less ambiguous form.
  1943.  
  1944.   12.  Making AX.25/NetRom/Rose calls.
  1945.  
  1946.   Now that you have all of your AX.25, NetRom and Rose interfaces
  1947.   configured and active, you should be able to make test calls.
  1948.  
  1949.   The AX25 Utilities package includes a program called `call' which is a
  1950.   splitscreen terminal program for AX.25, NetRom and Rose.
  1951.  
  1952.   A simple AX.25 call would look like:
  1953.  
  1954.        /usr/bin/call radio VK2DAY via VK2SUT
  1955.  
  1956.   A simple NetRom call to a node with an alias of SUNBBS would look
  1957.   like:
  1958.  
  1959.        /usr/bin/call netrom SUNBBS
  1960.  
  1961.   A simple Rose call to HEARD at node 5050882960 would look like:
  1962.  
  1963.        /usr/bin/call rose HEARD 5050882960
  1964.  
  1965.   Note: you must tell call which port you wish to make the call on, as
  1966.   the same destination node might be reachable on any of the ports you
  1967.   have configured.
  1968.  
  1969.   The call program is a linemode terminal program for making AX.25
  1970.   calls. It recognises lines that start with `~' as command lines.  The
  1971.   `~.' command will close the connection.
  1972.  
  1973.   Please refer to the man page in /usr/man for more information.
  1974.  
  1975.   13.  Configuring Linux to accept Packet connections.
  1976.  
  1977.   Linux is a powerful operating system and offers a great deal of
  1978.   flexibility in how it is configured. With this flexibility comes a
  1979.   cost in configuring it to do what you want. When configuring your
  1980.   Linux machine to accept incoming AX.25, NetRom or Rose connections
  1981.   there are a number of questions you need to ask yourself. The most
  1982.   important of which is: "What do I want users to see when they
  1983.   connect?". People are developing neat little applications that may be
  1984.   used to provide services to callers, a simple example is the pms
  1985.   program included in the AX25 utilities, a more complex example is the
  1986.   node program also included in the AX25 utilities. Alternatively you
  1987.   might want to give users a login prompt so that they can make use of a
  1988.   shell account, or you might even have written your own program, such
  1989.   as a customised database or a game, that you want people to connect
  1990.   to. Whatever you choose, you must tell the AX.25 software about this
  1991.   so that it knows what software to run when it accepts an incoming
  1992.   AX.25 connection.
  1993.  
  1994.   The ax25d program is similar to the inetd program commonly used to
  1995.   accept incoming TCP/IP connections on unix machines. It sits and
  1996.   listens for incoming connections, when it detects one it goes away and
  1997.   checks a configuration file to determine what program to run and
  1998.   connect to that connection. Since this the standard tool for accepting
  1999.   incoming AX.25, NetRom and Rose connections I'll describe how to
  2000.   configure it.
  2001.  
  2002.   13.1.  Creating the /etc/ax25/ax25d.conf file.
  2003.  
  2004.   This file is the configuration file for the ax25d AX.25 daemon which
  2005.   handles incoming AX.25, NetRom and Rose connections.
  2006.  
  2007.   The file is a little cryptic looking at first, but you'll soon
  2008.   discover it is very simple in practice, with a small trap for you to
  2009.   be wary of.
  2010.  
  2011.   The general format of the ax25d.conf file is as follows:
  2012.  
  2013.        # This is a comment and is ignored by the ax25d program.
  2014.        [port_name] || <port_name> || {port_name}
  2015.        <peer1>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name> <arguments>
  2016.        <peer2>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name> <arguments>
  2017.        parameters window T1 T2 T3 idle N2 <mode>
  2018.        <peer3>    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name> <arguments>
  2019.        default    window T1 T2 T3 idle N2 <mode> <uid> <cmd> <cmd-name> <arguments>
  2020.  
  2021.   Where:
  2022.  
  2023.      #  at the start of a line marks a comment and is completely ignored
  2024.         by the ax25d program.
  2025.  
  2026.      <port_name>
  2027.         is the name of the AX.25, NetRom or Rose port as specified in
  2028.         the /etc/ax25/axports, /etc/ax25/nrports and /etc/ax25/rsports
  2029.         files. The name of the port is surrounded by the `[]' brackets
  2030.         if it is an AX.25 port, the `<>' brackets if it is a NetRom
  2031.         port, or the `{}' brackets if it is a Rose port.  There is an
  2032.         alternate form for this field, and that is use prefix the port
  2033.         name with `callsign/ssid via' to indicate that you wish accept
  2034.         calls to the callsign/ssid via this interface. The example
  2035.         should more clearly illustrate this.
  2036.  
  2037.      <peer>
  2038.         is the callsign of the peer node that this particular
  2039.         configuration applies to. If you don't specify an SSID here then
  2040.         any SSID will match.
  2041.  
  2042.      window
  2043.         is the AX.25 Window parameter (K) or MAXFRAME parameter for this
  2044.         configuration.
  2045.  
  2046.      T1 is the Frame retransmission (T1) timer in half second units.
  2047.  
  2048.      T2 is the amount of time the AX.25 software will wait for another
  2049.         incoming frame before preparing a response in 1 second units.
  2050.  
  2051.      T3 is the amount of time of inactivity before the AX.25 software
  2052.         will disconnect the session in 1 second units.
  2053.  
  2054.      idle
  2055.         is the idle timer value in seconds.
  2056.  
  2057.      N2 is the number of consecutive retransmissions that will occur
  2058.         before the connection is closed.
  2059.  
  2060.      <mode>
  2061.         provides a mechanism for determining certain types of general
  2062.         permissions. The modes are enabled or disabled by supplying a
  2063.         combination of characters, each representing a permission. The
  2064.         characters may be in either upper or lower case and must be in a
  2065.         single block with no spaces.
  2066.  
  2067.         u/U
  2068.            UTMP                   - currently unsupported.
  2069.  
  2070.         v/V
  2071.            Validate call          - currently unsupported.
  2072.  
  2073.         q/Q
  2074.            Quiet                  - Don't log connection
  2075.  
  2076.         n/N
  2077.            check NetRom Neighbour - currently unsupported.
  2078.  
  2079.         d/D
  2080.            Disallow Digipeaters   - Connections must be direct, not
  2081.            digipeated.
  2082.  
  2083.         l/L
  2084.            Lockout                - Don't allow connection.
  2085.  
  2086.         */0
  2087.            marker                 - place marker, no mode set.
  2088.  
  2089.      <uid>
  2090.         is the userid that the program to be run to support the
  2091.         connection should be run as.
  2092.  
  2093.      <cmd>
  2094.         is the full pathname of the command to be run, with no arguments
  2095.         specified.
  2096.  
  2097.      <cmd-name>
  2098.         is the text that should appear in a ps as the command name
  2099.         running (normally the same as <cmd> except without the directory
  2100.         path information.
  2101.  
  2102.      <arguments>
  2103.         are the command line argument to be passed to the <:cmd> when it
  2104.         is run. You pass useful information into these arguments by use
  2105.         of the following tokens:
  2106.  
  2107.         %d Name of the port the connection was received on.
  2108.  
  2109.         %U AX.25 callsign of the connected party without the SSID, in
  2110.            uppercase.
  2111.  
  2112.         %u AX.25 callsign of the connected party without the SSID, in
  2113.            lowercase.
  2114.  
  2115.         %S AX.25 callsign of the connected party with the SSID, in
  2116.            uppercase.
  2117.  
  2118.         %s AX.25 callsign of the connected party with the SSID, in
  2119.            lowercase.
  2120.  
  2121.         %P AX.25 callsign of the remote node that the connection came in
  2122.            from without the SSID, in uppercase.
  2123.  
  2124.         %p AX.25 callsign of the remote node that the connection came in
  2125.            from without the SSID, in lowercase.
  2126.  
  2127.         %R AX.25 callsign of the remote node that the connection came in
  2128.            from with the SSID, in uppercase.
  2129.         %r AX.25 callsign of the remote node that the connection came in
  2130.            from with the SSID, in lowercase.
  2131.  
  2132.   You need one section in the above format for each AX.25, NetRom or
  2133.   Rose interface you want to accept incoming AX.25, NetRom or Rose
  2134.   connections on.
  2135.  
  2136.   There are two special lines in the paragraph, one starts with the
  2137.   string `parameters' and the other starts with the string `default'
  2138.   (yes there is a difference). These lines serve special functions.
  2139.  
  2140.   The `default' lines purpose should be obvious, this line acts as a
  2141.   catch-all, so that any incoming connection on the <interface_call>
  2142.   interface that doesn't have a specific rule will match the `default'
  2143.   rule. If you don't have a `default' rule, then any connections not
  2144.   matching any specific rule will be disconnected immediately without
  2145.   notice.
  2146.  
  2147.   The `parameters' line is a little more subtle, and here is the trap I
  2148.   mentioned earlier. In any of the fields for any definition for a peer
  2149.   you can use the `*' character to say `use the default value'. The
  2150.   `parameters' line is what sets those default values. The kernel
  2151.   software itself has some defaults which will be used if you don't
  2152.   specify any using the `parameters' entry. The trap is that the these
  2153.   defaults apply only to those rules below the `parameters' line not to
  2154.   those above. You may have more than one `parameters' rule per
  2155.   interface definition, and in this way you may create groups of default
  2156.   configurations.
  2157.  
  2158.   13.2.  A simple example ax25d.conf file.
  2159.  
  2160.   Ok, an illustrative example:
  2161.  
  2162.        # ax25d.conf for VK2KTJ - 02/03/97
  2163.        # This configuration uses the AX.25 port defined earlier.
  2164.  
  2165.        # <peer> Win T1  T2  T3  idl N2 <mode> <uid> <exec> <argv[0]>[<args....>]
  2166.  
  2167.        [VK2KTJ-0 via radio]
  2168.        parameters 1    10  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
  2169.        VK2XLZ     *     *  *  *  *   *   *
  2170.        VK2DAY     *     *  *  *  *   *   *
  2171.        NOCALL     *     *  *  *  *   *   L
  2172.        default    1    10  5 100 180 5   *    root  /usr/sbin/pms pms -a -o vk2ktj
  2173.  
  2174.        [VK2KTJ-1 via radio]
  2175.        default    *     *    *   *   *   0    root /usr/sbin/node node
  2176.  
  2177.        <netrom>
  2178.        parameters 1    10  *  *  *   *   *
  2179.        NOCALL     *     *  *  *  *   *   L
  2180.        default    *     *  *  *  *   *   0        root /usr/sbin/node node
  2181.  
  2182.        {VK2KTJ-0 via rose}
  2183.        parameters 1    10  *  *  *   *   *    root  /usr/sbin/axspawn axspawn %u +
  2184.        VK2XLZ     *     *  *  *  *   *   *
  2185.        VK2DAY     *     *  *  *  *   *   *
  2186.        NOCALL     *     *  *  *  *   *   L
  2187.        default    1    10  5 100 180 5   *    root  /usr/sbin/pms pms -a -o vk2ktj
  2188.  
  2189.        {VK2KTJ-1 via rose}
  2190.        default    *     *    *   *   *   0    root /usr/sbin/node node radio
  2191.  
  2192.   This example says that anybody attempting to connect to the callsign
  2193.   `VK2KTJ-0' heard on the AX.25 port called `radio' will have the
  2194.   following rules applied:
  2195.  
  2196.   Anyone whose callsign is set to `NOCALL' should be locked out, note
  2197.   the use of mode `L'.
  2198.  
  2199.   The parameters line changes two parameters from the kernel defaults
  2200.   (Window and T1) and will run the /usr/sbin/axspawn program for them.
  2201.   Any copies of /usr/sbin/axspawn run this way will appear as axspawn in
  2202.   a ps listing for convenience. The next two lines provide definitions
  2203.   for two stations who will receive those permissions.
  2204.  
  2205.   The last line in the paragraph is the `catch all' definition that
  2206.   everybody else will get (including VK2XLZ and VK2DAY using any other
  2207.   SSID other than -1).  This definition sets all of the parameters
  2208.   implicitly and will cause the pms program to be run with a command
  2209.   line argument indicating that it is being run for an AX.25 connection,
  2210.   and that the owner callsign is VK2KTJ. (See the `Configuring the PMS'
  2211.   section below for more details).
  2212.  
  2213.   The next configuration accepts calls to VK2KTJ-1 via the radio port.
  2214.   It runs the node program for everybody that connects to it.
  2215.  
  2216.   The next configuration is a NetRom configuration, note the use of the
  2217.   greater-then and less-than braces instead of the square brackets.
  2218.   These denote a NetRom configuration. This configuration is simpler, it
  2219.   simply says that anyone connecting to our NetRom port called `netrom'
  2220.   will have the node program run for them, unless they have a callsign
  2221.   of `NOCALL' in which case they will be locked out.
  2222.  
  2223.   The last two configurations are for incoming Rose connections. The
  2224.   first for people who have placed calls to `vk2ktj-0' and the second
  2225.   for `VK2KTJ-1 at the our Rose node address. These work precisely the
  2226.   same way. Not the use of the curly braces to distinguish the port as a
  2227.   Rose port.
  2228.  
  2229.   This example is a contrived one but I think it illustrates clearly the
  2230.   important features of the syntax of the configuration file. The
  2231.   configuration file is explained fully in the ax25d.conf man page. A
  2232.   more detailed example is included in the ax25-utils package that might
  2233.   be useful to you too.
  2234.  
  2235.   13.3.  Starting ax25d
  2236.  
  2237.   When you have the two configuration files completed you start ax25d
  2238.   with the command:
  2239.  
  2240.        # /usr/sbin/ax25d
  2241.  
  2242.   When this is run people should be able to make AX.25 connections to
  2243.   your Linux machine. Remember to put the ax25d command in your rc files
  2244.   so that it is started automatically when you reboot each time.
  2245.  
  2246.   14.  Configuring the node software.
  2247.  
  2248.   The node software was developed by Tomi Manninen
  2249.   <tomi.manninen@hut.fi> and was based on the original PMS program.  It
  2250.   provides a fairly complete and flexible node capability that is easily
  2251.   configured. It allows users once they are connected to make Telnet,
  2252.   NetRom, Rose, and AX.25 connections out and to obtain various sorts of
  2253.   information such as Finger, Nodes and Heard lists etc. You can
  2254.   configure the node to execute any Linux command you wish fairly
  2255.   simply.
  2256.  
  2257.   The node would normally be invoked from the ax25d program although it
  2258.   is also capable of being invoked from the TCP/IP inetd program to
  2259.   allow users to telnet to your machine and obtain access to it, or by
  2260.   running it from the command line.
  2261.  
  2262.   14.1.  Creating the /etc/ax25/node.conf file.
  2263.  
  2264.   The node.conf file is where the main configuration of the node takes
  2265.   place. It is a simple text file and its format is as follows:
  2266.  
  2267.   # /etc/ax25/node.conf
  2268.   # configuration file for the node(8) program.
  2269.   #
  2270.   # Lines beginning with '#' are comments and are ignored.
  2271.  
  2272.   # Hostname
  2273.   # Specifies the hostname of the node machine
  2274.   hostname        radio.gw.vk2ktj.ampr.org
  2275.  
  2276.   # Local Network
  2277.   # allows you to specify what is consider 'local' for the
  2278.   # purposes of permission checking using nodes.perms.
  2279.   localnet        44.136.8.96/29
  2280.  
  2281.   # Hide Ports
  2282.   # If specified allows you to make ports invisible to users. The
  2283.   # listed ports will not be listed by the (P)orts command.
  2284.   hiddenports     rose netrom
  2285.  
  2286.   # Node Identification.
  2287.   # this will appear in the node prompt
  2288.   NodeId          LINUX:VK2KTJ-9
  2289.  
  2290.   # NetRom port
  2291.   # This is the name of the netrom port that will be used for
  2292.   # outgoing NetRom connections from the node.
  2293.   NrPort          netrom
  2294.  
  2295.   # Node Idle Timeout
  2296.   # Specifies the idle time for connections to this node in seconds.
  2297.   idletimout      1800
  2298.  
  2299.   # Connection Idle Timeout
  2300.   # Specifies the idle timer for connections made via this node in
  2301.   # seconds.
  2302.   conntimeout     1800
  2303.  
  2304.   # Reconnect
  2305.   # Specifies whether users should be reconnected to the node
  2306.   # when their remote connections disconnect, or whether they
  2307.   # should be disconnected complete.
  2308.   reconnect       on
  2309.  
  2310.   # Command Aliases
  2311.   # Provide a way of making complex node commands simple.
  2312.   alias           CONV    "telnet vk1xwt.ampr.org 3600"
  2313.   alias           BBS     "connect radio vk2xsb"
  2314.  
  2315.   # Externam Command Aliases
  2316.   # Provide a means of executing external commands under the node.
  2317.   # extcmd <cmdname> <flag> <userid> <command>
  2318.   # Flag == 1 is the only implemented function.
  2319.   # <command> is formatted as per ax25d.conf
  2320.   extcmd          PMS     1       root    /usr/sbin/pms pms -u %U -o VK2KTJ
  2321.  
  2322.   # Logging
  2323.   # Set logging to the system log. 3 is the noisiest, 0 is disabled.
  2324.   loglevel        3
  2325.  
  2326.   # The escape character
  2327.   # 20 = (Control-T)
  2328.   EscapeChar      20
  2329.  
  2330.   14.2.  Creating the /etc/ax25/node.perms file.
  2331.  
  2332.   The node allows you to assign permissions to users. These permissions
  2333.   allow you to determine which users should be allowed to make use of
  2334.   options such as the (T)elnet, and (C)onnect commands, for example, and
  2335.   which shouldn't. The node.perms file is where this information is
  2336.   stored and contains five key fields. For all fields an asterisk `*'
  2337.   character matches anything. This is useful for building default rules.
  2338.  
  2339.      user
  2340.         The first field is the callsign or user to which the permissions
  2341.         should apply.  Any SSID value is ignored, so you should just
  2342.         place the base callsign here.
  2343.  
  2344.      method
  2345.         Each protocol or access method is also given permissions. For
  2346.         example you might allow users who have connected via AX.25 or
  2347.         NetRom to use the (C)onnect option, but prevent others, such as
  2348.         those who are telnet connected from a non-local node from having
  2349.         access to it. The second field therefore allows you to select
  2350.         which access method this permissions rule should apply to.  The
  2351.         access methods allowed are:
  2352.  
  2353.           method  description
  2354.           ------  -----------------------------------------------------------
  2355.           ampr    User is telnet connected from an amprnet address (44.0.0.0)
  2356.           ax25    User connected by AX.25
  2357.           host    User started node from command line
  2358.           inet    user is telnet connected from a non-loca, non-ampr address.
  2359.           local   User is telnet connected from a 'local' host
  2360.           netrom  User connected by NetRom
  2361.           rose    User connected by Rose
  2362.           *       User connected by any means.
  2363.  
  2364.      port
  2365.         For AX.25 users you can control permissions on a port by port
  2366.         basis too if you choose. This allows you to determine what AX.25
  2367.         are allowed to do based on which of your ports they have
  2368.         connected to. The third field contains the port name if you are
  2369.         using this facility. This is useful only for AX.25 connections.
  2370.  
  2371.      password
  2372.         You may optionally configure the node so that it prompts users
  2373.         to enter a password when they connect. This might be useful to
  2374.         help protect specially configured users who have high authority
  2375.         levels. If the fourth field is set then its value will be the
  2376.         password that will be accepted.
  2377.  
  2378.      permissions
  2379.         The permissions field is the final field in each entry in the
  2380.         file.  The permissions field is coded as a bit field, with each
  2381.         facility having a bit value which if set allows the option to be
  2382.         used and if not set prevents the facility being used. The list
  2383.         of controllable facilities and their corresponding bit values
  2384.         are:
  2385.  
  2386.      value   description
  2387.      -----   -------------------------------------------------
  2388.       1      Login allowed.
  2389.       2      AX25 (C)onnects allowed.
  2390.       4      NetRom (C)onnects allowed.
  2391.       8      (T)elnet to local hosts allowed.
  2392.       16     (T)elnet to amprnet (44.0.0.0) hosts allowed.
  2393.       32     (T)elnet to non-local, non-amprnet hosts allowed.
  2394.       64     Hidden ports allowed for AX.25 (C)onnects.
  2395.       128    Rose (C)onnects allowed.
  2396.  
  2397.      To code the permissions value for a rule, simply take each of the
  2398.      permissions you want that user to have and add their values
  2399.      together. The resulting number is what you place in field five.
  2400.  
  2401.   A sample nodes.perms might look like:
  2402.  
  2403.        # /etc/ax25/node.perms
  2404.        #
  2405.        # The node operator is VK2KTJ, has a password of 'secret' and
  2406.        # is allowed all permissions by all connection methods
  2407.        vk2ktj  *       *       secret  255
  2408.  
  2409.        # The following users are banned from connecting
  2410.        NOCALL  *       *       *       0
  2411.        PK232   *       *       *       0
  2412.        PMS     *       *       *       0
  2413.  
  2414.        # INET users are banned from connecting.
  2415.        *       inet    *       *       0
  2416.  
  2417.        # AX.25, NetRom, Local, Host and AMPR users may (C)onnect and (T)elnet
  2418.        # to local and ampr hosts but not to other IP addresses.
  2419.        *       ax25    *       *       159
  2420.        *       netrom  *       *       159
  2421.        *       local   *       *       159
  2422.        *       host    *       *       159
  2423.        *       ampr    *       *       159
  2424.  
  2425.   14.3.  Configuring node to run from ax25d
  2426.  
  2427.   The node program would normally be run by the ax25d program.  To do
  2428.   this you need to add appropriate rules to the /etc/ax25/ax25d.conf
  2429.   file. In my configuration I wanted users to have a choice of either
  2430.   connecting to the node or connecting to other services. ax25d allows
  2431.   you to do this by cleverly creating creating port aliases. For
  2432.   example, given the ax25d configuration presented above, I want to
  2433.   configure node so that all users who connect to VK2KTJ-1 are given the
  2434.   node. To do this I add the following to my /etc/ax25/ax25d.conf file:
  2435.  
  2436.        [vk2ktj-1 via radio]
  2437.        default    *     *    *   *   *   0    root /usr/sbin/node node
  2438.  
  2439.   This says that the Linux kernel code will answer any connection
  2440.   requests for the callsign `VK2KTJ-1' heard on the AX.25 port named
  2441.   `radio', and will cause the node program to be run.
  2442.  
  2443.   14.4.  Configuring node to run from inetd
  2444.  
  2445.   If you want users to be able to telnet a port on your machine and
  2446.   obtain access to the node you can go this fairly easily. The first
  2447.   thing to decide is what port users should connect to. In this example
  2448.   I've arbitrarily chosen port 4000, though Tomi gives details on how
  2449.   you could replace the normal telnet daemon with the node in his
  2450.   documentation.
  2451.  
  2452.   You need to modify two files.
  2453.  
  2454.   To /etc/services you should add:
  2455.  
  2456.        node    3694/tcp        #OH2BNS's node software
  2457.  
  2458.   and to /etc/inetd.conf you should add:
  2459.  
  2460.        node    stream  tcp     nowait  root    /usr/sbin/node node
  2461.  
  2462.   When this is done, and you have restarted the inetd program any user
  2463.   who telnet connects to port 3694 of your machine will be prompted to
  2464.   login and if configured, their password and then they will be con¡
  2465.   nected to the node.
  2466.  
  2467.   15.  Configuring axspawn.
  2468.  
  2469.   The axspawn program is a simple program that allows AX.25 stations who
  2470.   connect to be logged in to your machine. It may be invoked from the
  2471.   ax25d program as described above in a manner similar to the node
  2472.   program. To allow a user to log in to your machine you should add a
  2473.   line similar to the following into your /etc/ax25/ax25d.conf file:
  2474.  
  2475.        default * * * * * 1 root /usr/sbin/axspawn axspawn %u
  2476.  
  2477.   If the line ends in the + character then the connecting user must hit
  2478.   return before they will be allowed to login. The default is to not
  2479.   wait.  Any individual host configurations that follow this line will
  2480.   have the axspawn program run when they connect. When axspawn is run it
  2481.   first checks that the command line argument it is supplied is a legal
  2482.   callsign, strips the SSID, then it checks that /etc/passwd file to see
  2483.   if that user has an account configured. If there is an account, and
  2484.   the password is either "" (null) or + then the user is logged in, if
  2485.   there is anything in the password field the user is prompted to enter
  2486.   a password. If there is not an existing account in the /etc/passwd
  2487.   file then axspawn may be configured to automatically create one.
  2488.  
  2489.   15.1.  Creating the /etc/ax25/axspawn.conf file.
  2490.  
  2491.   You can alter the behaviour of axspawn in various ways by use of the
  2492.   /etc/ax25/axspawn.conf file. This file is formatted as follows:
  2493.  
  2494.        # /etc/ax25/axspawn.conf
  2495.        #
  2496.        # allow automatic creation of user accounts
  2497.        create    yes
  2498.        #
  2499.        # guest user if above is 'no' or everything else fails. Disable with "no"
  2500.        guest     no
  2501.        #
  2502.        # group id or name for autoaccount
  2503.        group     ax25
  2504.        #
  2505.        # first user id to use
  2506.        first_uid 2001
  2507.        #
  2508.        # maximum user id
  2509.        max_uid   3000
  2510.        #
  2511.        # where to add the home directory for the new users
  2512.        home      /home/ax25
  2513.        #
  2514.        # user shell
  2515.        shell     /bin/bash
  2516.        #
  2517.        # bind user id to callsign for outgoing connects.
  2518.        associate yes
  2519.  
  2520.   The eight configurable characteristics of axspawn are as follows:
  2521.  
  2522.      #  indicates a comment.
  2523.  
  2524.      create
  2525.         if this field is set to yes then axspawn will attempt to
  2526.         automatically create a user account for any user who connects
  2527.         and does not already have an entry in the /etc/passwd file.
  2528.  
  2529.      guest
  2530.         this field names the login name of the account that will be used
  2531.         for people who connect who do not already have accounts if
  2532.         create is set to no. This is usually ax25 or guest.
  2533.  
  2534.      group
  2535.         this field names the group name that will be used for any users
  2536.         who connect and do not already have an entry in the /etc/passwd
  2537.         file.
  2538.  
  2539.      first_uid
  2540.         this is the number of the first userid that will be
  2541.         automatically created for new users.
  2542.  
  2543.      max_uid
  2544.         this is the maximum number that will be used for the userid of
  2545.         new users.
  2546.  
  2547.      home
  2548.         this is the home (login) directory of new users.
  2549.  
  2550.      shell
  2551.         this is the login shell of any new users.
  2552.  
  2553.      associate
  2554.         this flag indicates whether outgoing AX.25 connections made by
  2555.         this user after they login will use their own callsign, or your
  2556.         stations callsign.
  2557.  
  2558.   16.  Configuring the pms
  2559.  
  2560.   The pms program is an implementation of a simple personal message
  2561.   system. It was originally written by Alan Cox. Dave Brown, N2RJT,
  2562.   <dcb@vectorbd.com> has taken on further development of it.  At present
  2563.   it is still very simple, supporting only the ability to send mail to
  2564.   the owner of the system and to obtain some limited system information
  2565.   but Dave is working to expand its capability to make it more useful.
  2566.  
  2567.   After that is done there are a couple of simple files that you should
  2568.   create that give users some information about the system and then you
  2569.   need to add appropriate entries into the ax25d.conf file so that
  2570.   connected users are presented with the PMS.
  2571.  
  2572.   16.1.  Create the /etc/ax25/pms.motd file.
  2573.  
  2574.   The /etc/ax25/pms.motd file contains the `message of the day' that
  2575.   users will be presented with after they connect and receive the usual
  2576.   BBS id header. The file is a simple text file, any text you include in
  2577.   this file will be sent to users.
  2578.  
  2579.   16.2.  Create the /etc/ax25/pms.info file.
  2580.  
  2581.   The /etc/ax25/pms.info file is also a simple text file in which you
  2582.   would put more detailed information about your station or
  2583.   configuration.  This file is presented to users in response to their
  2584.   issuing of the Info command from the PMS> prompt.
  2585.  
  2586.   16.3.  Associate AX.25 callsigns with system users.
  2587.  
  2588.   When a connected user sends mail to an AX.25 callsign, the pms expects
  2589.   that callsign to be mapped, or associated with a real system user on
  2590.   your machine. This is described in a section of its own.
  2591.  
  2592.   16.4.  Add the PMS to the /etc/ax25/ax25d.conf file.
  2593.  
  2594.   Adding the pms to your ax25d.conf file is very simple.  There is one
  2595.   small thing you need to think about though. Dave has added command
  2596.   line arguments to the PMS to allow it to handle a number of different
  2597.   text end-of-line conventions. AX.25 and NetRom by convention expect
  2598.   the end-of-line to be carriage return, linefeed while the standard
  2599.   unix end-of-line is just newline. So, for example, if you wanted to
  2600.   add an entry that meant that the default action for a connection
  2601.   received on an AX.25 port is to start the PMS then you would add a
  2602.   line that looked something like:
  2603.  
  2604.        default  1  10 5 100 5   0    root  /usr/sbin/pms pms -a -o vk2ktj
  2605.  
  2606.   This simply runs the pms program, telling it that it is an AX.25
  2607.   connection it is connected to and that the PMS owner is vk2ktj.  Check
  2608.   the man page for what you should specify for other connection methods.
  2609.  
  2610.   16.5.  Test the PMS.
  2611.  
  2612.   To test the PMS, you can try the following command from the command
  2613.   line:
  2614.  
  2615.   # /usr/sbin/pms -u vk2ktj -o vk2ktj
  2616.  
  2617.   Substitute your own callsign for mine and this will run the pms,
  2618.   telling it that it is to use the unix end-of-line convention, and that
  2619.   user logging in is vk2ktj. You can do all the things connected users
  2620.   can.
  2621.  
  2622.   Additionally you might try getting some other node to connect to you
  2623.   to confirm that your ax25d.conf configuration works.
  2624.  
  2625.   17.  Configuring the user_call programs.
  2626.  
  2627.   The `user_call' programs are really called: ax25_call and netrom_call.
  2628.   They are very simple programs designed to be called from ax25d to
  2629.   automate network connections to remote hosts. They may of course be
  2630.   called from a number of other places such as shell scripts or other
  2631.   daemons such as the node program.
  2632.  
  2633.   They are like a very simple call program. They don't do any meddling
  2634.   with the data at all, so the end of line handling you'll have to worry
  2635.   about yourself.
  2636.  
  2637.   Let's start with an example of how you might use them. Imagine you
  2638.   have a small network at home and that you have one linux machine
  2639.   acting as your Linux radio gateway and another machine, lets say a BPQ
  2640.   node connected to it via an ethernet connection.
  2641.  
  2642.   Normally if you wanted radio users to be able to connect to the BPQ
  2643.   node they would either have to digipeat through your linux node, or
  2644.   connect to the node program on your linux node and then connect from
  2645.   it.  The ax25_call program can simplify this if it is called from the
  2646.   ax25d program.
  2647.  
  2648.   Imagine the BPQ node has the callsign VK2KTJ-9 and that the linux
  2649.   machine has the AX.25/ethernet port named `bpq'. Let us also imagine
  2650.   the Linux gateway machine has a radio port called `radio'.
  2651.  
  2652.   An entry in the /etc/ax25/ax25d.conf that looked like:
  2653.  
  2654.        [VK2KTJ-1 via radio]
  2655.        default    * * * *   *   *  *
  2656.                        root /usr/sbin/ax25_call ax25_call bpq %u vk2ktj-9
  2657.  
  2658.   would enable users to connect direct to `VK2KTJ-1' which would actu¡
  2659.   ally be the Linux ax25d daemon and then be automatically switched to
  2660.   an AX.25 connection to `VK2KTJ-9' via the `bpq' interface.
  2661.  
  2662.   There are all sorts of other possible configurations that you might
  2663.   try.  The `netrom_call' and `rose_call' utilities work in similar
  2664.   ways. One amateur has used this utility to make connections to a
  2665.   remote BBS easier. Normally the users would have to manually enter a
  2666.   long connection string to make the call so he created an entry that
  2667.   made the BBS appear as though it were on the local network by having
  2668.   his ax25d proxy the connection to the remote machine.
  2669.  
  2670.   18.  Configuring the Rose Uplink and Downlink commands
  2671.  
  2672.   If you are familiar with the ROM based Rose implementation you will be
  2673.   familiar with the method by which AX.25 users make calls across a Rose
  2674.   network. If a users local Rose node has the callsign VK2KTJ-5 and the
  2675.   AX.25 user wants to connect to VK5XXX at remote Rose node 5050882960
  2676.   then they would issue the command:
  2677.  
  2678.        c vk5xxx v vk2ktj-5 5050 882960
  2679.  
  2680.   At the remote node, VK5XXX would see an incoming connection with the
  2681.   local AX.25 users callsign and being digipeated via the remote Rose
  2682.   nodes callsign.
  2683.  
  2684.   The Linux Rose implementation does not support this capability in the
  2685.   kernel, but there are two application programs called rsuplnk and
  2686.   rsdwnlnk which perform this function.
  2687.  
  2688.   18.1.  Configuring a Rose downlink
  2689.  
  2690.   To configure your Linux machine to accept a Rose connection and
  2691.   establish an AX.25 connection to any destination callsign that is not
  2692.   being listened for on your machine you need to add an entry to your
  2693.   /etc/ax25/ax25d.conf file. Normally you would configure this entry to
  2694.   be the default behaviour for incoming Rose connections. For example
  2695.   you might have Rose listeners operating for destinations like NODE-0
  2696.   or HEARD-0 that you wish to handle locally, but for all other
  2697.   destination calls you may want to pass them to the rsdwnlink command
  2698.   and assume they are AX.25 users.
  2699.  
  2700.   A typical configuration would look like:
  2701.  
  2702.        #
  2703.        {* via rose}
  2704.        NOCALL   * * * * * *  L
  2705.        default  * * * * * *  - root  /usr/sbin/rsdwnlnk rsdwnlnk 4800 vk2ktj-5
  2706.        #
  2707.  
  2708.   With this configuration any user who established a Rose connection to
  2709.   your Linux nodes address with a destination call of something that you
  2710.   were not specifically listening for would be converted into an AX.25
  2711.   connection on the AX.25 port named 4800 with a digipeater path of
  2712.   VK2KTJ-5.
  2713.  
  2714.   18.2.  Configuring a Rose uplink
  2715.  
  2716.   To configure your Linux machine to accept AX.25 connections in the
  2717.   same way that a ROM Rose node would you must add an entry into your
  2718.   /etc/ax25/ax25d.conf file that looks similar to the following:
  2719.  
  2720.        #
  2721.        [VK2KTJ-5* via 4800]
  2722.        NOCALL   * * * * * *  L
  2723.        default  * * * * * *  - root  /usr/sbin/rsuplnk rsuplnk rose
  2724.        #
  2725.  
  2726.   Note the special syntax for the local callsign. The `*' character
  2727.   indicates that the application should be invoked if the callsign is
  2728.   heard in the digipeater path of a connection.
  2729.  
  2730.   This configuration would allow an AX.25 user to establish Rose calls
  2731.   using the example connect sequence presented in the introduction.
  2732.   Anybody attempting to digipeat via VK2KTJ-5 on the AX.25 port named
  2733.   4800 would be handled by the rsuplnk command.
  2734.  
  2735.   19.  Associating AX.25 callsigns with Linux users.
  2736.  
  2737.   There are a number of situations where it is highly desirable to
  2738.   associate a callsign with a linux user account. One example might be
  2739.   where a number of amateur radio operators share the same linux machine
  2740.   and wish to use their own callsign when making calls. Another is the
  2741.   case of PMS users wanting to talk to a particular user on your
  2742.   machine.
  2743.  
  2744.   The AX.25 software provides a means of managing this association of
  2745.   linux user account names with callsigns. We've mentioned it once
  2746.   already in the PMS section, but I'm spelling it out here to be sure
  2747.   you don't miss it.
  2748.  
  2749.   You make the association with the axparms command. An example looks
  2750.   like:
  2751.  
  2752.        # axparms -assoc vk2ktj terry
  2753.  
  2754.   This command associates that AX.25 callsign vk2ktj with the user terry
  2755.   on the machine. So, for example, any mail for vk2ktj on the pms will
  2756.   be sent to Linux account terry.
  2757.  
  2758.   Remember to put these associations into your rc file so that they are
  2759.   available each time your reboot.
  2760.  
  2761.   Note you should never associate a callsign with the root account as
  2762.   this can cause configuration problems in other programs.
  2763.  
  2764.   20.  HOWTO link NOS and the Linux kernel networking software
  2765.  
  2766.   Many people like to run some version of NOS under Linux because it has
  2767.   all of the features and facilities they are used to. Most of those
  2768.   people would also like to have the NOS running on their machine
  2769.   capable of talking to the Linux kernel so that they can offer some of
  2770.   the linux capabilities to radio users.
  2771.  
  2772.   20.1.  Linking NOS and Linux using a pipe device
  2773.  
  2774.   Brandon S. Allbery, KF8NH, contributed the following information to
  2775.   explain how to interconnect the NOS running on a Linux machine with
  2776.   the kernel code using the Linux pipe device.
  2777.  
  2778.   Since both Linux and NOS support the slip protocol it is possible to
  2779.   link the two together by creating a slip link. You could do this by
  2780.   using two serial ports with a loopback cable between them, but this
  2781.   would be slow and costly. Linux provides a feature that many other
  2782.   Unix-like operating systems provide called `pipes'. These are special
  2783.   pseudo devices that look like a standard tty device to software but in
  2784.   fact loopback to another pipe device. To use these pipes the first
  2785.   program must open the master end of the pipe, and the open then the
  2786.   second program can open the slave end of the pipe. When both ends are
  2787.   open the programs can communicate with each other simply by writing
  2788.   characters to the pipes in the way they would if they were terminal
  2789.   devices.
  2790.  
  2791.   To use this feature to connect the Linux Kernel and a copy of NOS, or
  2792.   some other program you first must choose a pipe device to use. You can
  2793.   find one by looking in your /dev directory. The master end of the
  2794.   pipes are named: ptyp[1-f] and the slave end of the pipes are known
  2795.   as: ttyp[1-f]. Remember they come in pairs, so if you select
  2796.   /dev/ptypf as your master end then you must use /dev/ttypf as the
  2797.   slave end.
  2798.  
  2799.   Once you have chosen a pipe device pair to use you should allocate the
  2800.   master end to you linux kernel and the slave end to the NOS program,
  2801.   as the Linux kernel starts first and the master end of the pipe must
  2802.   be opened first.  You must also remember that your Linux kernel must
  2803.   have a different IP address to your NOS, so you will need to allocate
  2804.   a unique address for it if you haven't already.
  2805.  
  2806.   You configure the pipe just as if it were a serial device, so to
  2807.   create the slip link from your linux kernel you can use commands
  2808.   similar to the following:
  2809.  
  2810.        # /sbin/slattach -s 38400 -p slip /dev/ptypf &
  2811.        # /sbin/ifconfig sl0 broadcast 44.255.255.255 pointopoint 44.70.248.67 /
  2812.                mtu 1536 44.70.4.88
  2813.        # /sbin/route add 44.70.248.67 sl0
  2814.        # /sbin/route add -net 44.0.0.0 netmask 255.0.0.0 gw 44.70.248.67
  2815.  
  2816.   In this example the Linux kernel has been given IP address 44.70.4.88
  2817.   and the NOS program is using IP address 44.70.248.67. The route
  2818.   command in the last line simply tells your linux kernel to route all
  2819.   datagrams for the amprnet via the slip link created by the slattach
  2820.   command. Normally you would put these commands into your
  2821.   /etc/rc.d/rc.inet2 file after all your other network configuration is
  2822.   complete so that the slip link is created automatically when you
  2823.   reboot.  Note: there is no advantage in using cslip instead of slip as
  2824.   it actually reduces performance because the link is only a virtual one
  2825.   and occurs fast enough that having to compress the headers first takes
  2826.   longer than transmitting the uncompressed datagram.
  2827.  
  2828.   To configure the NOS end of the link you could try the following:
  2829.  
  2830.   # you can call the interface anything you want; I use "linux" for convenience.
  2831.   attach asy ttypf - slip linux 1024 1024 38400
  2832.   route addprivate 44.70.4.88 linux
  2833.  
  2834.   These commands will create a slip port named `linux' via the slave end
  2835.   of the pipe device pair to your linux kernel, and a route to it to
  2836.   make it work. When you have started NOS you should be able to ping and
  2837.   telnet to your NOS from your Linux machine and vice versa. If not,
  2838.   double check that you have made no mistakes especially that you have
  2839.   the addresses configured properly and have the pipe devices around the
  2840.   right way.
  2841.  
  2842.   21.  The /proc/ file system entries.
  2843.  
  2844.   The /proc filesystem contains a number of files specifically related
  2845.   to the AX25 and NetRom kernel software. These files are normally used
  2846.   by the AX52 utilities, but they are plainly formatted so you may be
  2847.   interested in reading them. The format is fairly easily understood so
  2848.   I don't think much explanation will be necessary.
  2849.  
  2850.      /proc/net/arp
  2851.         contains the list of Address Resolution Protocol mappings of IP
  2852.         addresses to MAC layer protocol addresses. These can can AX.25,
  2853.         ethernet or some other MAC layer protocol.
  2854.  
  2855.      /proc/net/ax25
  2856.         contains a list of AX.25 sockets opened. These might be
  2857.         listening for a connection, or active sessions.
  2858.  
  2859.      /proc/net/ax25_bpqether
  2860.         contains the AX25 over ethernet BPQ style callsign mappings.
  2861.  
  2862.      /proc/net/ax25_calls
  2863.         contains the linux userid to callsign mappings set my the
  2864.         axparms -assoc command.
  2865.  
  2866.      /proc/net/ax25_route
  2867.         contains AX.25 digipeater path information.
  2868.  
  2869.      /proc/net/nr
  2870.         contains a list of NetRom sockets opened. These might be
  2871.         listening for a connection, or active sessions.
  2872.  
  2873.      /proc/net/nr_neigh
  2874.         contains information about the NetRom neighbours known to the
  2875.         NetRom software.
  2876.  
  2877.      /proc/net/nr_nodes
  2878.         contains information about the NetRom nodes known to the NetRom
  2879.         software.
  2880.  
  2881.      /proc/net/rose
  2882.         contains a list of Rose sockets opened. These might be listening
  2883.         for a connection, or active sessions.
  2884.  
  2885.      /proc/net/rose_nodes
  2886.         contains a mapping of Rose destinations to Rose neighbours.
  2887.  
  2888.      /proc/net/rose_neigh
  2889.         contains a list of known Rose neighbours.
  2890.  
  2891.      /proc/net/rose_routes
  2892.         contains a list of all established Rose connections.
  2893.  
  2894.   22.  Some sample configurations.
  2895.  
  2896.   Following are examples of the most common types of configurations.
  2897.   These are guides only as there are as many ways of configuring your
  2898.   network as there are networks to configure, but they may give you a
  2899.   start.
  2900.  
  2901.   22.1.  Small Ethernet LAN with Linux as a router to Radio LAN
  2902.  
  2903.   Many of you may have small local area networks at home and want to
  2904.   connect the machines on that network to your local radio LAN. This is
  2905.   the type of configuration I use at home. I arranged to have a suitable
  2906.   block of addresses allocated to me that I could capture in a single
  2907.   route for convenience and I use these on my Ethernet LAN. Your local
  2908.   IP coordinator will assist you in doing this if you want to try it as
  2909.   well. The addresses for the Ethernet LAN form a subset of the radio
  2910.   LAN addresses. The following configuration is the actual one for my
  2911.   linux router on my network at home:
  2912.  
  2913.                                                  .      .   .    .    . .
  2914.          ---                                .
  2915.           | Network       /---------\     .    Network
  2916.           | 44.136.8.96/29|         |    .     44.136.8/24        \ | /
  2917.           |               | Linux   |   .                          \|/
  2918.           |               |         |  .                            |
  2919.           |          eth0 | Router  |  .  /-----\    /----------\   |
  2920.           |---------------|         |-----| TNC |----| Radio    |---/
  2921.           |   44.136.8.97 |  and    |  .  \-----/    \----------/
  2922.           |               |         | sl0
  2923.           |               | Server  | 44.136.8.5
  2924.           |               |         |    .
  2925.           |               |         |     .
  2926.           |               \_________/       .
  2927.          ---                                     .      .   .    .    . .
  2928.  
  2929.   #!/bin/sh
  2930.   # /etc/rc.net
  2931.   # This configuration provides one KISS based AX.25 port and one
  2932.   # Ethernet device.
  2933.  
  2934.   echo "/etc/rc.net"
  2935.   echo "  Configuring:"
  2936.  
  2937.   echo -n "    loopback:"
  2938.   /sbin/ifconfig lo 127.0.0.1
  2939.   /sbin/route add 127.0.0.1
  2940.   echo " done."
  2941.  
  2942.   echo -n "    ethernet:"
  2943.   /sbin/ifconfig eth0 44.136.8.97 netmask 255.255.255.248 \
  2944.                   broadcast 44.136.8.103 up
  2945.   /sbin/route add 44.136.8.97 eth0
  2946.   /sbin/route add -net 44.136.8.96 netmask 255.255.255.248 eth0
  2947.   echo " done."
  2948.  
  2949.   echo -n "    AX.25: "
  2950.   kissattach -i 44.136.8.5 -m 512 /dev/ttyS1 4800
  2951.   ifconfig sl0 netmask 255.255.255.0 broadcast 44.136.8.255
  2952.   route add -host 44.136.8.5 sl0
  2953.   route add -net 44.136.8.0 window 1024 sl0
  2954.  
  2955.   echo -n "    Netrom: "
  2956.   nrattach -i 44.136.8.5 netrom
  2957.  
  2958.   echo "  Routing:"
  2959.   /sbin/route add default gw 44.136.8.68 window 1024 sl0
  2960.   echo "    default route."
  2961.   echo done.
  2962.  
  2963.   # end
  2964.  
  2965.   /etc/ax25/axports
  2966.  
  2967.        # name  callsign        speed   paclen  window  description
  2968.        4800    VK2KTJ-0        4800    256     2       144.800 MHz
  2969.  
  2970.   /etc/ax25/nrports
  2971.  
  2972.        # name  callsign        alias   paclen  description
  2973.        netrom  VK2KTJ-9        LINUX   235     Linux Switch Port
  2974.  
  2975.   /etc/ax25/nrbroadcast
  2976.  
  2977.        # ax25_name     min_obs def_qual        worst_qual      verbose
  2978.        4800            1       120             10              1
  2979.  
  2980.   ╖  You must have IP_FORWARDING enabled in your kernel.
  2981.  
  2982.   ╖  The AX.25 configuration files are pretty much those used as
  2983.      examples in the earlier sections, refer to those where necessary.
  2984.  
  2985.   ╖  I've chosen to use an IP address for my radio port that is not
  2986.      within my home network block. I needn't have done so, I could have
  2987.      easily used 44.136.8.97 for that port too.
  2988.  
  2989.   ╖  44.136.8.68 is my local IPIP encapsulated gateway and hence is
  2990.      where I point my default route.
  2991.  
  2992.   ╖  Each of the machines on my Ethernet network have a route:
  2993.  
  2994.        route add -net 44.0.0.0 netmask 255.0.0.0 \
  2995.                gw 44.136.8.97 window 512 mss 512 eth0
  2996.  
  2997.   The use of the mss and window parameters means that I can get optimum
  2998.   performance from both local Ethernet and radio based connections.
  2999.  
  3000.   ╖  I also run my smail, http, ftp and other daemons on the router
  3001.      machine so that it needs to be the only machine to provide others
  3002.      with facilities.
  3003.  
  3004.   ╖  The router machine is a lowly 386DX20 with a 20Mb harddrive and a
  3005.      very minimal linux configuration.
  3006.  
  3007.   22.2.  IPIP encapsulated gateway configuration.
  3008.  
  3009.   Linux is now very commonly used for TCP/IP encapsulated gateways
  3010.   around the world. The new tunnel driver supports multiple encapsulated
  3011.   routes and makes the older ipip daemon obsolete.
  3012.  
  3013.   A typical configuration would look similar to the following.
  3014.  
  3015.                                                  .      .   .    .    . .
  3016.          ---                                .
  3017.           | Network       /---------\     .    Network
  3018.           | 154.27.3/24   |         |    .     44.136.16/24       \ | /
  3019.           |               | Linux   |   .                          \|/
  3020.           |               |         |  .                            |
  3021.           |          eth0 | IPIP    |  .  /-----\    /----------\   |
  3022.        ---|---------------|         |-----| TNC |----| Radio    |---/
  3023.           |   154.27.3.20 | Gateway |  .  \-----/    \----------/
  3024.           |               |         | sl0
  3025.           |               |         | 44.136.16.1
  3026.           |               |         |    .
  3027.           |               |         |     .
  3028.           |               \_________/       .
  3029.          ---                                     .      .   .    .    . .
  3030.  
  3031.   The configuration files of interest are:
  3032.  
  3033.   # /etc/rc.net
  3034.   # This file is a simple configuration that provides one KISS AX.25
  3035.   # radio port, one Ethernet device, and utilises the kernel tunnel driver
  3036.   # to perform the IPIP encapsulation/decapsulation
  3037.   #
  3038.   echo "/etc/rc.net"
  3039.   echo "  Configuring:"
  3040.   #
  3041.   echo -n "    loopback:"
  3042.   /sbin/ifconfig lo 127.0.0.1
  3043.   /sbin/route add 127.0.0.1
  3044.   echo " done."
  3045.   #
  3046.   echo -n "    ethernet:"
  3047.   /sbin/ifconfig eth0 154.27.3.20 netmask 255.255.255.0 \
  3048.                   broadcast 154.27.3.255 up
  3049.   /sbin/route add 154.27.3.20 eth0
  3050.   /sbin/route add -net 154.27.3.0 netmask 255.255.255.0 eth0
  3051.   echo " done."
  3052.   #
  3053.   echo -n "    AX.25: "
  3054.   kissattach -i 44.136.16.1 -m 512 /dev/ttyS1 4800
  3055.   /sbin/ifconfig sl0 netmask 255.255.255.0 broadcast 44.136.16.255
  3056.   /sbin/route add -host 44.136.16.1 sl0
  3057.   /sbin/route add -net 44.136.16.0 netmask 255.255.255.0 window 1024 sl0
  3058.   #
  3059.   echo -n "    tunnel:"
  3060.   /sbin/ifconfig tunl0 44.136.16.1 mtu 512 up
  3061.   #
  3062.   echo done.
  3063.   #
  3064.   echo -n "Routing ... "
  3065.   source /etc/ipip.routes
  3066.   echo done.
  3067.   #
  3068.   # end.
  3069.  
  3070.   and:
  3071.  
  3072.        # /etc/ipip.routes
  3073.        # This file is generated using the munge script
  3074.        #
  3075.        /sbin/route add -net 44.134.8.0 netmask 255.255.255.0 tunl0 gw 134.43.26.1
  3076.        /sbin/route add -net 44.34.9.0 netmask 255.255.255.0 tunl0 gw 174.84.6.17
  3077.        /sbin/route add -net 44.13.28.0 netmask 255.255.255.0 tunl0 gw 212.37.126.3
  3078.           ...
  3079.           ...
  3080.           ...
  3081.  
  3082.   /etc/ax25/axports
  3083.  
  3084.        # name  callsign        speed   paclen  window  description
  3085.        4800    VK2KTJ-0        4800    256     2       144.800 MHz
  3086.  
  3087.   Some points to note here are:
  3088.  
  3089.   ╖  The new tunnel driver uses the gw field in the routing table in
  3090.      place of the pointopoint parameter to specify the address of the
  3091.      remote IPIP gateway. This is why it now supports multiple routes
  3092.      per interface.
  3093.  
  3094.   ╖  You can configure two network devices with the same address.  In
  3095.      this example both the sl0 and the tunl0 devices have been
  3096.      configured with the IP address of the radio port. This is done so
  3097.      that the remote gateway sees the correct address from your gateway
  3098.      in encapsulated datagrams sent to it.
  3099.  
  3100.   ╖  The route commands used to specify the encapsulated routes can be
  3101.      automatically generated by a modified version of the munge script.
  3102.      This is included below. The route commands would then be written to
  3103.      a separate file and read in using the bash source /etc/ipip.routes
  3104.      command (assuming you called the file with the routing commands
  3105.      /etc/ipip.routes) as illustrated. The source file must be in the
  3106.      NOS route command format.
  3107.  
  3108.   ╖  Note the use of the window argument on the route command. Setting
  3109.      this parameter to an appropriate value improves the performance of
  3110.      your radio link.
  3111.  
  3112.   The new tunnel-munge script:
  3113.  
  3114.   #!/bin/sh
  3115.   #
  3116.   # From: Ron Atkinson <n8fow@hamgate.cc.wayne.edu>
  3117.   #
  3118.   #  This script is basically the 'munge' script written by Bdale N3EUA
  3119.   #  for the IPIP daemon and is modified by Ron Atkinson N8FOW. It's
  3120.   #  purpose is to convert a KA9Q NOS format gateways route file
  3121.   #  (usually called 'encap.txt') into a Linux routing table format
  3122.   #  for the IP tunnel driver.
  3123.   #
  3124.   #        Usage: Gateway file on stdin, Linux route format file on stdout.
  3125.   #               eg.  tunnel-munge < encap.txt > ampr-routes
  3126.   #
  3127.   # NOTE: Before you use this script be sure to check or change the
  3128.   #       following items:
  3129.   #
  3130.   #     1) Change the 'Local routes' and 'Misc user routes' sections
  3131.   #        to routes that apply to your own area (remove mine please!)
  3132.   #     2) On the fgrep line be sure to change the IP address to YOUR
  3133.   #        gateway Internet address. Failure to do so will cause serious
  3134.   #        routing loops.
  3135.   #     3) The default interface name is 'tunl0'. Make sure this is
  3136.   #        correct for your system.
  3137.  
  3138.   echo "#"
  3139.   echo "# IP tunnel route table built by $LOGNAME on `date`"
  3140.   echo "# by tunnel-munge script v960307."
  3141.   echo "#"
  3142.   echo "# Local routes"
  3143.   echo "route add -net 44.xxx.xxx.xxx netmask 255.mmm.mmm.mmm dev sl0"
  3144.   echo "#"
  3145.   echo "# Misc user routes"
  3146.   echo "#"
  3147.   echo "# remote routes"
  3148.  
  3149.   fgrep encap | grep "^route" | grep -v " XXX.XXX.XXX.XXX" | \
  3150.   awk '{
  3151.           split($3, s, "/")
  3152.           split(s[1], n,".")
  3153.           if      (n[1] == "")    n[1]="0"
  3154.           if      (n[2] == "")    n[2]="0"
  3155.           if      (n[3] == "")    n[3]="0"
  3156.           if      (n[4] == "")    n[4]="0"
  3157.           if      (s[2] == "1")   mask="128.0.0.0"
  3158.           else if (s[2] == "2")   mask="192.0.0.0"
  3159.           else if (s[2] == "3")   mask="224.0.0.0"
  3160.           else if (s[2] == "4")   mask="240.0.0.0"
  3161.           else if (s[2] == "5")   mask="248.0.0.0"
  3162.           else if (s[2] == "6")   mask="252.0.0.0"
  3163.           else if (s[2] == "7")   mask="254.0.0.0"
  3164.           else if (s[2] == "8")   mask="255.0.0.0"
  3165.           else if (s[2] == "9")   mask="255.128.0.0"
  3166.           else if (s[2] == "10")  mask="255.192.0.0"
  3167.           else if (s[2] == "11")  mask="255.224.0.0"
  3168.           else if (s[2] == "12")  mask="255.240.0.0"
  3169.           else if (s[2] == "13")  mask="255.248.0.0"
  3170.           else if (s[2] == "14")  mask="255.252.0.0"
  3171.           else if (s[2] == "15")  mask="255.254.0.0"
  3172.           else if (s[2] == "16")  mask="255.255.0.0"
  3173.           else if (s[2] == "17")  mask="255.255.128.0"
  3174.           else if (s[2] == "18")  mask="255.255.192.0"
  3175.           else if (s[2] == "19")  mask="255.255.224.0"
  3176.           else if (s[2] == "20")  mask="255.255.240.0"
  3177.           else if (s[2] == "21")  mask="255.255.248.0"
  3178.           else if (s[2] == "22")  mask="255.255.252.0"
  3179.           else if (s[2] == "23")  mask="255.255.254.0"
  3180.           else if (s[2] == "24")  mask="255.255.255.0"
  3181.           else if (s[2] == "25")  mask="255.255.255.128"
  3182.           else if (s[2] == "26")  mask="255.255.255.192"
  3183.           else if (s[2] == "27")  mask="255.255.255.224"
  3184.           else if (s[2] == "28")  mask="255.255.255.240"
  3185.           else if (s[2] == "29")  mask="255.255.255.248"
  3186.           else if (s[2] == "30")  mask="255.255.255.252"
  3187.           else if (s[2] == "31")  mask="255.255.255.254"
  3188.           else                    mask="255.255.255.255"
  3189.  
  3190.   if (mask == "255.255.255.255")
  3191.           printf "route add -host %s.%s.%s.%s gw %s dev tunl0\n"\
  3192.                   ,n[1],n[2],n[3],n[4],$5
  3193.   else
  3194.           printf "route add -net %s.%s.%s.%s gw %s netmask %s dev tunl0\n"\
  3195.                   ,n[1],n[2],n[3],n[4],$5,mask
  3196.    }'
  3197.  
  3198.   echo "#"
  3199.   echo "# default the rest of amprnet via mirrorshades.ucsd.edu"
  3200.   echo "route add -net 44.0.0.0 gw 128.54.16.18 netmask 255.0.0.0 dev tunl0"
  3201.   echo "#"
  3202.   echo "# the end"
  3203.  
  3204.   23.  AX.25, NetRom, Rose network programming.
  3205.  
  3206.   Probably the biggest advantage of using the kernel based
  3207.   implementations of the amateur packet radio protocols is the ease with
  3208.   which you can develop applications and programs to use them.
  3209.  
  3210.   While the subject of Unix Network Programming is outside the scope of
  3211.   this document I will describe the elementary details of how you can
  3212.   make use of the AX.25, NetRom and Rose protocols within your software.
  3213.  
  3214.   23.1.  The address families.
  3215.  
  3216.   Network programming for AX.25, NetRom and Rose is quite similar to
  3217.   programming for TCP/IP under Linux. The major differences being the
  3218.   address families used, and the address structures that need to be
  3219.   mangled into place.
  3220.  
  3221.   The address family names for AX.25, NetRom and Rose are AF_AX25,
  3222.   AF_NETROM and AF_ROSE respectively.
  3223.  
  3224.   23.2.  The header files.
  3225.  
  3226.   You must always include the `ax25.h' header file, and also the
  3227.   `netrom.h' or `rose.h' header files if you are dealing with those
  3228.   protocols. Simple top level skeletons would look something like the
  3229.   following:
  3230.  
  3231.   For AX.25:
  3232.  
  3233.        #include <ax25.h>
  3234.        int s, addrlen = sizeof(struct full_sockaddr_ax25);
  3235.        struct full_sockaddr_ax25 sockaddr;
  3236.        sockaddr.fsa_ax25.sax25_family = AF_AX25
  3237.  
  3238.   For NetRom:
  3239.  
  3240.        #include <ax25.h>
  3241.        #include <netrom.h>
  3242.        int s, addrlen = sizeof(struct full_sockaddr_ax25);
  3243.        struct full_sockaddr_ax25 sockaddr;
  3244.        sockaddr.fsa_ax25.sax25_family = AF_NETROM;
  3245.  
  3246.   For Rose:
  3247.  
  3248.        #include <ax25.h>
  3249.        #include <rose.h>
  3250.        int s, addrlen = sizeof(struct sockaddr_rose);
  3251.        struct sockaddr_rose sockaddr;
  3252.        sockaddr.srose_family = AF_ROSE;
  3253.  
  3254.   23.3.  Callsign mangling and examples.
  3255.  
  3256.   There are routines within the lib/ax25.a library built in the AX25
  3257.   utilities package that manage the callsign conversions for you. You
  3258.   can write your own of course if you wish.
  3259.  
  3260.   The user_call utilities are excellent examples from which to work. The
  3261.   source code for them is included in the AX25 utilities package.  If
  3262.   you spend a little time working with those you will soon see that 90
  3263.   percent of the work is involved in just getting ready to open the
  3264.   socket.  Actually making the connection is easy, the preparation takes
  3265.   time.
  3266.  
  3267.   The example are simple enough to not be very confusing. If you have
  3268.   any questions, you should feel to direct them to the linux-hams
  3269.   mailing list and someone there will be sure to help you.
  3270.  
  3271.   24.  Discussion relating to Amateur Radio and Linux.
  3272.  
  3273.   There are various places that discussion relating to Amateur Radio and
  3274.   Linux take place. They take place in the comp.os.linux.* newsgroups,
  3275.   they also take place on the HAMS list on vger.rutgers.edu. Other
  3276.   places where they are held include the tcp-group mailing list at
  3277.   ucsd.edu (the home of amateur radio TCP/IP discussions), and you might
  3278.   also try the #linpeople channel on the linuxnet irc network.
  3279.  
  3280.   To join the Linux linux-hams channel on the mail list server, send
  3281.   mail to:
  3282.  
  3283.        Majordomo@vger.rutgers.edu
  3284.  
  3285.   with the line:
  3286.  
  3287.        subscribe linux-hams
  3288.  
  3289.   in the message body. The subject line is ignored.
  3290.  
  3291.   The linux-hams mailing list is archived at:
  3292.  
  3293.   zone.pspt.fi <http://zone.pspt.fi/archive/linux-hams/> and
  3294.   zone.oh7rba.ampr.org <http://zone.oh7rba.ampr.org/archive/linux-
  3295.   hams/>.  Please use the archives when you are first starting, because
  3296.   many common questions are answered there.
  3297.  
  3298.   To join the tcp-group send mail to:
  3299.  
  3300.        listserver@ucsd.edu
  3301.  
  3302.   with the line:
  3303.  
  3304.        subscribe tcp-group
  3305.  
  3306.   in the body of the text.
  3307.  
  3308.   Note: Please remember that the tcp-group is primarily for discussion
  3309.   of the use of advanced protocols, of which TCP/IP is one, in Amateur
  3310.   Radio. Linux specific questions should not ordinarily go there.
  3311.  
  3312.   25.  Acknowledgements.
  3313.  
  3314.   The following people have contributed to this document in one way or
  3315.   another, knowingly or unknowingly. In no particular order (as I find
  3316.   them): Jonathon Naylor, Thomas Sailer, Joerg Reuter, Ron Atkinson,
  3317.   Alan Cox, Craig Small, John Tanner, Brandon Allbery, Hans Alblas,
  3318.   Klaus Kudielka, Carl Makin.
  3319.  
  3320.   26.  Copyright.
  3321.  
  3322.   The AX25-HOWTO, information on how to install and configure some of
  3323.   the more important packages providing AX25 support for Linux.
  3324.   Copyright (c) 1996 Terry Dawson.
  3325.  
  3326.   This program is free software; you can redistribute it and/or modify
  3327.   it under the terms of the GNU General Public License as published by
  3328.   the Free Software Foundation; either version 2 of the License, or (at
  3329.   your option) any later version.
  3330.  
  3331.   This program is distributed in the hope that it will be useful, but
  3332.   WITHOUT ANY WARRANTY; without even the implied warranty of
  3333.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3334.   General Public License for more details.
  3335.  
  3336.   You should have received a copy of the GNU General Public License
  3337.   along with this program; if not, write to the:
  3338.  
  3339.   Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  3340.   USA.
  3341.  
  3342.