PPPD for DOS 0.6 beta               Copyright (c) 1997 Antonio Lopez Molero


CONTENTS

        INTRODUCTION
        WHO AM I
        LICENSING
        CREDITS
        ACKNOWLEDGEMENTS
        FEATURES
        UNSUPPORTED FEATURES
        FILES
        INSTALLATION
        CONFIGURATION AND USE
        CONFIGURATION FILES
        PAP/CHAP AUTHENTICATION
        VJ HEADER COMPRESSION
        BOOTP PROTOCOL EMULATION
        PACKET DRIVER STATISTICS
        REMOVING THE DRIVER
        ABOUT THE VARIOUS DRIVER EXECUTABLES
        DEBUGGING CONNECTION PROBLEMS
        ABOUT CHAT AND CHAT0
        UNIQUE DOS CHAT FEATURES
        CONFIGURING DOS INTERNET APPLICATIONS
        SITES WITH ADDITIONAL DOS INTERNET STUFF


INTRODUCTION

    This is the second release of my DOS PPP packet driver. This work is
    derived from various sources. The bulk of the PPP code is taken from
    the ppp2.2.0f PPP daemon version, the serial port handling code is
    derived from the KA9Q network operating system, and the packet driver
    interface code is derived from the CRYNWR packet driver collection.

    I did the tedious work of joining all these pieces and making it work
    as a TSR under our old friend DOS. I learned a lot about DOS TSR
    programming and the PPP protocol internals.

    I was pushed into developing this driver by the necessity of having
    something more stable than, and not as memory hungry as, the available
    DOS PPP packet drivers. I also enjoy free software so I felt that
    contributing to it in some way would be a nice thing to do.

    DOS still alive and there are a number of applications for this driver.
    The most obvious is for surfing the NET, as there are a number of good
    DOS programs for that. I enclose a list of locations where you can find
    such applications later in document. Another interesting field of
    application is in embedded PC computers used in industrial systems. For
    some palmtop computers that can't run the Windows CE version, this
    driver is a good alternative when used in conjunction with DOS internet
    programs.


WHO AM I

    My name is Antonio Lopez (Toni). I work at the R+D dept. of a Process
    Automation firm in Spain. You can contact me at the following e-mail
    addresses:

        tonilop@redestb.es
        tonilop@ibm.net

    My English is not as good as I would like; I apologize for that.

    This work was done at home, and has nothing to do with my actual job.
    I'm responsible for the entire project. Don't bother the authors of the
    original code with bug reports; ask me.


LICENSING

    The TERMIN.COM and PKTSTAT.COM programs are copyrighted by Russell
    Nelson and are released under the GNU public license. I provided it
    only as a convenience for users. You can download it from many places.

    COMTOOL.COM and COMTOOL.DOC are copyright by K.H. Weiss. They are
    freely distributable for non commercial use. Again, I provide these
    files only as a convenience for users.

    The CHAT source code is in the public domain, so CHAT.EXE and CHAT0.EXE
    are in the public domain too.

    The PPP code on which my work is based holds the following copyright:

    ***********************************************************************
    * Copyright (c) 1989 Carnegie Mellon University.                      *
    * All rights reserved.                                                *
    *                                                                     *
    * Redistribution and use in source and binary forms are permitted     *
    * provided that the above copyright notice and this paragraph are     *
    * duplicated in all such forms and that any documentation,            *
    * advertising materials, and other materials related to such          *
    * distribution and use acknowledge that the software was developed    *
    * by Carnegie Mellon University.  The name of the                     *
    * University may not be used to endorse or promote products derived   *
    * from this software without specific prior written permission.       *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR      *
    * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED      *
    * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
    ***********************************************************************

    I release the package under the following conditions:

        All products mentioned in this documentation which are patented,
        copyrighted or are trademarks are the property of their respective
        owners.

        The various source modules written from scratch for DOS support,
        the README.TXT, SAMPLES.TXT, DOSPPPD.FAQ, CHANGELO.TXT and
        VJCSTAT.EXE files are Copyright (c) 1997 by Antonio Lopez Molero.
        All applicable rights reserved.

        DOS PPPD can be freely distributed for NON COMMERCIAL use, provided
        you include this copyright notice in all the copies or derivative
        works.  You can charge money for the process of
        copying/transferring the files, but not for the software itself.
        You can't include DOS PPPD as part of a commercial package without
        prior writen permission from the author.

        DOS PPPD IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, either
        expressed or implied, including, but not limited to, the implied
        warranties of merchantability and fitness for a particular purpose.
        The entire risk as to the quality and performance of the product is
        with the user. This documentation explicitly states that DOS PPPD
        will not work properly in some circumstances; the user assumes the
        cost of all necessary servicing, repair or correction.

        In no event will Antonio Lopez Molero be liable for damages,
        including any general, special, incidental or consequential damages
        arising out of the use of, or inability to use, DOS PPPD (including
        but not limited to loss of data or data being rendered inaccurate
        or losses sustained by the user or third parties or a failure of
        the product to operate with any other programs), even if the author
        has been advised of the possibility of such damages.

        You may use DOS PPPD only if you have read, understood and accepted
        all of the above conditions.

        Please contact me to report bugs or errors in the document (even
        minor ones). If you are an application developer or packet driver
        programmer and have constructive suggestions for improving the
        performance of DOS PPPD I'd be glad to hear from you.

    Although I have a real job, donations will be greatly appreciated if
    you feel the need to make them ;-) If you are going to use DOS PPPD in
    a bussines environment, then a donation is strongly encouraged, if only
    for ethic purposes. Please contact me for details.


