JNOS Commands Manual - The D Commands


Jump/Index Table


Quick Headings Reference List





The D Commands


delete <filename>

     Deletes the specified file. <filename> may include a complete
path. Functions the same as the DOS Delete command.


dialer

        dialer <interface> [<dialer_file> [<seconds>
        [<pings> [<hostid>]]]]

        Set up an autodialer session for the interface. Whenever
        the interface is idle for the interval in <seconds>, the
        autodialer will ping the <hostid> if specified, or send
        a link-layer echo request if possible and no ping target was
        given. If there is no incoming data after <pings> attempts,
        the autodialer will execute the special commands contained in
        the <dialer_file>.

        If no <dialer_file> is specified, a previous dialer command
        process will be removed. If the number of <pings> is omitted,
        the <dialer_file> will be executed without first pinging
        the <host>.

        The <dialer_file> may have any valid name, and is located
        in the JNOS root directory unless a full pathname is provided.
        The dialer commands in the file are described below.

        >> Examples:  dialer sl0 ns9tel.dia 30 10 ns9tel


     DIALER FILE COMMANDS

       control down | up

        Control the 'asy' interface.  The 'down' option drops DTR  (and
        RTS except in the Unix version).  The 'up' option asserts DTR
        (and RTS except in the Unix version).

        >>  Example:  control down

        Actually, other options beside down and up are allowed,
        provided they are supported by the param command for the
        dialer's interface.

        >>  Example: control dtr 1


       send <"string"> [<milliseconds>]

        This dialer command will write the specified string to
        the interface. The string quote marks are required, and the
        string may not contain embedded control characters.  However,
        the standard C string escape sequences are recognized (but
        \0 should not be used).  If <milliseconds> is specified,
        the <string> characters are sent with a <milliseconds>
        inter-character delay, useful for ancient Micom switches!

        >> Example:  send "atdt555-1212"


       speed [ 115200|57600|38400|19200|9600|4800|2400|1200|300 ]

        This command sets the speed of the interface to one of the
        available speeds.  If the speed argument is missing, the speed
        will be displayed in the dialer session window.

        >> Example:  speed 1200


       wait <milliseconds> [ "test_string"  [speed|ipaddress]]

        If only the time is specified, the dialer pauses for the desired
        number of milliseconds.  Otherwise, the dialer reads until the
        <test_string> is detected on the interface.

        If the string is not detected within the desired time, the
        autodialer will reset.  The string quote marks are required, and
        the string may not contain embedded control characters. However,
        the standard C string escape sequences are recognized (but \0
        may not be used).

        If the "speed" keyword is specified, the dialer will continue to
        read characters until a non-digit is detected. The string read
        is converted to an integer, and used to set the interface speed.
        If the trailing non-digit is not detected within the desired
        time, or the integer value is not a valid speed, the autodialer
        will reset.

        If the "ipaddress" keyword is specified, the dialer will continue
        to read characters until a dotted-quad IP address is detected.
        The numeric address is used to set the interface IP address.
        If a trailing non-digit is not detected within the specified
        time, or the address is invalid, the autodialer will reset.
        This option is only available when SLIP was #define'd at compile
        time, since PPP protocol supports address negotiation.

        >> Example:  wait 45000 "CONNECT " speed 
        >> Example:  wait 5000 "Assigned IP address is" ipaddress


     DIALER FILE EXTENDED COMMANDS


       failmode  [ on | OFF ]

        'failmode' establishes whether the dialer should continue after
        a failed dialer command.  <off> implies abort the dialing
        script, while <on> means continue the script, which in
        effect enables the 'ifok' and 'iffail' commands.


       begin

        'begin' starts a block of commands, and is typically used after
        an 'ifok' or 'iffail' command.


       end

        'end' terminates a block of commands, which extends to the
        previous unpaired 'begin'.


       exit [<return_code>]

        'exit' ends the dialer script, with the result code set to
        that of the previous dialer command unless <return_code>
        is specified.


       status  [ up | down ]

        'status' is similar to the 'control' command, except that the
        iostatus() routine is notified.


       ifok <cmd>

        'ifok' invokes the dialer command <cmd> if the previous
        command was successful.


       iffail <cmd>

        'iffail' invokes the dialer command <cmd> if the previous
        command was not successful.


       verbose  [ ON | off ]

        'verbose' sets the verbosity level of the dialer, that is,
        whether the dialer echoes the script commands as they are read
        and displays output received during the wait command.  The "off"
        setting is recommended for those well-debugged scripts used
        with the ping/redial option. The verbose setting is retained
        across dialer invocations.


