
                     -= NETFOSS - an internet FOSSIL =-
                           for Windows NT/2000/XP

                           Wide Beta version 0.7.1
                                June 16, 2002

                           Written by Mike Ehlert
                            PC Micro Systems, Inc.
                         http://pcmicro.com/netfoss
____________________________________________________________________________


 This FOSSIL [Fido Opus Seadog Standard Interface Layer] is a driver which
 allows DOS based modem communication software (ie: BBS's and Door Games)
 to work with a tcp/ip telnet connection under Windows NT4, 2000, and XP.
 
 ************************************************************************
 *  No other drivers are required. You do not need COM/IP or NETModem.  *      **
 ************************************************************************

 To learn what a FOSSIL driver is and how it works, see file: FOSSIL.TXT.


 Requirements:

        * Windows NT4, Windows 2000, or Windows XP (any version).
        * A Win32 Telnet Server (several are available for free).
        * DOS applications designed to communicate with a FOSSIL
          (Such as a BBS or a BBS door).

____________________________________________________________________________

 Installing
 ----------

 Place the following files into a directory:

 NF.BAT        The batch file used to load/unload netfoss (and the door)
 NETFOSS.COM   The FOSSIL loader
 NETFOSS.DLL   The FOSSIL Virtual DOS Driver
 NETCOM.EXE    The Communication Engine and application loader
 NETFOSS.TXT   The NETFOSS documentation (You are reading it now)
 FOSSIL.TXT    Technical Reference: FOSSIL implementation and use 

 **********************************************************************
 * Only NETFOSS.DLL is _required_ to be located in the %PATH%.        *
 * Important! >>> If it is not in the path, it will NOT BE FOUND. <<< *
 **********************************************************************


 Edit your NF.BAT file and change any of the paths there as needed.
 Do not add any "CD\" commands to the batch file, or it will not
 be able to find a door32.sys file which it expects in the current
 directory if no /n{node} and /h{handle} parameters were passed on
 the command line. (See section below for details on this).

 If your BBS does not support DOOR32.SYS, you will need to make an
 additional change to your NF.BAT file as shown in the non-door32.sys
 mode section below.

 You can rename NF.BAT to NF.CMD if you like, which will use the
 NT cmd.exe command processor instead of command.com.


 Note that NETFOSS supports any COM port value, on all nodes.
 This allows BBS programs and doors that were designed to only support
 FOSSIL ports COM1 though COM4 to work on any node. To take advantage
 of this, you could set all nodes to use FOSSIL port COM1. NETFOSS
 totally ignores the com port numbers that it is given. It matches up
 each node number with a WinSock handle value.


____________________________________________________________________________

 DOOR32.SYS Mode
 ---------------

 If you are using NETFOSS with a DOOR32.SYS compatible BBS, such as
 EleBBS, Synchronet, WWIV v5, then you do not need to pass the node number
 or the WinSock handle to either NETFOSS or NETCOM. Instead they can be
 automaticly read from the DOOR32.SYS file located in the current (nodes)
 directory.

 Mystic BBS (1.07.03) has issues requiring a work around (described below).

 If your Win32 BBS does not automaticly start a batch file in the current
 nodes directory (Synchronet does not do this for some reason) then you
 would have to change to the nodes directory in the beginning of your
 NF.BAT file. This is not required for most BBS programs.


 You will need to edit the door command line for each of your doors.
 A typical type-7 command line in EleBBS would look like this:

 C:\BBS\NF.BAT c:\bbs\lord\start.bat *N
 ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
    |                     |
 This loads NETFOSS.     This is the batch file that runs a door.

 Note that NF.BAT is not passed any information which node or Winsock
 handle to use. That is because both netfoss.com and netcom.exe will
 find this information by reading the DOOR32.SYS from the current
 directory.

____________________________________________________________________________

 Non-Door32.sys Mode
 -------------------

 For a DOS based BBS, you will *need* a front end telnet server to
 answer incoming connections, and pass them to the BBS software.
 The following Telnet servers have been tested with NETFOSS:

 * TELSRV by Mannsoft. A simple Win32 BBS telnet server. Freeware.
   http://mannsoft.ca/telsrv.php

 * Argus by Ritlabs. A complete front-end/mailer. Freeware open/source.
   http://www.ritlabs.com/argus

 * Beemail by Graphic Expressions. A complete front-end mailer. Shareware.
   http://www.beemail.gexonline.net



 Note that NETFOSS is not a modem emulator (like COM/IP) so it will
 not support ATA, ATZ, RING, or other modem commands/responces.
 This just means that you can *NOT* use your DOS BBS program to wait
 for a call, and answer when it sees a RING (like COM/IP does).

 Also note that NETFOSS can not be used in combination with COM/IP,
 as it does its own WinSock TCP/IP handling, and does not support
 communicating with COM ports (real or virtual) at this time.
 It is simply a FOSSIL driver with a WinSock TCP/IP interface.


 For Non-Door32.sys mode, you will need to change one line of your
 NF.BAT file, to pass the node number to netfoss.com. This is only
 needed if your BBS can not create a door32.sys drop file.

 NF.BAT normally looks like this:

               @echo off
               c:\bbs\netfoss.com
               if errorlevel 1 goto end
               c:\bbs\netcom.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
               c:\bbs\netfoss.com /u
               :end

 In order for it to work on a Non-DOOR32.SYS environment, you will need
 to change the second line to "c:\bbs\netfoss %1" in order to pass the
 node number to netfoss.com.

 Next you will need to configure your telnet server (or a Win32 BBS) to
 pass both the node number, and the WinSock handle to the NF.BAT file,
 as parameters %1 and %2  These will need to be prefixed with the "/n"
 and "/h" switches, respectivly.
 ie:

    C:\BBS\NF.BAT /N{node} /H{handle} c:\bbs\bbsname.exe -C1 -B38400

 For example, Argus uses &n to pass the node number, and &h to pass
 the Winsock handle to an external program. So your Argus external
 command line (Config >Externals >Doors >Door Parameters) would look like:


   c:\path\nf.bat /n%n /h&h c:\path\bbs.bat -N%n -C1 -B38400
       |            |    |       |           |    |   |
   netfoss-loader   node handle  bbs-loader  parameters sent to bbs cmd line


 In this example, we assume the BBS software uses -C1 to pass the
 current com port, -B38400 to pass the baud rate, and -N1 to pass a node
 number to the BBS software.

 Almost all DOS BBS software allows an active call to be passed from a
 front-end mailer to the BBS in this fashon, though the BBS parameters
 such as -C -N -B will differ slightly from one BBS program to another.
 Please consult your BBS documentation on the proper parameters needed
 to pass a caller from a front-end mailer to the BBS.

____________________________________________________________________________

 MYSTIC BBS Win32 USAGE
 ----------------------


 Mystic's Win32 telnet server (TSERVER.EXE) had problems with earlier
 versions of NETFOSS, because it did not set the socket for non-blocking
 mode. NETFOSS now attempts to force the socket to use non-blocking mode.

 Another issue is that under Windows NT/2000/XP, Mystic BBS version 1.07.3
 will crash with an exception error when attempting to create a door32.sys.

 Mystic was not designed to create both a door32.sys and a standard drop
 file at the same time. I have heard of at least two people who have
 a kluge script to create both a door32.sys and a standard door dropfile
 allowing NETFOSS to work with Mystic in door32.sys mode, but here is how
 to do it without using the door32.sys:


 1) If you have problems using Mystic's TSERVER.EXE you can use a
    replacment telnet server such as TelSrv by Mannsoft, Argus by RITlabs,
    Beemail by Graphic Expressions.
    The commandline the new telnet server should use to start Mystic is:
         C:\MYSTIC\MYSTIC.EXE -N{node} -TID{socket handle}

 2) Modify one line of your NF.BAT, to pass the node number to NETFOSS.COM.
    Change the line that loads NETFOSS.COM to have a " %1" at the end.  
    (this is explained in detail in the DOS BBS section above.)

 3) Add the door to Mystic.  Tell it to create whatever dropfile you want to
    use with the door (ie DOOR.SYS, DORINFO1.DEF...anything but DOOR32.SYS)
    and use this commandline as a template:
         C:\NETFOSS\NF.BAT /N%3 /H%0 C:\LORD\START.BAT %3

   This will replace "%3" with the node number, and will replace "%0" with
   the socket handle.  Note that %3 is actually used twice in the above
   example, first to pass the node to netcom.exe, and then again to pass
   the node number to the doors own batch file.