CREDITS

    Credit for the PPP code goes to Al Longyear and Mike Callahan, the
    creators of the ppp2.2.0f package. The original PPP code was created
    by: Drew Perkins, Brad Clements, Karl Fox, Greg Christy, Brad Parker
    and Paul Mackerras.

    Credit for the serial port code goes to Phil Kharn, the creator of the
    excellent KA9Q Network Operating System.

    Credit for the packet driver code goes to Russell Nelson, the creator
    and maintainer of the superb CRYNWR packet driver collection.

    Credit for the BOOTP code goes to Bruce Campbell, the creator of the
    BOOTP packet driver add-on.

    I must mention Frank Molzahn, the creator of PPPPKT06. I used his
    techniques for netmask calculation based in remote/local IP addresses.


ACKNOWLEDGEMENTS

    Many people has provided feedback or even contributed to DOS PPPD
    development, The following is a partial list:

    Jeffrey L. Hayes, he was the first beta tester for 0.5 release and did
    a fine job making corrections to my poor written documentation. He also
    provided his site for hosting DOS PPPD before it was submitted to
    Simtelnet, and developed detailed instructions for use it with his ISP.

    John Lewis from the BOBCAT team, he trusted DOS PPPD enough for
    including it as part of BOBCAT browser package.

    Frank Molzhan, who provided insight into important DOS & Internet
    topics, and encouraged me for continuing DOS PPPD development. He
    recently developed a very efficient SLIP/CSLIP drivers, which are a
    very good alternative to DOS PPPD for users who still using that
    connection method.  Look in the links section for a place where to find
    his drivers.

    Ralph Shnelvar, who provided feedback and bussines oportunities for
    other DOS TCP/IP tools development.

    Richard White, who trusted DOS PPPD so much, and do use it for serious
    applications.

    Nigel Gorry, who maintains a WEB page about DOS and Internet, he
    provided suggestions for a better DOS PPPD, has put links to DOS
    PPPD archives on his page and provided some brief instructions aswell.

    Alfredo J. Coole, the developer of the enclosed SETUP program. He also
    encouraged me and provided suggestions for DOS PPPD.

    Jeff Patterson, developer of the only IRC DOS client I can use every
    day. He provided interesting discussions about DOS PPPD.

    Karl-Heinz Weiss, developer of the UKA_PPP package, he trusted DOS
    PPPD enough for including it in the UKA_PPP package.

    Jim Casey, Sysop at the Internet Resources Forum on Compuserve, who
    invited me to a forum discussing the future of DOS in Internet.

    Lots of people, in no particular order:
    Carlos V. Gutierrez Fragosa, Matthew Grimm, Sam Bushman, Follower of
    the Clawed Albino ??, Krishnamurti Subramanian, Morten Johansen,
    Pablo Carboni, Paul Koukos, Kalle Pihlajasaari, Alberto Gonzalez
    Talavan, Kevin CN Tan, Modhav Gokhale, Chris Blazie, Rian Coutinho,
    Lars Wigrell, Michael Polak, Fernando Navarro Paez, Morgan Toal,
    Soichiro Ishizuka, Super Ted, Juan H. Koers, Ki var, Brad Hlista,
    Sean Doherty, Peter Bel, Jesus Barcelo, Andre LeClaire, Yury Semenov,
    David Bernal, Agustin Vega, Don Johnson, Keith Weisshar, Ian Smith,
    Rene Ludwig, Dave Mehler, Giancarlo Guareschi, ...

    I'm probably missing people from the list, but I can't remember every
    one who contacted me, so I apologize for that.