DIALER EXAMPLE FILE

The following dialer script will perform these steps: . drop DTR &
RTS to force a hangup . wait 2 seconds and then raise DTR & CTS . set
the port speed to 9600 baud and initialize the modem . dial a number
. turn on continue-after-error mode . wait for the modem to return
a CONNECT message . abort if a BUSY was received instead of CONNECT,
or dial-out failed . try three times to send a CR and obtain a Login:
prompt . send my login name, password, wait 5 seconds and then exit

#verbose off     [enable when well-debugged, to eliminate most output]
control down wait 2000 control up speed 9600 send "atz\ratm0l0e0\r" wait
1000 send "atdt555-1212\r" # Let's assume a BUSY will always be detected
within 10s, and a connect #ALWAYS  takes longer.  Also, if we invoked
dialer with the ping options, #this gives us an eventual busy redial.
-- n5knx failmode on wait 10000 "BUSY" ifok exit 1 wait 60000 "CONNECT"
iffail exit wait 2000 send "\r" wait 5000 "ogin" iffail begin
 send "\r" wait 5000 "ogin" iffail begin
  send "\r" wait 5000 "ogin" iffail begin
   control down exit 1
  end
 end
end wait 1000 send "myname\r" wait 5000 "assword"
  iffail begin
   control down exit 1
  end
wait 1000 send "mypassword\r" wait 5000 exit



domain <subcommand>

     The domain commands control and show the working of the name to