____________________________________________________________________________


 EleBBS Win32 Usage
 ------------------

 NETFOSS was developed and tested with EleBBS Win32 using the telnet server
 included in the EleBBS package. There are detailed instructions on how to
 configure NETFOSS with EleBBS included in a seperate file: ELEBBS.TXT

____________________________________________________________________________


 PCBoard BBS Usage
 -----------------

 NETFOSS was tested with PCBoard version 15.4 for DOS.
 Here is how to configure it:

 1) Install any of the Win32 Telnet Servers listed in the non-door32.sys
    mode section above.

 2) Edit your NF.BAT file as described in the non-door32.sys mode section.

 3) Install PCBoard in the c:\pcb directory, and create a seperate directory
    for each node, such as c:\pcb\node1 and c:\pcb\node2 etc.

 4) Run PCBSETUP.EXE > Modem Information> Modem Setup.
    Set the COMM Driver to use as "F=FOSSIL, set the COM port to any
    non zero value. Setting it to "1" will work even if you have a real
    COM1 port already. Set the Opening Baud Rate to 115200, and select
    Lock in Opening Baud Rate = Yes.

 5) Create a BOARD.BAT in the PCBoard directory which looks like this:

        @ECHO OFF
        CLS
        SET PCB=/NODE:%1 /PORT1F:
        SET PCBDRIVE=C:
        SET PCBDIR=\PCB\NODE%1
        SET PCBDAT=C:\PCB\PCBOARD.DAT
        SET NODE=%1
        :top
        %pcbdrive%
        cd %pcbdir%
        if exist remote.bat REN remote.bat remote.sys
        if exist door.bat   DEL door.bat
        if exist endpcb     DEL endpcb
        pcboardm /file:%pcbdat% /C:115200
        if exist remote.bat CALL remote.bat
        if exist door.bat   CALL door.bat
        if exist event.bat  CALL event.bat
        if NOT exist endpcb GOTO top
        :end

        Note that each %1 will be replaced with the node number
        when this batch file is run. The line that actually runs pcboard
        is the "pcboardm /file%pcbdat% /C:115200". The /C:115200 tells it
        to assume that the user is already connected at that baud rate.
        The "/PORT1F" setting tells PCBoard to use FOSSIL port COM1,
        and it is perferable to set the same FOSSIL port for all nodes.

  6) Unzip the NETFOSS files into a directory, and copy NETFOSS.DLL
     to a directory located in your PATH.

  7) Configure a Win32 Telnet Server to run the NF.BAT and the BOARD.BAT
     batch files. If you are using Mannsofts TelSrv it should look like:

      Working Directory:

             c:\pcb


      External Program Command Line:

             c:\telsrv\nf.bat /n*N /h*H c:\pcb\board.bat *N

      [ ] Enable NETFOSS Support (Disabled)


    Note: If you check the "Enable NETFOSS" box, and the "/NETFOSS" directory
    containing your nf.bat is located within the TelSrv directory, then you
    can (and must) enter a simpler form of External Command Line:

          c:\pcb\board.bat *N

    Then TelSrv will automaticaly add "netfoss\nf.bat /n*N /h*H " to
    the actual command line.