FEATURES

    The code is compiled for an 8088 CPU, so it should run on XT class
    machines. I have no access to any XT machine, so I was unable to test
    it on one. However, users of the previous release reported success in
    using DOS PPPD on XT hardware.

    The 16550AFN UART is supported, allowing reliable communications up to
    115200 baud speed. The chip is autodetected and the FIFO enabled with
    an 8 byte receiver threshold. The transmitter is set up for a 16 byte
    output FIFO.

    The drivers conforms to FTP packet driver specification 1.09, same as
    the ones in the superb CRYNWR packet driver collection.

    Both class 1 (ethernet) and class 6 (serial line) drivers are included
    in the package.

    The class 1 drivers emulate a BOOTP server, so automatic configuration
    of DOS applications through BOOTP is possible.

    A DOS batch file for setting environment variables with the actual
    TCP/IP data for the connection is created.

    Most of the original PPPD options are supported, including PAP/CHAP
    authentication and VJ header compression. The next section covers what
    is not supported.


UNSUPPORTED FEATURES

    CCP (compression control protocol, used for negotiating data field
    compression), IPX style packets, authentication of the peer (we can
    authenticate ourselves using PAP, however), PPP server mode, PAP/CHAP
    password encryption, defaultroute option, proxyarp option, noipdefault
    option.


FILES

    DOS PPPD is distributed as a single .ZIP file, containing:

        README.TXT      This file.

        SAMPLES.TXT     Some sample configurations for PPPD use. I use 
                        these to connect to my ISP.

        CHANGELO.TXT    Summary of changes among versions.

        DOSPPPD.FAQ     An atempt to make a recopilation of common problems
                        with their solutions, based on users feedback.

        PPPD.MAN        A plain ASCII version of the UNIX pppd man page, 
                        adapted for the DOS version.

        CHAT.MAN        A plain ASCII version of the UNIX chat man page, 
                        adapted for the DOS version.

        PPPD.EXE        Class 6 (serial line) PPP driver without debug 
                        capability, no CHAP support, smallest.

        PPPDD.EXE       Class 6 (serial line) PPP driver with debug 
                        capability, no CHAP support.

        EPPPD.EXE       Class 1 (ethernet emulation) PPP driver without
                        debug capability, no CHAP support. Emulates ARP and
                        BOOTP replies to help configure DOS applications.

        EPPPDD.EXE      Same as above but with debug capability, no CHAP
                        support, largest.

        VJCSTAT.EXE     Utility for displaying VJ header compression
                        statistics. 

        PKTSTAT.COM     Utility for displaying packet driver statistics.

        TERMIN.COM      Packet driver terminator.

        CHAT.EXE        Modem connection tool for use with the 'connect' 
                        option from PPPD. It can not be used standalone.

        CHAT0.EXE       Modem connection tool for standalone use.

        COMTOOL.COM     Tiny serial port manipulation utility.

        COMTOOL.DOC     Documentation for COMTOOL.

        SPANISH.ZIP     Archive containing spanish language documentation.

        CHAPSUPP.ZIP    Archive containing driver executables with CHAP
                        support compiled in.

        SETUP.ZIP       Archive containing Alfredo J. Coole's DOS PPPD
                        Setup program.


INSTALLATION

    Create a directory of your choice, say C:\DOSPPP, and unzip the
    distribution file in it. If you are (or speak) spanish, unzip the
    SPANISH.ZIP in the same directory, all the documentation files will be
    overwritten by spanish language versions. If you do need CHAP support,
    unzip the CHAPSUPP.ZIP file in the same directory, PPP driver
    executables will be overwritten by ones with CHAP support compiled in.
    If you do want to use the helper SETUP application, unzip the SETUP.ZIP
    file in the same directory.

    After unziping the required files, you must configure DOS PPPD before
    being able to use it. For configuring DOS PPPD using the helper SETUP
    application, please read the SETUP.TXT file. If you want to manually
    configure it, please read the following sections of this document. It
    is a good idea to read them even if you are going to use SETUP.