Internet address mapping software (referred to as DNS: Domain Name
Service).  JNOS has both a DNS client and a server.  The server will
answer queries from data in the domain cache, and from information
stored in the DOMAIN.TXT file.  The DNS server is only available when
DOMAINSERVER is #define'd in config.h, but the DNS client is always
available.


    domain addserver <hostid> [<timeout>]

     Add a domain name server to the list of name servers.

     <timeout> is an optional timeout setting in seconds for
     this server.  If <timeout> is not included in the command,
     the value defaults to 3 * (tcp_irtt).  Servers are queried in the
     opposite order in which they were added.

     Example:  domain addserver wg7j.ece.orst.edu 30
               domain addserver 128.193.48.1
               domain addserver ucsd.edu


    domain cache <subcommand>

     Following commands work on the domain cache. These are resource
     records held in memory. (described in  RFC1033/1034)


      domain cache clean [<yes | NO>]

         Displays or sets the discard of expired resource records.
         expired records have their time-out value decremented to zero.
         Normally resource records get a default time-out value of
         1800 seconds.  After this time they are considered "old"
         and if referenced again the domain name resolver should be
         inquired again.  When clean is off (the default), expired
         records will be retained; if no replacement can be obtained
         from another domain name server, these records will continue
         to be used.  When clean is on, expired records will be removed
         from the file whenever  any new record is added to the file.
         domain cache clean yes


       domain cache dump

        Immediately clears the domain cache.  This amounts to being a
        "flush".


       domain cache list

         This command shows the current content of the in-memory cache
         of resource records.


       domain cache size [<size>]

         Display or set the maximum size of the local  in-memory domain
         cache. Default is 5.

            domain cache size 10

      domain cache wait [<secs>]Default: 300

        Display or set the number of seconds which must elapse before
        the domain.txt file is updated from the resource records stored
        in the domain cache.  Upldating is controlled by the 'domain
        update' command (see also).


    domain dns [on|off]

      Display or  toggle the state of the Domain Name Server. If on,
      the system is active as a Domain Name Server. The system will
      then answer queries from other tcp/ip hosts regarding hostname
      to ip-address, and ip-address to hostname translations. The dns
      subcommand is only available when DOMAINSERVER was #define'd when
      JNOS was compiled.


    domain dropserver <hostid>

     Remove a domain name server from the list of name servers.
     You are warned when you delete the last name server.

        domain dropserver ece.orst.edu


    domain listservers

     List the currently configured domain name servers, along with
     statistics on how many queries and replies have been exchanged
     with each one, response times, etc.


    domain look <search_text>

     This command searches domain.txt and displays records matching
     <search_text>.  The suppoed <search_text> must match exactly,
     i.e., case is significant. This subcommand is available only if
     MORESESSION was #define'd when JNOS was compiled.


    domain maxclients [<N>];

      Command to limit loading, N=number of clients,  while acting as
      a Domain Name Server.  Default is 6.


    domain maxwait [<time-out>]

     This sets a time-out value (1 to 255 seconds) to a query or domain
     name server. This is not set for an already defined server but
     will be used for a newly defined name server. Also the value is
     used for domain name lookups (E.g. when a user does a telnet to
     a host with the mailbox'T host' command). Note that (PC based)
     name servers can have trouble finding records in a large database.
     Default is 60 seconds.

        domain maxwait 10


    domain query [<hostid>]

      Displays the results of a DNS query for <hostid>.


    domain retries [<retries>]

     The retry value (number) limits the number of queries sent out
     to remote domain  name resolvers before giving up and telling you
     that host xyzzy.ampr.org does not exist.  The total time lost
     with a query is (retries * time-out * number of domain servers
     defined); i.e., the delay between requesting a hostname to ip-
     address translation and getting the answer can become very long
     if you use many servers, and set the time-outs/retries high !
     Default is 2.

        domain retries 1


    domain subnet [ON | off]

     This command works in conjunction with 'domain translate' to
     allow or disallow translation of any address ending in 0 or 255.
     On systems which have a lot of subnets, turning off subnet
     translation can result in a considerable speedup when displaying
     routes with 'domain translate on'.


    domain suffix [<domain suffix> | none]

     Display or specify the default domain name suffix to be appended
     to a host name when it contains no periods.  For example, if the
     suffix is set to "ampr.org." and the user enters 'telnet ka9q',
     the domain resolver will attempt to  find 'ka9q.ampr.org.' If the
     host name being sought contains one or more periods, however, the
     default suffix is NOT applied if the last part of the name is less
     than 5 characters and contains only letters; e.g., 'telnet foo.bar'
     would NOT be turned into 'foo.bar.ampr.org.' 'telnet foo.ka9q'
     will be turned into 'foo.ka9q.ampr.org.' Note  that a trailing
     dot (.) is required for the suffix.  If the suffix is the string
     'none' (without trailing period), the current suffix is cleared
     and forgotten.  Default is "ampr.org."

        domain suffix ece.orst.edu.


    domain trace [on| OFF]

     Display or set the flag controlling the tracing of domain server
     requests and responses. This only works when console is enabled.
     Default is off.

        domain trace on


    domain translate [on | OFF]

     Display or set the flag that controls the translation of ip
     addresses in dot notation into symbolic names. The translation
     process makes heavy use of reverse domain name lookups. Do not
     set this flag unless you have a good and fast connection to a
     domain name server.

        domain translate on


    domain ttl [ttl]

     Select a default 'ttl' value to be applied to server responses
     than contain none.


    domain update [on | off]


     Controls whether or not domain.txt file is updated with server
     responses.


    domain verbose [on | off]

     Display or set the flag controlling the return of a full
     name (on) or only the first name (dot delimiter) (off).
     This is for IP address to name translation only.  If off,
     home.wg7j.ampr.org. will show as 'home.wg7j', whereas if on it
     will show as 'home.wg7j.ampr.org'

        domain verbose off


DOS Environmental Variables


JNOS uses a few environment variables, two of them are required for the
proper working of JNOS at all, a few are used if you compiled in the
support for callbook CD's, and others are totally optional.  Recall that
environment variables are established by the DOS "set" command, typically
in autoexec.bat, and have the syntax:  set varname=value


                             --- o ---

Required Variables:

COMSPEC