____________________________________________________________________________


 RemoteAccess BBS Usage
 ----------------------
    
 NETFOSS was tested with RemoteAccess BBS for DOS version 2.62.1
 Here is how to configure it:

 1) Install RemoteAccess in c:\ra and create directorys for each node
    such as c:\ra\node1 and c:\ra\node2 etc.

 2) Create a RUNRA.BAT in the RemoteAccess Directory, which looks like this:

            cd\ra\node%1
            ra.exe -B115200 -B115200 -N%1


    The -B115200 switch tells RemoteAccess to assume that the caller is
    already connected to the modem at that speed.
    The -N%1 passes the node number, since %1 is replaced with the
    node number when the batch file is run.

  3) Unzip the NETFOSS files into a directory, and copy NETFOSS.DLL
     to a directory located in your PATH.


  4) Configure a Win32 Telnet Server to run the NF.BAT and the TG.BAT
     batch files. If you are using Mannsofts TelSrv it should look like:

      Working Directory:

             c:\ra\node*N


      External Program Command Line:

             c:\telsrv\nf.bat /n*N /h*H c:\ra\runra.bat *N

      [ ] Enable NETFOSS Support (Disabled)


    Note: If you check the "Enable NETFOSS" box, and the "/NETFOSS" directory
    containing your nf.bat is located within the TelSrv directory, then you
    can (and must) enter a simpler form of External Command Line:

          c:\ra\runra.bat *N

    This is because the rest is automaticaly added by TelSrv.

____________________________________________________________________________


 Telegard BBS Usage
 ------------------
    
 NETFOSS was tested with Telegard BBS for DOS version 3.09G2 and SP4.
 Here is how to configure it:

 1) Install Telegard, and optionally install the service pack4 for it.

 2) Create a TG.BAT in the Telegard Directory, which looks like this:

            cd\tg
            telegard.exe -B115200 -Q -N%1


    The -B115200 switch tells Telegard to assume that the caller is
    already connected to the modem at that speed.
    The -Q switch tells Telegard to exit after the caller logs off.
    The -N%1 passes the node number, since %1 is replaced with the
    node number when the batch file is run.


  3) Unzip the NETFOSS files into a directory, and copy NETFOSS.DLL
     to a directory located in your PATH.

  4) Configure a Win32 Telnet Server to run the NF.BAT and the TG.BAT
     batch files. If you are using Mannsofts TelSrv it should look like:

      Working Directory:

             c:\tg


      External Program Command Line:

             c:\telsrv\nf.bat /n*N /h*H c:\tg\tg.bat *N

      [ ] Enable NETFOSS Support (Disabled)


    Note: If you check the "Enable NETFOSS" box, and the "/NETFOSS" directory
    containing your nf.bat is located within the TelSrv directory, then you
    can (and must) enter a simpler form of External Command Line:

          c:\tg\tg.bat *N

    This is because the rest is automaticaly added by TelSrv.