CONFIGURATION AND USE

    I tried to mimic the original PPPD version as much as possible, so any
    experience you might have with it may prove useful with this program.

    For a complete reference of PPPD and CHAT options, look at the files
    PPPD.MAN and CHAT.MAN. These files were adapted from the original man
    pages. The SAMPLES.TXT file contains detailed configuration examples, I
    will give an usage overview here.

    The process of establishing a PPP link can be divided into two clearly
    separate actions, connection of the physical serial line and execution
    of a PPP process responsible for the actual TCP/IP communications.

    The physical serial line connection would be different for modem links
    than for cable serial links. The former requires some mechanism for
    talking to the modem, making it dial and establishing a connection with
    the modem on the other end. The latter doesn't require that step, as
    the serial ports are directly attached via a cable.

    For modem links you have two ways of making the connection. One is to
    use some program prior to PPPD execution that interacts with the modem
    and leaves the connection open after exiting. You then run PPPD, which
    takes over the link and begins its negotiations. One such program is
    KERMIT, a general purpose terminal emulator for the PC. You can also
    use the enclosed CHAT0.EXE program to connect in that way.

    The second way is to use the 'connect' option from PPPD to specify a
    program that must be run for modem handling. At the moment you can only
    use the enclosed CHAT.EXE program for this, as the COM port is
    internally handled by PPPD, and there is a private interface between
    the two programs that allows CHAT to use whatever port PPPD is
    configured to use. That is necessary because you can't do the serial
    port stuff under DOS the same way you do under *NIX. When running under
    *NIX OS, CHAT uses stdin/stdout for its I/O. Those file handles are
    redirected by PPPD to the serial port before invoking the 'connect'
    script.

    In any case you specify the serial port to use and some other stuff via
    options to PPPD. Those options can be given on the command line or
    taken from an options file. CHAT only supports command line options,
    but the CHAT script can be in a file.

    A tiny sample usage of DOS PPPD with modem follows:

        pppd com1 38400 connect "chat '' AT&F OK ATDP055 CONNECT"

    In this sample we are using the enclosed CHAT.EXE program to talk to
    the modem using the port settings inherited from DOS PPPD.

    The DOS PPPD program sets up COM1 at 38400 baud speed and then invokes
    CHAT to establish the serial link. The chat script shown expects
    nothing, sends AT&F, expects OK, sends ATDP055 and expects CONNECT. If
    all of these expect/send pairs succeed, CHAT exits with a 0 exit code
    signaling to PPPD that it can proceed with PPP negotiations. If some
    error occured during the CHAT phase, the CHAT program returns a nonzero
    exit code that signals to DOS PPPD that something was wrong with the
    connection.

    Assuming CHAT succeeds, then DOS PPPD's next job is to negotiate IP
    link establishment. Only when that link is successfully negotiated will
    DOS PPPD stay resident in memory as a packet driver. In all other cases
    the program exits with a nonzero exit code and does not remain
    resident.

    A message showing the packet driver interrupt used by the driver will
    be displayed upon successful link establishment. If the driver can't
    establish a successful PPP link, an error message will be displayed.

    The DOS PPPD exit code may be checked in DOS batch files in order to
    trigger the appropiate actions based on whether the connection was
    successful or unsuccessful.

    For directly attached computers, one would simply do:

        pppd com1 38400 local

    The 'local' option forces DOS PPPD to ignore the CARRIER DETECT line,
    which may not be available for the cable connection.


CONFIGURATION FILES

    The DOS PPPD program looks for options in several places besides the
    command line. The names and search order for the files are as follows:

        PPPD.CFG                in the current directory.
        PPPD.CFG                in the same directory PPPD.EXE is located.
        PPPDRC.CFG              in the current directory.
        command line options
        pppd 'file' option      full path given.
        PPPDCOM?.CFG            in the current directory.

    PPPD.CFG can be viewed as a global options file, as it can be located
    under the same directory PPPD.EXE resides.

    PPPDCOM?.CFG completes its name based on the COM port used, so invoking
    'pppd com1' will look for a PPPDCOM1.CFG file.

    All the files excluding the one given with the 'file' option are
    optional and don't need to exist for PPPD to operate. However, the use
    of configuration files is a practical necessity due to restrictions on
    the length of the the DOS command line.

    These files can be given hidden/system/read-only DOS attributes, as the
    PAP/CHAP passwords (if used) must be included in them. I know that that
    a very poor security implementation, but it is all that can be done
    under DOS until I implement password encryption.


