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

                            Release version 0.6
                               June 2, 2002

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


 This FOSSIL driver allows DOS programs designed for modem communications
 to be used on a tcp/ip telnet connection under Windows NT, 2000, and XP.
 
 *************************************************************************
 *** No other drivers are needed. (You don't need COM/IP or Netmodem). ***
 *************************************************************************

 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
 ----------

 The following files should be located in 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

 ******************************************************************
 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 5, 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 bugs 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) Find a replacement for TSERVER.EXE. TELSRV by Manning is an excellent
    solution. You can download it from http://mannsoft.ca/telsrv.php
    Other choices include Argus and Beemail.
    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 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, DORINFO.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

____________________________________________________________________________


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


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


____________________________________________________________________________


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


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

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

  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:  Will NETFOSS work with any DOS based BBS programs?
  A:  Yes (as long as they support a FOSSIL).

  Q:  Will NETFOSS work with Windows BBS programs?
  A:  Yes.

  Q:  Will NETFOSS work with doors that do not support a FOSSIL driver?
  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 proftis 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.
                       Updated the documentation.