____________________________________________________________________________


 Known Issues
 ------------


 Binary mode (ie: Zmodem) is not implemented yet.

 Compatibility issues with "Zone Alarm" firewall software reported.

____________________________________________________________________________


 Frequently Asked Questions:
 ---------------------------


  Q:  Does NETFOSS run under Windows 95, 98, or ME?
  A:  No.

  Q:  Does NETFOSS run under Windows NT4, 2k, or XP?
  A:  Yes.

  Q:  Does FOSS allow all DOS BBS programs and doors to run via
      a telnet connection?
  A:  Yes. (as long as they support a FOSSIL).

  Q:  Do I need to run COM/IP to get doors to work under telnet?
  A:  No. You only need a telnet server (such as the free TelSrv).

  Q:  Does NETFOSS work with Windows BBS programs?
  A:  Yes, but Window programs don't use a FOSSIL themselfs, though
      a FOSSIL is needed to run DOS doors.

  Q:  Does NETFOSS work with doors that do not support a FOSSIL driver?
  A:  No.

  Q:  Does NETFOSS work as a FOSSIL for real com ports?
  A:  No.

  Q:  Does NETFOSS work as a FOSSIL for COM/IP?
  A:  No.

____________________________________________________________________________

 License and Disclaimer
 ----------------------

 This software is being provided strictly for non-commercial use.
 It is provied free of charge for personal hobbiest useage only,
 without any warranty whatsoever. Use it entirly at your own risk.
 In no event will Mike Ehlert or PC Micro Systems, Inc. be liable
 for any damages, including loss of profits or other consequential
 damages arising from the use or inability to use NETFOSS.

 You may copy and distribute verbatim copies of NETFOSS, in any
 medium, provided that none of the files in the archive are
 tampered with and no files are added or removed.

 You may bundle NETFOSS with your own BBS software or telnet server,
 if you do not charge a fee for the product, and as long as all the
 files in the original NETFOSS archive are placed in its own sub
 directory, with no changes except for the NF.BAT file which may
 be customized as needed.

 If you wish to license NETFOSS for commercial usage, or are
 intrested in bundling it with your commercial software you will
 need to contact sales@pcmicro.com for licensing prices.

___________________________________________________________________________




 Credits:

 A big thanks to Maarten Bekers. He explained many of the Winsock
 commands that were needed by NETCOM to operate. Maarten is the author
 of ELECOM and EleBBS. I was beta testing Maartens SyncFos interface
 when I got the idea of creating a simular driver with Level-5 FOSSIL
 support included. I would never have got it working without Maartens
 encouragement and support.

 Another big thanks to Hutch for developing MASM32, making it very
 simple to design Win32 software in ASM.

 And finally, to all the beta testers who offered suggestions on
 improving NETFOSS.

____________________________________________________________________________


 Whats new:
 ----------

            0.02beta   Added support for /n{node} in netfoss.com
                       and both /n{node} and /h{handle} in netcom.exe.

            0.03beta   Optimized code, fixed win2k command line bug.

            0.04beta   Redesigned buffering routines, and in the process
                       fixed the FOSSIL peek/poke (0CH &21H) commands,
                       so now Scrabble, Axe & Fang, and any other doors
                       which previously didnt work should now be fine.
                       Fixed random input buffer garbage on first run.

            0.05beta   Reoptimized new code for additional speed. Improved
                       status returned when reading a character to allow
                       T&J software's doors to run. Check for carrier drop
                       during a function 2 (read character /w wait)
                       command. Set function 2 timeout to 30 seconds.

            0.06beta   I took a long break from NETFOSS Development. This
                       is a minor update that mainly adds support for NT4.
                       The error messages are now always returned to the
                       DOS window rather then to a pop-up window. Fixed a
                       bug in FOSSIL Function 1B (return info in FOSSIL)
                       which was not returning everything it should.

            0.7beta    Forced Echo off for non Win32 BBS software.
                       Fixed the block-read function, which was not
                       compatible with PCBoard.

            0.7.1b     Fixed buffer output bug on slower computers or
                       slow connections, thanks to Charles Ren de Cotret
                       for reporting the issue and testing the fix.