PAP/CHAP AUTHENTICATION

    These methods of authentication are supported by the driver. There is
    no /etc/pap-secrets nor /etc/chap-secrets file under DOS, so I took the
    approach of implementing a new PPPD option, 'passwd'. This one, in
    conjunction with the 'user' option, provides DOS PPPD with the
    necessary data for authenticating itself with the peer. Note that there
    is no way to specify a remote name, which original *NIX pppd uses for
    selecting a secret from one of the authentication files. In CHAP mode
    the remote adds its hostname to the CHAP challenge, so the local pppd
    can look in the /etc/chap-secrets file for a secret that matches a
    particular remote host. DOS PPPD always sends the same user/passwd
    secret regardless of the remote hostname.

    A typical use would be:

        pppd com1 38400 user self passwd blah connect "chat '' ATDP055 CONNECT"

    These options can be include in a configuration file that has the
    hidden attribute, for example the file myppp.cfg containing:

        com1
        38400
        modem
        asyncmap 0
        connect "chat '' AT&F OK ATDP055 CONNECT"
        user someuser
        passwd blah2blah

    You can run PPPD with:

        pppd file myppp.cfg

    In fact, the above options could be in any of the automatic
    configuration files searched by PPPD and then you can forget the 'file'
    option.

    The 'user' and 'passwd' fields can be surrounded in double quotes in
    case there are embedded blanks or characters that may be interpreted by
    PPPD's options parser.

    An alternative source for PAP/CHAP authentication data can be given
    with the '+ua' option. You give the name of a file that contains the
    user id and the password, for example assume a file called AUTHEN.DAT:

        pppuser
        pppuser_password

    Then invoke PPPD as:

        pppd com1 38400 +ua authen.dat

    The file can have the hidden attribute set.


VJ HEADER COMPRESSION

    This release supports VJ header compression, and the driver tries to
    use it by default unless the peer forbid it during IPCP negotiations.
    VJ compression reduces the length of TCP/IP headers, and theoretically
    boosts performance over slow lines and interactive connections like
    TELNET. I said theoretically because VJ compression involves some CPU
    overhead, that might be noticed on slow CPUs (i.e. 4.77 Mhz 8088).
    There are options for disabling it (-vj, DOS PPPD will not negotiate
    nor allow the peer to use it), consult PPPD.MAN for more information.


BOOTP PROTOCOL EMULATION

    Some DOS Internet applications support a method for automatic TCP/IP
    configuration, called the BOOTP protocol. The Ethernet emulation
    versions of the DOS PPPD driver support this form of configuration,
    acting as fake BOOTP servers that generate a reply when they see a
    BOOTP request.

    In order to fully support the BOOTP protocol, I added an option that
    doesn't exist in the original DOS PPPD code. The option is 'namsrv' and
    is intended for specifiying up to two nameservers' IP addresses that
    will be sent to the application doing a BOOTP request. The rest of
    BOOTP information is generated from the local/remote IPs negotiated by
    DOS PPPD during the link establishment phase.

    The remote IP will be used for the gateway address and server address;
    the local IP will be used for 'your_ip' address. The netmask is
    calculated by the following method:

    First, a value is obtained based just on the class (i.e. class A, B or
    C) of the local IP, specifically:
    
    class A ==> 255.0.0.0
    class B ==> 255.255.0.0
    class C ==> 255.255.255.0

    If this value is consistent with the gateway's IP number, that is, if:

    ( <netmask> & <gateway> ) = ( <netmask> & <localIP> )

    [where & represents logical AND], then this value is used as the
    netmask.  (See RFC 950.) Otherwise, a different netmask value is
    chosen: it is the largest number which (a) is consistent in the above
    sense, and (b) has a binary form of 1's followed by 0's.

    This method is the same used by Frank Molzahn's PPPPKT06 driver. This
    calculated value is then binary ORed with any user supplied value
    through the 'netmask' option.

    This netmask calculation method applies to both the class 6 and class 1
    versions of the drivers, regardless of the BOOTP support.