TZ This is the TIME ZONE variable. It is used throughout the code to
determine the proper time with respect to what the PC clock reports.
You may wish to set your PC clock to UTC time, and then set TZ=GMT0.
This is the simplest method, but it may be annoying to have to convert
the time when looking at your status line, or when using other software
than JNOS. A benefit is, you do not have to change anything when
daylight savings comes in effect or stops.  An alternate method requires
you to set the true local time (and to modify your pc time when daylight
savings becomes effective, since Borland C uses the USA rules for when
daylight time starts and ends), and then set TZ following this scheme:

TZ=aaabcddd
       aaa = SOLAR time zone name, e.g.: CET
 b = '+' or '-'  see the following c = UTC - Localtime (solar). If the
 value is negative b='-'
      If the value is positive b='+'
       ddd = Daylight savings zone name, e.g.: CDT

TMP This is the TEMPORARY FILES directory. JNOS puts here some files it
uses for various purposes (incoming mail, screen output when changing
session, etc.).  It is wise to set this to a directory that can be
happily erased in case something goes wrong.  Do not set TMP=c:\dos
! You would end up with a lot of rubbish. I personally have created
a c:\temp directory and have TMP point there. It may be useful also to
point TMP to a ramdrive if you have one in XMS or EMS memory, but it must
be large enough to accommodate the space demands of JNOS work files.
It should be at least twice as large as the biggest SMTP message you
expect to receive. Also, don't forget to take into account that JNOS
can be doing many tasks "simultaneously". If you do not define TMP,
JNOS will store it's work files in the root directory.

                              --- o ---

Variables required by the callbook code:

QRZDRV The QRZ callbook server needs this variable to know where the
CD is. For example: set QRZDRV=f:

QRZPATH Also needed for the QRZ callbook server, it should point to the
directory (on QRZDRV) where the callbkc.idx and callbkc.dat files are.
For example: set QRZPATH=\callbk

SAMAPI This is required by the SAM callbook code, and specifies the
decimal integer value of the samapi tsr software's multiplex id.
Example: set SAMAPI=98

                           --- o ---

Optional Variables:

TERM You can set here the TERMINAL TYPE you want to be used for the
rlogin client. Also the extended telnet options (not compiled in the
standard distributions) use this variable. 

    Example:  set TERM=vt100

USER Sets the USER NAME default to be used in rlogin and ftp client
connections by overriding default value. The Ident protocol also uses
this variable to identify the console user.

    Example:  set USER=ik5pvx

MSGUSER If you compiled in the mailmsg command, it will use this
variable to form the From: field of the message. If undefined, it will
use 'sysop'.  

    Example:  set MSGUSER=ik5pvx

NOSSYSOP, NOSPASSWD, NOSPATH, NOSPRIVS These are used to allow the sysop
to log in case the ftpusers file gets corrupted. NOSSYSOP is the username
and NOSPASSWD is the corresponding password.  NOSPATH defaults to the
root of the current disk and can be used to specify where NOSSYSOP can
go, in the same format as used in the ftpusers file.  NOSPRIVS specifies
the access privileges. It can be a decimal or a hexadecimal number,
again with the same meanings as in ftpusers. It defaults to 0x407f,
i.e. can read, erase, use the gateways, be sysop and expert.


   NOSSYSOP

      Sets username.

   NOSPASSWD

      Sets the password

   NOSPATH

      Sets the path.  If not set, it will be the root directory on the
   current drive.

   NOSPRIVS

     Sets the Privileges.  If not set it will be FTP_READ + FTP_CREATE +
     NETROM _CMD + TELNET_CMD + SYSOP_CMD + IS_EXPERT.  NOSPRIVS accepts
     both decimal and hexidecimal if "0x" precedes the value.


dump <hexaddress | .> [range]

     The dump command shows memory in hex and ascii. Hex-address is a
 32-bit value split into page address and page offset. A splitting colon
 is not used nor accepted. If decimal-range is not given, 128 bytes
 are displayed. 'dump .' displays memory starting at the end of a
 previous dump command. This command is primarily useful for debugging.

    dump 12fe0008


(Courtesy KBNorton Computer Services)