Chapter 12: NOS FILE COMPENDIUM
In this chapter we take a closer look at the directory structures and data files in the NOS environment. This includes the files listed in the previous chapter, plus other files which NOS generates at runtime.
Examples of all the text files are included in Appendix 3.
The Directory Tree
The complete directory/file tree for NOS is shown in Fig 12-1 on the next page. NOS can reside in any directory on any drive, but as explained earlier, its best to allocate a new drive letter for NOS (e.g. N:), using the DOS SUBST command. This has the advantage that the path declarations in the NOS control files are kept simple, and, more important, it prevents people browsing through your private files when they log into your system. You dont want other people climbing too high up your tree!
The NOS directories under drive N: are as follows:
/: The root directory contains most of the files for controlling NOS.
/dump: This directory is for log and trace files.
/dump/record: Holds session recordings and files downloaded from a mailbox.
/dump/trace: Holds trace files.
/finger: The NOS finger command allows you to "put the finger on somebody"; i.e. find out more about them. The finger directory contains one or more text files with information about yourself (the so-called "brag" files).
Fig 12-1: The complete NOS file tree. DOS filenames are in capital letters, NOS filenames in lower-case. Filenames in light text are created by NOS at run-time.
/public: This is a general-purpose directory which anyone can access when logged into your system. The directory contains files for general consumption, and certain nominated users can also write into it.
/public/masters: This directory contains master copies of the NOS control files. The files in this directory are read-only, to prevent accidental damage.
/public/nosdocs: The nosdocs directory contains a set of miscellaneous NOS documentation files. The files in this directory are also read-only.
/public/nosview: This directory contains the complete set of NOSview reference documentation files, so that other people can read them to find out more about NOS. The files in this directory are read-only. DOS drive letter V: also points to this directory, so that you can instantly access NOSview.
/scripts: This directory contains scripts for use with the NOS source command, together with dialer scripts for setting up a modem or tnc.
/spool: The spool directory contains a number of files to do with mail handling.
/spool/help: The help subdirectory contains a set of help text files used by the built-in NOS mailer.
/spool/mail: This is the default directory for incoming mail, for outgoing POP mail, and for outgoing mail to be forwarded into the PBBS network.
/spool/mqueue: This is the directory containing all outgoing mail awaiting SMTP forwarding.
/spool/news: This directory contains files received from the news network with the NNTP protocol.
/spool/rqueue: The rqueue directory is an alternative directory for incoming mail (i.e. instead of /spool/mail).
/spool/signatur: This directory holds one or more text files containing your "signature" to be appended to messages which you send with the NOS BBS.
/tmp: This directory is for temporary work files.
This section describes the DOS files required by NOS.
C:\AUTOEXEC.BAT: (see page 312 for listing) This file serves its usual purpose during DOS startup. The only special requirement is that it includes a CALL to NOSENV.BAT, to set up the correct working environment for NOS. If you include any TSRs in AUTOEXEC.BAT, it is recommended that you load them in upper memory, to free up as much conventional RAM as possible for NOS. Further, you may also care to use a utility such as Quarterdecks VIDRAM to free up the PCs graphics buffer area, thus making it available to NOS.
C:\CONFIG.SYS: (page 317) The usual DOS configuration file. The only special requirements are the inclusion of the LASTDRIVE environment variable (allowing us to define a number of SUBSTituted drives), and the use of the /E option with the SHELL variable to make the DOS environment space large enough.
C:\DOS\ANSI.SYS: The usual device driver for screen and keyboard handling. Alternatives such as NANSI.SYS, ZANSI.SYS or VGAANSI.SYS are equally suitable here.
N:\AX25.COM: The special TSR driver for the Baycom modem.
N:\CLEANQ.BAT: (page 317) This batch file removes any unsent messages and lock files from the outgoing mail queue, and any unsent messages awaiting PBBS forwarding. This is a useful utility for cleaning up after experimenting with mail handling off-air.
N:\NOSxxxxx.EXE: This is the NOS runtime executable. The letters xxxxx represent a date code or version number.
N:\NOSENV.BAT: (page 325) Called by AUTOEXEC.BAT at DOS startup, this file initialises the NOS environment. There are six SUBST commands to define new drive letters:
M: defines the incoming mail queue
(useful for taking a quick look at files in the queue)
N: defines the NOS root directory
Q: defines the NOS outgoing mail queue
(useful for taking a quick look at what is in the queue)
R: defines the NOS record directory
(useful for taking a quick look at downloaded files)
T: defines the NOS trace directory
(useful for scrolling through trace files)
V: defines the NOSview directory
(useful for examining NOSview files)
NOSENV.BAT also contains a number of environment variable definitions:
HOME: this is the home directory
for the external mailers (BM,
PCElm and ELM).
MAILER: this is the name of
the external mailer which you
call when you give the NOS mail command.
TMP: this the the name of the
temporary directory for the
TZ: this is the time-zone, used by mailers.
USER: this is the name of the user, used by the ftp command.
NOSENV.BAT then calls the VIEW TSR. VIEW is quite large (around 13 KB), so you should load it into upper memory if possible.
Finally, NOSENV.BAT installs the device driver(s) for devices which NOS does not support directly. This will be necessary for devices like Ethernet adapters, or for the Baycom AX.25 driver (AX25.COM).
N:\PCELM.EXE: PCELM is a popular external mailer, invoked with the NOS mail command. The DOS environment variable MAILER specifies the name of this file. (Alternative external mailers commonly supplied with NOS are ELM and BM).
N:\PCELM.MSG: This file contains the text of PCElm help and status messages. You can edit this file to provide help in different languages if you wish.
N:\PCELM.RC: This is the startup file for PCELM (rc means "run commands"). The corresponding startup files for ELM and BM are, predictably, ELM.RC and BM.RC.
N:\REMOTE.BAT: (page 326) This batch file runs NOS in a continuous loop, and is intended for use at remote site locations. If NOS stops running for some reason, DOS goes back to the beginning of the loop and restarts it.
N:\STARTNOS.BAT: (page 328) This is a simple DOS batch file that starts NOS running.
N:\UUENCODE.EXE: This command performs binary-to-ASCII file conversion. Encoding of 8-bit binary files into 7-bit ASCII is necessary prior to uploading/downloading of binary files to/from the NOS BBS (This is only required for AX.25 users of the BBS. FTP can handle 8-bit binary file transfer without encoding).
N:\UUDECODE.EXE: This command converts uuencoded files from ASCII back to binary.
N:\VIEW.COM: This is the VIEW fileviewer from Clockwork Software.
N:\VIEW.HLP: The help file for VIEW.
N:\WD8003E.COM: This is an example of a Clarkson Ethernet driver.
This section describes the complete set of NOS files. All the file pathnames given below are relative to the NOS root drive, N:.
/alias: (page 311) The alias file contains a list of alternative names for mailing, allowing you to use easily-remembered names when sending mail. Also, the file can contain distribution lists for sending messages to groups of people.
/autoexec.nos: (pages 312-317) This is the big daddy of the NOS control files. The name autoexec.nos is the default name for this file, but you can choose a different name if you wish. You can create a number of different startup files for different situations or configurations, and switch quickly from one scenario to another without having to edit the startup file every time.
In this chapter we only look at the main functions of this file, and then in later chapters we will analyse each of the functions in detail. The main sections of autoexec.nos are as follows:
Miscellaneous Setup: These commands are for general NOS housekeeping.
Domain Defaults: These defaults make it easier to use domain addressing. They let you use simple commands like ftp ns9ken instead of the full ftp ns9ken.ampr.org, and in status reports you will see host names displayed as ns9ken rather than the less meaningful 22.214.171.124.
Station Identification: Here you define your IP and AX.25 addresses.
TNC Setup: The commands in this section initialise the tnc at the physical level. The attach command defines the interface name (tnc0), so that later commands can use this name when addressing the interface. The dialer script kisson.dia switches the tnc to KISS mode, and the param commands set up various parameters inside the tnc.
The Baycom AX.25 Packet Driver: This command makes the link between NOS and the Baycom AX.25 driver TSR.
Setting up AX.25: Here you define the usual parameters for the AX.25 level.
Other Interfaces: At this point in the startup file are commands for defining interfaces for the Ethernet adapter and for an AX.25-over-IP (axip) "wormhole" link.
Interface Configuration: The ifconfig command lets you define broadcast and network mask parameters for the tnc interface.
TCP/IP defaults: Here are the initial values for critical TCP and IP parameters.
Starting Network Services: This is where you start all of the network servers (listeners). Once these are running, clients on other machines can then establish communication with them.
NET/ROM Configuration: Where TCP/IP traffic is carried over a NET/ROM link it is necessary to set up a large number of NET/ROM parameters. These commands start the NET/ROM server, define your own NET/ROM alias (#BOB in the example), and initialise a number of timers and counters.
NET/ROM Filtering: In some instances it may be preferable to accept NET/ROM broadcasts from only a limited number of nominated stations, rather than to accept broadcasts from any station which might be in range. The netrom nodefilter commands let you nominate the stations of interest (or alternatively filter out unwanted stations).
IP Routing Table for NET/ROM: This table is required for NOS stations which are contacted via NET/ROM.
The ARP Table for NET/ROM: The ARP table specifies the relationship between IP hostnames and NET/ROM callsigns.
NET/ROM Routing: Entries in this section let you set up the NET/ROM routing table.
AX.25 Routing: The entries in the AX.25 routing table allow you to specify any digipeaters in paths to AX.25 destinations.
AX.25 Modes: Here you can specify whether virtual circuits or datagrams are to be used.
More ARP Table entries: This part of the file contains more ARP table entries specifying the relationship between IP hostnames and AX.25 callsigns (or Ethernet adapter addresses).
IP Routing Table: The IP routing table contains entries for groups of stations and/or individual stations, specifying the local interfaces to be used and the hostnames of remote IP gateways which will handle the traffic.
Routing Interface Protocol: The RIP commands control IP routing table broadcasts, and allow you to filter particular broadcasts in a similar way to NET/ROM node filters.
RSPF: The RSPF commands are an alternative to RIP.
Hop Check: These commands specify timer constants for use with the hop commands when tracing the availability of particular routes.
Remote Control: These commands kick other hosts within radio range into life. The resulting traffic thus forces an automatic update of the routing tables.
Setting up the NOS BBS: The smtp commands initialise SMTP mail forwarding. The smtp kick command forces the SMTP client to scan the outgoing mail queue and to forward any IP mail. The mbox kick command wakes up the mailbox client and forces it to forward any AX.25 PBBS mail.
POP Commands: These commands configure the POP mail forwarding service.
FTP Defaults: These parameters specify how FTP is to transfer files by default.
Function Key Definition: The script fkeys.scr contains definitions for all of the function keys and cursor keys. These definitions let you execute frequently-used NOS comands with just one or two keystrokes, making it much easier to drive.
/domain.txt: (pages 318-319) The domain.txt file contains a list of station names, such as ns9ken.ampr.org, together with their corresponding IP addresses. (In some versions of NOS, this file is called hosts.net and has a different format).
/ftpusers: (pages 322-323) The ftpusers file contains a list of people who are allowed special privileges on your system, when using the ftp command or when logged into your mailbox. You can therefore give permission to specific individuals to create, write or delete files in nominated directories, and let them access various network ports via your mailbox. And you can even let them operate your station remotely if you want!
/net.rc: (page 324) The net.rc file contains username/password pairs for one or more remote hosts. When you ftp to those hosts, you will be automatically logged in and can start FTP transfers immediately.
/netrom.sav: This file is created when you give the netrom save command. It contains the dynamic NET/ROM routing table entries which have been received in broadcasts. You can later give the netrom load command, which will read this file and restore the NET/ROM routing table to its original state at the time when the file was created. This means that you dont have to wait for new broadcasts after restarting NOS.
/popusers: (page 326) This file contains a list of username/password pairs used with the POP mail forwarding protocol.
/seqf: This file is maintained automatically by the ELM mailer, and contains the current message number for an outgoing message.
/signatur: (page 327) This file contains the text to be appended to the end of any messages you send with the PCElm mailer. Note that there is a separate signature subdirectory which is used by the NOS built-in mailer; see below. [Having two different methods of adding a signature to a message, depending on whether youre using PCelm or the NOS BBS, is just plain silly and should be unnecessary. However, we have to live with it at present].
/dump/session.log: The session log is maintained by NOS, and contains NOS startup and shutdown times, together with a detailed record of almost everything that NOS does. This is invaluable when trying to find out what actually happened and what didnt!
/dump/record/*.*: These files are session recordings (created by the NOS record command) or files downloaded from a BBS.
/dump/trace/*.*: The files in this directory contain full trace information of packet traffic sent and received by this station. These trace files are essential when setting up NOS and debugging.
/finger/sysop: (page 329) This is an example of a "brag" file. When a remote user gives the command finger sysop@ns9bob, this file is sent to the user, and tells him all about you.
/public/masters/*.*: These are master copies (read-only) of the NOS control files.
/public/nosdocs/*.*: These are miscellaneous NOS documentation files.
/public/nosview/*.*: These are the on-line NOSview documentation files.
/scripts/fkeys.lst: (page 319) This is a text file which is displayed when you hit the F1 help key. It lists all the function key definitions.
/scripts/fkeys.scr: (pages 320-321) This is the file which programs the function keys and cursor keys, and corresponds to the fkeys.lst file.
/scripts/kisson.dia: (page 324) This script sets the speed of the PC-to-tnc serial link to 4800 bps, and then sends a number of asterisks to the tnc. Hopefully the tnc will recognise them and autobaud into native command mode. The script then sets up the tnc with your callsign and Morse ID (MID) interval; the value 84 corresponds to 840 seconds (14 minutes). Finally, the script sets the tnc into KISS mode.
This script was written for a PK-88 tnc; you may need to change it if you have a different tnc.
/scripts/tncreset.dia and tncreset.scr: (pages 329-330) These scripts reset the tnc to native mode.
/spool/areas: This text file is used by the NOS BBS, and is output in response to the BBS A command. It contains a list of public mailbox names.
/spool/forward.bbs: (page 321) The forward.bbs file specifies how and when messages are to be forwarded onto the AX.25 PBBS network.
/spool/history: The history file is generated by the built-in NOS mailer, and contains a list of received bulletin IDs. If a bulletin arrives in the system with an ID which already exists in the history file, NOS rejects it.
/spool/mail.log: The mail log contains details of every attempt to send and receive mail. This is where to look if mail transfer is not working.
/spool/rewrite: (page 327) The rewrite file contains the rules for re-addressing mail (e.g. for forwarding onto the PBBS network).
/spool/help/*.hlp: These are short text files containing instructions on how to use the NOS BBS commands. There is one file per command.
/spool/mail/*.txt: The .txt files contain incoming messages, which you can then read with a mailer. There is one file per individual user and one per public mailbox area; for example, all of NS9BOBs messages are in file ns9bob.txt, and all bulletins in the TCPIP area are in the file tcpip.txt.
In addition, there may be other .txt files in this directory, for outgoing mail to be forwarded into the AX.25 PBBS network or for POP forwarding.
/spool/mqueue/*.txt: The .txt files in this directory contain the text of outgoing messages.
/spool/mqueue/*.wrk: The .wrk files contain message To: and From: information, together with the name of the host to which the message is to be sent.
/spool/mqueue/*.lck: The .lck files are lock files which SMTP creates when attempting to send a message.
/spool/mqueue/sequence.seq: This file is maintained automatically by the NOS BBS and PCElm mailers, and contains the current message number for an outgoing message.
/spool/news/*.*: The files and subdirectories below /spool/news are used by the network news protocol NNTP.
/spool/rqueue/*.txt and /spool/rqueue/*.wrk: This directory is an alternative to the default incoming mail directory (/spool/mail). The .txt files have the same format as those in the default mail directory. The .wrk files have a similar but not identical format to those in the default mail directory.
/spool/signatur/*.sig: The signature files in this directory are short text files which the built-in NOS mailer automatically appends to the end of messages which you create. Which file is used depends on how you log into the NOS BBS. If you log in as ns9bob, then the mailer uses the signature file ns9bob.sig, but if you log in as sysop, then sysop.sig is used instead.
Note that these signature files are used by the NOS BBS. If you use the PCElm mailer, the file /signatur will be used instead.
/tmp/*.*: The files in this directory are temporary working files, usually created by external mailers.
Back to Contents Page
Back to NOSintro Main Page.