PACKET DRIVER STATISTICS

    Starting with version 0.6 beta, the drivers support the 'get_stats()'
    packet driver function call, so it is possible to make use of the
    CRYNWR PKTSTAT program for displaying number of received packets,
    number of transmit packets, number of receive errors, etc.

    Another utility specially developed for DOS PPPD is VJCSTAT, which
    displays statistics about VJ header compression. This one is DOS PPP
    specific, so it won't work with other packet drivers.

    Both utilities should be run from the command line, and accept an
    optional parameter for the packet driver vector to look at. If you
    don't provide a vector number, the first one found in the valid packet
    driver vector range is reported.

    These utilities are useful for determining the reliability of the PPP
    connection, and for debug purposes. For example, if PKTSTAT reports a
    large number of dropped packets, but the received packet error count is
    0, then it means that some application that uses the packet driver is
    running out of buffers when packets arrive too fast. It can also mean
    that you are receiving unsupported PPP frame types, like CCP or some
    kind of Microsoft PPP protocol extensions.


REMOVING THE DRIVER

    To remove the driver, use the enclosed TERMIN.COM program. This is a
    general purpose packet driver terminator, part of the CRYNWR packet
    driver collection.

    Call it as:

        TERMIN 0xnn

    Where nn is the hex number of the interrupt vector used by the
    installed driver, i.e. TERMIN 0x60.

    The PPPD driver will send a Terminate request to the peer before being
    removed, so the TERMIN return to the command line will be delayed a
    little. This delay can be of maximum of 10 seconds, depending on how
    fast the peer responds to the terminate request.


ABOUT THE VARIOUS DRIVER EXECUTABLES

    As you noticed, there are four different DOS PPPD executables. The ones
    called PPPD.EXE and PPPDD.EXE are class 6 packet drivers (serial line),
    the later including some debug capabilities that can be used for
    troubleshooting connection problems.

    The ones called EPPPD.EXE and EPPPDD.EXE are class 1 packet drivers
    (Ethernet). EPPPDD.EXE contains additional code for debugging
    connection problems. These emulate the behavior of a real Ethernet
    driver, adding an Ethernet header to incoming packets and removing it
    from sent packets. The need for emulation comes from the fact that many
    DOS Internet applications were devised for Ethernet-only packet
    drivers, and can't handle class 6 packet drivers. The Ethernet
    emulation versions support BOOTP, a protocol used by TCP/IP networking
    code to auto-configure workstations via a centralized server.

    As noted in the installation section, a separate archive contains
    driver executables with CHAP support, but the names are the sames as
    the above ones. If you require CHAP authentication, simply replace the
    original (no CHAP support) drivers with the ones in CHAPSUPP.ZIP. I
    decided to provide it as separate executables for reducing memory
    requeriments in standar drivers if you do not require CHAP support,
    which is the most common case.


DEBUGGING CONNECTION PROBLEMS

    The executables with debugging capability generate various kinds of
    messages on DOS standard output, and others on DOS standard error. You
    can use redirection to log the standard output to a file; standard
    error can be redirected with the help of some third party utilities.

    The debug level is affected by the 'debug' and 'kdebug' options,
    supported only by the PPPDD.EXE and EPPPDD.EXE executables. Look in the
    PPPD.MAN file for a deeper explanation.

    The debugging output stops as soon as the driver goes resident;
    supporting disk I/O under DOS TSRs is a difficult task that isn't worth
    the time wasted to implement it.


ABOUT CHAT AND CHAT0

    The CHAT program takes a series of strings called the CHAT script and
    executes an expect/send sequence until it consumes all the script or
    any of the expectations fails.

    The CHAT script can be given in the command line or through a file. In
    the DOS world where command line length is restricted, the script file
    is the recommended way unless your CHAT script is very short.

    As noted elsewhere in this document, two CHAT versions are enclosed in
    the package. CHAT.EXE is intended to be used with the 'connect' option
    from PPPD. It accesses the serial port through a private interface in
    PPPD.EXE, so it doesn't require options for COM port configuration. It
    uses the port for which DOS PPPD is configured.

    CHAT0.EXE can be used standalone, as it incorporates its own routines
    for COM access. Having two versions is convenient, because you can use
    CHAT0.EXE to test your CHAT script before you actually use it with
    CHAT.EXE and the DOS PPPD 'connect' option. CHAT0.EXE will leave the
    DTR line high upon successful termination, so the modem connection will
    be active, and you can run PPPD after that. This behavior is the same
    as if you were using some other dialing program - KERMIT, for example.


UNIQUE DOS CHAT FEATURES

    After porting CHAT code to DOS, I realized that it might be useful to
    enhance it with additional features not found in the original *NIX
    version. I added two new functions, interactive terminal mode and
    string capture.

    Interactive terminal mode is useful when you log into systems which
    require convoluted prompts or/and menus, or when you don't know the
    required login sequence beforehand. Interactive mode can be entered at
    an arbitrary chat script location, so it can be used for completing
    selected parts of the login process, i.e.  user id and password. The
    CHAT.MAN and SAMPLES.TXT files contain implementation details and
    examples of CHAT interactive mode.

    String capture provides a mechanism for "grabbing" selected parts of
    text sent by the remote system and assign them to DOS environment
    variables. You can capture IP numbers, decimal numbers or arbitrary
    strings; a DOS batch file is generated by CHAT, you can execute it for
    setting the DOS environment variables. This feature is most useful for
    SLIP dial out, where the local and remote IP are reported by the remote
    through the serial line as plain text.

    Both CHAT.EXE and CHAT0.EXE support interactive mode and string capture
    functions, althought these make more sense when using CHAT0.EXE as a
    standalone dialer for SLIP links, or non standar PPP implementations
    even.


CONFIGURING DOS INTERNET APPLICATIONS

    There a number of different schemes used by DOS applications to
    configure the required TCP/IP parameters.

    Some of them support the BOOTP protocol, a feature that is supported by
    the EPPPD.EXE and EPPPDD.EXE drivers. WATTCP based applications will
    try BOOTP configuration if the WATTCP.CFG file (or equivalent) can't be
    found, or if you put a line: my_ip=bootp in such file. The POPMAIL and
    MINUET applications will use BOOTP if you leave the Network
    configuration dialog boxes blank. Consult the application documentation
    for more info about how to use BOOTP.

    If your application doesn't support BOOTP, or if you are using the
    PPPD.EXE or PPPDD.EXE drivers, the configuration must be done by
    another means. All the four drivers generate a .BAT file called IP-
    UP.BAT that is meant to be run after successful connection to set some
    DOS environment variables. Then you can use those variables inside a
    DOS batch file for generating text configuration files, for example the
    WATTCP.CFG file required by WATTCP applications.

    The IP-UP.BAT generated by the PPP drivers looks like:

        SET MYIP=xxx.xxx.xxx.xxx
        SET REMIP=yyy.yyy.yyy.yyy
        SET NETMASK=zzz.zzz.zzz.zzz
        SET PEERMRU=nnnn

    Some of the samples in SAMPLES.TXT file will make use of these
    variables to show how to configure WATTCP applications (DOSLYNX) using
    this technique.

    For MINUET and POPMAIL, the environment is searched for a variable
    called MYIP if the corresponding field in the Network configuration
    dialogs is blank. It the variable can't be found, these applications
    try the BOOTP method.

    If none of these methods is suitable, you are forced to enter the
    required configuration data every time you run the application. There
    are some cases in which command line arguments can be used for the
    TCP/IP configuration, like the PCGOPHER program (which supports BOOTP
    also).

    The file SAMPLES.TXT contains some examples derived from my actual DOS
    application configurations, including DOSLYNX and MINUET.


SITES WITH ADDITIONAL DOS INTERNET STUFF

    The following sites hold lots of good DOS Internet stuff, these are the
    places to go if you are looking for WEB browsers, mailers, etc.

    TVDog's DOS Internet page:

        http://www.agate.net/~tvdog/internet.html

    Frank Molzahn's SLIP/CSLIP packet drivers:

        http://home.cc.umanitoba.ca/~molzahn/cslip.html

    Nigel's DOS PPP applications unfinished list:

        http://www.palms.nq.net/ppp.html

    DOSLYNX home page:

        http://www.fdisk.com/

    KERMIT:

        http://www.columbia.edu/kermit/

    Althought not an Internet application in its own, kermit can be a
    invaluable terminal emulator and modem dialer. Recent versions
    incorporates the WATTCP TCP/IP kernel, so they can act as good TELNET
    clients when used with a packet driver.

    WWW Browsers for DOS:

        http://www.concentric.net/~cruzing/dosinet/dosinet.shtml

    RealmSpace for the DOS:

        http://www.best.com/~darknerd/realmspace/rsdos.htm

    DOS INTERNET FILES, INFORMATION, AND LINKS:

        http://www.westsound.com/ptmudge/dos_inet.htm

    DOS Internet home page:

        http://www.wustl.edu/~hugh/dos-www.html

