home *** CD-ROM | disk | FTP | other *** search
/ CICA 1992 November / CICA_MS_Windows_CD-ROM_Walnut_Creek_November_1992.iso / zipped / util / pktmux12.exe / PKTMUX.DOC < prev    next >
Text File  |  1992-08-21  |  107KB  |  2,214 lines

  1. /6.2//* C:\DOC\PKTMUX.DOC **** 21 AUG 92 ** 10:53 ******; G W Robinson
  2.  
  3.  
  4.                    R A L   I B M   P C   U S E R   G U I D E
  5.                    -----------------------------------------
  6.  
  7.                        PKTMUX Packet Driver Multiplexor
  8.                        --------------------------------
  9.  
  10.  
  11.       Contents
  12.       ========
  13.  
  14.       1.    Introduction and Disclaimer
  15.  
  16.       2.    Installation
  17.  
  18.       3.    Overview
  19.  
  20.       4.    Usage Guidelines
  21.  
  22.       5.    Program Description
  23.       5.1     PKTMUX.EXE
  24.       5.2     PKTDRV.EXE
  25.       5.3     PKTSTATS.EXE
  26.       5.4     WINPKT.COM
  27.  
  28.       6.    Examples
  29.       6.1     Packet Driver, PCTCP and PC-NFS Applications under DOS
  30.       6.2     MOS2 under DOS
  31.       6.3     Packet Driver and IEEE 802.3 (ISO 8802/3) applications
  32.       6.4     Packet Driver and Rainbow Applications
  33.       6.5     Packet Driver Applications under Windows 3
  34.       6.6     Packet Driver, PCTCP and PC-NFS Applications under Windows
  35.       6 7     Windows 3 Applications
  36.       6.8     Novell Netware
  37.       6.9     Packet Driver/PKTMUX/PKTDRV BAT files
  38.  
  39.       7.    Technical Description
  40.       7.1     Basic Methodology
  41.       7.2     Buffer Strategy
  42.       7.3     Channel Management
  43.       7.4     Control Programs
  44.       7.5     Listeners and /l Options
  45.       7.6     Port Duplication
  46.       7.7     IP Fragmentation
  47.       7.8     Other IP Protocols
  48.       7.9     IEEE802.3 (ISO 8802/3) Protocol Support
  49.       7.10    Use of Packet Driver Internal Buffer
  50.       7.11    Novell Protocol Support
  51.  
  52.       8.    Problem Solving
  53.  
  54.       9.    Bugs/Features and Problem Programs
  55.  
  56.       10.   Differences in PKTMUX versions
  57.  
  58.       11.   Support
  59.  
  60.       12.   References
  61.  
  62.  
  63.  
  64.       1. Introduction and Disclaimer
  65.       ==============================
  66.  
  67.       The author and his employers accept no responsibilty for any damage
  68.       done by this software.  It is run strictly at the user's risk and
  69.       all necessary precautions, such as backing up of discs, should be
  70.       taken before hand.
  71.  
  72.       Similarily the vendors/authors of applications and Packet Drivers
  73.       accept no responsibility for problems and malfunctions, and will
  74.       give no support, when their software is used with PKTMUX.
  75.  
  76.       This document describes PKTMUX which is a program that provides a
  77.       multiplexing interface to a Packet Driver. It thus allows several
  78.       IP protocol stacks to be run in parallel either under DOS or a
  79.       control program such as Windows 3 or DESQview.
  80.  
  81.       Multiplexing IP protocol stacks is a non trivial problem and this
  82.       program is only likely to meet about 90% of user requirements.
  83.       There will always be 10% who need a more sophisticated product.
  84.       Because PKTMUX makes certain probability assumptions it is also
  85.       highly likely that it will make a mistake every now and then when
  86.       they are not valid.  At best an application will recover from this
  87.       situation and at worse something, possibly even the whole PC, will
  88.       fail.  It is therefore likely that PKTMUX will never be 100%
  89.       reliable and in some situations it may be so flakey as to be
  90.       unusable.
  91.  
  92.       This documents version 1.2ß5 and differences from previous versions
  93.       are detailed in Section 10.  The programs from this version must
  94.       not be mixed with those from previous versions as they are
  95.       incompatible.  Many thanks to those around the world who have
  96.       reported problems and helped with their solution. This is an beta
  97.       test release and should NOT be distributed.
  98.  
  99.       !!!!WARNING: 1.2ß5 has test code in and a new buffer management
  100.       system so may not be very reliable. It has had very little testing
  101.       and has been put up to try and track down a problem for a user.
  102.       YOU HAVE BEEN WARNED!!!
  103.  
  104.  
  105.       2. Installation
  106.       ===============
  107.  
  108.       The system comes as a single program named PKTMUXxx.EXE where xx is
  109.       the version number, currently 12.  When this program is run it
  110.       expands into several files.  These are:
  111.  
  112.         PKTMUX.EXE      The packet multiplexor
  113.         PKTDRV.EXE      The pseudo Packet Driver interface to PKTMUX
  114.         PKTSTATS.EXE    A program state and statistics display program
  115.         PKTMUX.DOC      This documentation
  116.  
  117.       In addition a free program WINPKT.COM and a source listing
  118.       WINPKT.ASM is supplied since this provides some of PKTMUX's
  119.       functionality and is rather smaller.
  120.  
  121.       The programs should be copied into a directory in the Path such as
  122.       C:\BIN on RAL machines.  PKTMUX.DOC should be put in a
  123.       documentation directory such as C:\DOC on RAL machines.  The BAT
  124.       file INSTALL.BAT does this.
  125.  
  126.  
  127.  
  128.       3. Overview
  129.       ===========
  130.  
  131.       The Packet Driver interface was developed by FTP Software Inc as a
  132.       standardised way of accessing different makes of communications
  133.       cards.  It is widely used especially over ethernets and a large
  134.       amount of communications software is available for it.  The
  135.       ethernet implementation makes use of the fact that two bytes in the
  136.       header define the packet type and this is used to provide a
  137.       multiplexing mechanism between several packet types.  However it
  138.       looks no further into the protocol stack and thus this feature is
  139.       of limited use when protocols of the same type, such as those from
  140.       the TCP/IP family, are used.
  141.  
  142.       PKTMUX attempts to remove this limitation by providing a
  143.       multiplexing facility for Internet Protocols (IP).  This is done by
  144.       not only switching on the packet type (which denotes IP) but also
  145.       the IP protocol type (which can denote IP protocols TCP, UDP, ICMP
  146.       and others).  In the case of TCP and UDP it can also switch on the
  147.       Port number being used.  It is therefore possible to run more than
  148.       one IP protocol stack at the same time.  It is not possible to
  149.       multiplex other protocol stacks or more than one of each IP
  150.       protocol type other than TCP, UDP or ICMP.  One protocol stack can
  151.       be IEEE 802.3 (ISO 8802/3) protocol.
  152.  
  153.       PKTMUX was originally written to meet the needs of the RAL MOS2
  154.       system which is a TSR (Terminate and Stay Resident) program that
  155.       provides IBM 3270 emulation over asynchronous and ethernet
  156.       communications.  In this context it provides two functions for the
  157.       TCP/IP version of MOS2.  On is that it allows additional
  158.       communications applications to run alongside MOS2.  This is useful
  159.       because, since MOS2 is a TSR, you can hot key back to DOS and run
  160.       other commands.  Thus an LPR or FTP can be run alongside the MOS2
  161.       3270 session.
  162.  
  163.       A second requirement was to allow MOS2 to run under a control
  164.       program such as Windows 3 or DESQview.  This is an instance of a
  165.       more general problem in running an application which uses a Packet
  166.       Driver under a control program.  It arises because the Packet
  167.       Driver, which is loaded before Windows, calls the application when
  168.       it has received a packet.  This is quite satisfactory under DOS but
  169.       under Windows there is no certainty that the application is
  170.       currently running and there is therefore the risk of jumping into
  171.       the middle of another program with dire consequences.  A Packet
  172.       Driver option -w gets over this by checking that part of the
  173.       application program code is present and throwing away the packet if
  174.       not.  This leads to a rather slow data rate as the protocol timeout
  175.       and retry mechanisms have to be brought into play to recover from
  176.       the situation.  A better solution is provided by the free software
  177.       WINPKT which only works under Windows 3 Enhanced mode and uses
  178.       Windows 3 facilities to make sure the application is running.  A
  179.       copy of WINPKT is provided in this package.  WINPKT has the
  180.       drawback that it does not work with other control programs such as
  181.       DESQview and also with certain ethernet cards such as the BICC 16
  182.       bit varient.  PKTMUX meets this requirement and gives the
  183.       additional feature of being able to run communications applications
  184.       in more than one window.
  185.  
  186.  
  187.  
  188.       Given the widespread use of Packet Driver it is surprising that
  189.       nobody has written a PKTMUX before.  It is probably because a
  190.       general purpose multiplexor is impossible to implement.  PKTMUX
  191.       only attempts to meet the needs of IP protocols and is therefore
  192.       likely to be of little use in other situations.  It must however be
  193.       emphasised that PKTMUX will only work when the probability of
  194.       various identifying values being duplicated is low and that when
  195.       duplication does occur then the various retry mechanisms can
  196.       recover from the mess.  If this is not the case the PKTMUX is of
  197.       little use.
  198.  
  199.       PKTMUX has so far been tested satisfactorily with PCTCP, PC-NFS,
  200.       CUTCP and Waterloo TCP.  It also works over the RAL LLCPKT2 and
  201.       supports the RAL LLCPKT program and Novell Netware using 8137
  202.       protocol.
  203.  
  204.       Further technical details are given in the Program and
  205.       Technical Description sections.
  206.  
  207.  
  208.  
  209.       4. Usage Guidelines
  210.       ===================
  211.  
  212.       The following give basic usage guidelines.  For more detail consult
  213.       the Program Descriptions and Examples sections. All programs except
  214.       WINPKT give help when run with the /h option.
  215.  
  216.       The normal procedure for running a communications application is to
  217.       load a Packet Driver and then run the application. To introduce
  218.       multiplexing into this PKTMUX and PKTDRV must be loaded after the
  219.       Packet Driver and before the application.
  220.  
  221.       Thus under DOS type the following after you have loaded the Packet
  222.       Driver:
  223.  
  224.         PKTMUX n                ; n is the maximum number of packet
  225.                                 ; driver channels to support - default 2
  226.         PKTDRV                  ; repeated n times - displays Interrupt
  227.                                 ; used
  228.  
  229.       Then run the applications as required.  Note the first ones must
  230.       usually be TSRs otherwise you cannot get back to DOS to load
  231.       subsequent applications.  Applications which search for a Packet
  232.       Driver will find the first free PKTDRV.  Once an application
  233.       starts using PKTDRV it becomes busy and is no longer recognised as
  234.       a Packet Driver.  Note that this only happens once the application
  235.       has started communicating over the network so each application
  236.       must be got to this state before further applications are loaded.
  237.       If not then two applications will link into the same PKTDRV and
  238.       fail. Applications for which you have to specify the Packet Driver
  239.       Interrupt should be set for the highest PKTDRV Interrupt to avoid
  240.       conflicts.
  241.  
  242.       For usage under a control program such as Windows 3 run PKTMUX as
  243.       above but dont run PKTDRV until after the control program is
  244.       active.  Then run one copy of PKTDRV in any DOS session from which
  245.       you wish to use a communications application that runs over a
  246.       Packet Driver. All sessions must continue to run when in the
  247.       Background and Windows 3 must be in Enhanced mode.
  248.  
  249.       For applications that run directly under Windows 3 (eg WINQVT)
  250.       either use WINPKT or, if further packet driver channels are
  251.       required, then run PKTMUX as above and then one PKTDRV before
  252.       Windows 3 is loaded.  Then start up the Windows application which
  253.       will use this PKTDRV.  Further applications running in DOS sessions
  254.       must have their PKTDRV loaded in their DOS session before they are
  255.       run.
  256.  
  257.       The program PKTSTATS gives details of program states and various
  258.       statistics.
  259.  
  260.  
  261.  
  262.       5. Program Descriptions
  263.       =======================
  264.  
  265.  
  266.       5.1 PKTMUX.EXE
  267.       --------------
  268.  
  269.       This is a TSR that provides, in conjunction with PKTDRV, multiple
  270.       IP protocol channels to a Packet Driver. Its format is:
  271.  
  272.         PKTMUX  chan_cnt pkt_drv_int chan_time_out /options
  273.  
  274.       which installs the multiplexor on the first packet driver it finds
  275.       or hex interrupt "pkt_drv_int" is this is specified (note 1).
  276.       "Chan_cnt" channels are supported - default is 2 (note 2).
  277.       "chan_time_out" is the time in seconds a timed out channel waits
  278.       before being reset (note 6).  Any failure during loading will cause
  279.       PKTMUX to abort and set the DOS ERRORLEVEL to 1.  PKTMUX memory
  280.       usage ranges from 16K for one channel to 31K for eight channels.
  281.  
  282.       The following options modify the action taken:
  283.  
  284.         a  display additional information on loading.
  285.         b  look for and use buffer in Packet Driver (note 11).
  286.         d  drop packets if application has no buffers (note 5).
  287.         o  override use of specified interrupt (note 1).
  288.         h  display this help information.
  289.         i  support one IEEE 802.3 channel (note 8).
  290.         p  pause if error found (note 12).
  291.         q  query state of a PKTMUX (note 10).
  292.         r  reset timed out channels; rr resets internal flags as well and
  293.            should be used with care (note 6).
  294.         s  silence output except warnings (unless /ss) or errors
  295.            (unless /sss) (note 9).
  296.         t  terminate PKTMUX and Packet Driver (note 3).
  297.         u  unload PKTMUX if not being used by a PKTDRV (note 3).
  298.         v  set DOS Environment variable PKT_INT to interrupt used or
  299.            found (notes 1 & 10).
  300.         x  multiplex all received packets - testing only (note 7).
  301.         1 to 9  allocate buffers for this channel count (note 4).
  302.  
  303.       Examples are:
  304.  
  305.         pktmux               ; normal use - 2 channels
  306.         pktmux 4             ; install to multiplex four applications
  307.         pktmux 2 62          ; install on Packet Driver at Int 62
  308.         pktmux 4 /b          ; try using Packet Driver buffer
  309.         pktmux 4 /bi         ; support IEEE 802.3 and also try and use
  310.                              ; Packet Driver buffer
  311.         pktmux /u            ; unload PKTMUX (dont forget to unload
  312.                              ; PKTDRVs first)
  313.         pktmux 8 /4          ; install to multiplex eight applications
  314.                              ; but only allocate enough buffers for four
  315.         pktmux /r            ; reset timed out channels
  316.  
  317.  
  318.  
  319.       Notes:
  320.  
  321.       1.  By default PKTMUX searches for a Packet Driver and, on finding
  322.       one, takes over its interrupt effectively hiding it so it cannot be
  323.       found by any other application.  There is then no confusion between
  324.       the real Packet Driver and the pseudo ones provided by PKTDRV.  If
  325.       the /v option is given then the interrupt used is recorded in the
  326.       Environment variable PKT_INT.  Note that PKTMUX will refuse to load
  327.       if during its search for a Packet Driver either another PKTMUX or a
  328.       PKTDRV is found or if one of these is the specified pkt_drv_int.
  329.       This latter restriction can be overcome by the /o (override)
  330.       option.
  331.  
  332.       2.  By default PKTMUX supports two Packet Driver channels.  This
  333.       means it will communicate with up to two copies of PKTDRV and
  334.       provide two pseudo Packet Driver interfaces.  Each PKTDRV acts,
  335.       within limits, as if it were a Packet Driver with its own ethernet
  336.       card albiet with the same MAC address as any others.  PKTMUX
  337.       supports up to eight busy copies of PKTDRV.  Note that supporting
  338.       only one channel achieves the same effect as a normal Packet Driver
  339.       and is only useful where PKTMUX provides additional functionality
  340.       such as allowing an application to run under Windows 3.
  341.  
  342.       3.  The /u option causes PKTMUX to unload unless a PKTDRV is still
  343.       busy.  The /t option does the same thing but also sends a terminate
  344.       request to the Packet Driver, which will also unload if it supports
  345.       this facility.
  346.  
  347.       4.  By default PKTMUX allocates a basic set of buffers and then
  348.       adds an additional one to each size group for each channel.  Tests
  349.       suggest this is adequate for most cases.  However this can be
  350.       overridden by giving /n where n is a decimal number in the range 0
  351.       to 9.  PKTMUX will then allocate buffers as if this number of
  352.       channels were to be used.  This can be used to either save memory
  353.       by reducing the buffer allocation or increasing the number of
  354.       buffers when experience suggests it is needed.  The memory overhead
  355.       per channel is a little over 2K.
  356.  
  357.       The buffer allocation is shown by PKTMUX when it is loaded and in
  358.       detail by running PKTSTATS /a after PKTMUX has been loaded.
  359.  
  360.       5. PKTMUX does its best to avoid losing data by holding packets in
  361.       its buffers when an application is unable to accept them. In some
  362.       cases this can cause a shortage of buffers. The /d (drop) option
  363.       causes PKTMUX to behave exactly as a Packet Driver and to drop any
  364.       packet that is refused by an application because it has
  365.       insufficient buffer space. This option acts on all channels and
  366.       overrides a similar option on PKTDRV which works on a per channel
  367.       basis.
  368.  
  369.  
  370.  
  371.       6.  When running under Windows 3 or DESQview with a PKTDRV and the
  372.       application in a DOS session then, if the session is terminated
  373.       without closing down the application, PKTMUX is left with the
  374.       channel marked as Busy.  It will either be freed after
  375.       "Chan_time_out" seconds (default infinity) or the option /r (reset)
  376.       can be used on a call to PKTMUX to reset all such channels.  If /rr
  377.       is given then the busy flags in PKTMUX are also reset which could
  378.       cause it to fail.  See also the PKTDRV /r option and the section on
  379.       Channel Management in the Technical Description below for further
  380.       details.
  381.  
  382.       7.  By default PKTMUX sends data direct to the application when
  383.       only one channel is in use.  If the /x option is given then packets
  384.       are copied to a buffer and multiplexed by the normal mechanisms as
  385.       if several channels were operational.  This is therefore a test
  386.       facility to check if PKTMUX is able to support an application
  387.       irrespective of any other application that is running. Note that
  388.       if /x is used with Novell and Windows 3 it can crash Windows.
  389.  
  390.       8.  If the /i option is given then PKTMUX opens the Packet Driver
  391.       for all types and does its own filtering on the TYPE field in order
  392.       to decide to which handle a packet is destined. This is order to
  393.       allow one channel to accept IEEE 802.3 type packets where the TYPE
  394.       field is the data length and is a value of 1500 bytes or less.
  395.       This dramatically reduces the efficiency of PKTMUX so should only
  396.       be used when IEEE 802.3 packets are to be used. Unfortunately the
  397.       overhead remains irrespective of whether such packets are being
  398.       used but this can be mitigated by the /b option.
  399.  
  400.       Note this is a new facility to evaluate feasibility and may not be
  401.       very satisfactory. In particular if used with Novell and Windows 3
  402.       it can crash Windows.
  403.  
  404.       9.  If the /s option is given then PKTMUX does not give out any
  405.       messages unless an error or warning occurs. The option /ss prevents
  406.       any warning messages as well and /sss prevents errors as well.
  407.  
  408.       10. The /q option causes PKTMUX to return the state of
  409.       "pkt_drvr_int" in both text form and also via the ERRORLEVEL as
  410.       follows:
  411.  
  412.                 0    No PKTMUX found
  413.                 1    PKTMUX found
  414.  
  415.       If the "pkt_drvr_int" is not specified then a search is made from
  416.       Interrupts 60 to 7F looking for PKTMUX. If the /v option is given
  417.       then the interrupt used is recorded in the Environment variable
  418.       PKT_INT.
  419.  
  420.  
  421.       11.  The /b option causes PKTMUX to try and locate the data buffer
  422.       within the Packet Driver so that it can look at the data before
  423.       taking a copy of the packet.  This option is specific to the Packet
  424.       Drivers of certain ethernet cards and has been tested successfully
  425.       on the following:
  426.  
  427.                 Card                     Buffer Size Found in Bytes
  428.  
  429.         BICC 16 bit ISA and MCA versions            64
  430.         NE2000                                      23
  431.         WD8003                                      64
  432.  
  433.       Note that if PKTMUX is unable to find the data buffer the option is
  434.       disabled so it can be used safely in any situation.  However if the
  435.       card you are using is not in the above list then it would be
  436.       prudent to check that all is well just in case the algorithm fails
  437.       to locate the correct buffer.  If the /x option is given then
  438.       PKTMUX goes through the motions of trying to locate the buffer but
  439.       does not use it.  Note that PKTSTATS displays the current state of
  440.       the algorithm and with the /a option gives more details.
  441.  
  442.       This is a new facility to evaluate feasibility and may not be very
  443.       satisfactory in some cases.  It is further explained in the
  444.       Technical Description section below.
  445.  
  446.       12.  One of the problems in running PKTMUX from a batch file is
  447.       that if an error occurs then the message often disappears off the
  448.       screen before it can be noted. The /p option causes output to pause
  449.       if an error is detected whn PKTMUX is first loaded and wait for
  450.       input from the user before proceeding.
  451.  
  452.  
  453.  
  454.  
  455.       5.2 PKTDRV.EXE
  456.       --------------
  457.  
  458.       This is a TSR which provides the pseudo Packet Driver interface in
  459.       conjunction with PKTMUX.  Its format is:
  460.  
  461.         PKTDRV pkt_drvr_int mux_int all_type /options
  462.  
  463.       which uses the multiplexor on hex interrupt "mux_int" or by default
  464.       searches for it.  It installs itself as a Packet Driver on hex
  465.       interrupt "pkt_drvr_int" or, by default, the first free interrupt
  466.       after the multiplexor (note 1).  The "all_type" parameter
  467.       (repeatable) defines the packet TYPE values used when an
  468.       application asks for all types (eg PC-NFS).  The default setting is
  469.       0800 and 0806 (note 2).  Any failure during loading will cause
  470.       PKTMUX to abort and set the DOS ERRORLEVEL to 1.  PKTDRV memory
  471.       usage is a little over 1K.
  472.  
  473.       The following options modify the action taken:
  474.  
  475.         c   copy send buffers (note 3).
  476.         d   drop packets if application has no buffers (note 5).
  477.         e   extend search area under a control program (note 11).
  478.         f   force PKTDRV to be Free; !f forces to Busy (note 1)
  479.         h   display this help information.
  480.         i   asking for all types gives IEEE 802.3 channel (note 7).
  481.         l   act as listener for any protocol type (note 4).
  482.        !l   dont act as listener for any protocol type.
  483.         lf  act as listener for TCP FTP; !lf negates.
  484.         li  act as listener for IP; !li negates.
  485.         lt  act as listener for TCP; !lt negates.
  486.         lt# act as listener for TCP port # (decimal); !lt# negates.
  487.         lu  act as listener for UDP only; !lu negates.
  488.         lu# act as listener for UDP port # (decimal); !lu# negates.
  489.         n   only load PKTDRV if needed ie. there is no free PKTDRV
  490.             already (note 8).
  491.         o   override use of specified interrupt (note 1).
  492.         p  pause if error found (note 12).
  493.         q   query state of a PKTDRV (note 10).
  494.         r   reset a PKTDRV that is busy (note 1).
  495.         s   silence output except warnings (unless /ss) or errors
  496.             (unless /sss) (note 9).
  497.         t   terminate PKTDRV, PKTMUX and Packet Driver (note 6).
  498.         u   unload last loaded PKTDRV if Busy (note 6).
  499.         uu  unload last loaded PKTDRV even if Busy.
  500.         ur  repeatedly unload last loaded PKTDRV if not Busy.
  501.         v   set DOS Environment variable PKT_INT to interrupt used or
  502.             found (notes 1 & 11).
  503.  
  504.  
  505.       Examples are:
  506.  
  507.         pktdrv               ; normal use
  508.         pktdrv /c            ; copy send buffers
  509.         pktdrv 66 62         ; multiplexor on 62, put Packet Driver on 66
  510.         pktdrv /t            ; terminate PKTDRV, PKTMUX and Packet Driver
  511.         pktdrv /u            ; unload last PKTDRV to be loaded
  512.         pktdrv /uu           ; unload last PKTDRV to be loaded even if Busy
  513.         pktdrv 63 /u         ; unload PKTDRV on Int 63
  514.         pktdrv 0 0 800 806 1000 ; Application wanting all packet types will
  515.                                 ; just get 0800, 0806 and 1000
  516.         pktdrv /!l /lf       ; not a listener for any service except FTP
  517.         pktdrv /lt21         ; listener for TCP port 21
  518.  
  519.       Notes:
  520.  
  521.       1.  PKTDRV by default uses the next free Interrupt after that used
  522.       by PKTMUX.  It avoids Interrupts 61, 62 and 64, as these are used
  523.       by PCTCP, Vista eXceed and Novell respectively, and also 67 as this
  524.       is the EMS entry point.  Interrupts 70 - 76 are normally in use on
  525.       all but the XT type PCs.  If the /v option is given then the
  526.       interrupt used is recorded in the Environment variable PKT_INT.  If
  527.       the Interrupt is specified it is checked to see if it already in
  528.       use by PKTDRV, PKTMUX or a Packet Driver and if so PKTDRV will
  529.       refuse to load unless the /o option is given.
  530.  
  531.       Note that under a control program, such as Windows 3, PKTDRV will,
  532.       by default, use the same Interrupt in each DOS session it is loaded
  533.       in.  This is because each DOS session has its own version of the
  534.       Interrupts.  For the same reason PKTSTATS will only see the PKTDRV,
  535.       if any, in its DOS session yet will display the correct total that
  536.       are busy.
  537.  
  538.       Part of the Packet Driver definition is the use of the string PKT
  539.       DRVR just after the interrupt entry point in order to identify it.
  540.       A communications application which does not require the explicit
  541.       definition of the Packet Driver interrupt searches from Interrupt
  542.       60 up to 7f until it finds one.  PKTDRV uses the same mechanism and
  543.       so appears to be a genuine Packet Driver.  However once a
  544.       communications application has accessed PKTDRV the identification
  545.       is changed and only reverts back when the application has given a
  546.       release command.  Thus several copies of PKTDRV can provide the
  547.       impression that multiple Packet Drivers are present.  The state of
  548.       each PKTDRV is shown by calling PKTSTATS - Free means it can be
  549.       used by an application and Busy means its identification has been
  550.       changed and it is in use.
  551.  
  552.       One problem with this mechanism is when two applications can use
  553.       the same Packet Driver - for example PCTCP running alongside a
  554.       Novell Packet Driver using TYPE 8137 protocol - then doing this
  555.       over one PKTDRV will fail.  One solution is to use separate PKTDRV
  556.       for each.  Alternatively once the first application has been
  557.       started and the PKTDRV is now Busy then a command of the form:
  558.  
  559.         pktdrv pkt_drvr_int /f
  560.  
  561.       forces the state back to Free. A second application can then be
  562.       loaded which finds PKTDRV and can use it.
  563.  
  564.  
  565.  
  566.       The opposite problem is when an application is loaded, locates a
  567.       Free PKTDRV but does not issue any commands and thus change the
  568.       PKTDRV state to Busy.  The call:
  569.  
  570.         pktdrv pkt_drvr_int /!f
  571.  
  572.       forces the PKTDRV to be Busy thus subsequent applications will not
  573.       find it.
  574.  
  575.       If a PKTDRV is marked as Busy and the application has terminated
  576.       (or crashed!) then calling PKTDRV with /r option will reset the
  577.       specified "pkt_drvr_int" PKTDRV.  Note that /r resets the channel
  578.       whereas /f simply resets the program identification and leaves all
  579.       the call details intact.  If the PKTDRV was also terminated at the
  580.       same time as the application, such as when a Windows DOS session is
  581.       terminated, then the channel is Busy but there is no PKTDRV to send
  582.       a Reset to.  In this case PKTMUX will have registered that the
  583.       PKTDRV has gone and giving the command:
  584.  
  585.         pktmux /r
  586.  
  587.       will reset any Busy channel for which there is no PKTDRV.
  588.  
  589.       Note that in the PKTDRV calls above if the "pkt_drvr_int" is
  590.       not specified then a search is made from the last possible PKTDRV
  591.       Interrupt number (7f) back to the first (60).  Thus a generalised
  592.       use of the feature is possible provided the PKTDRV being used is
  593.       the last one that was loaded and/or the highest Interrupt number.
  594.       See also note 11.
  595.  
  596.       The /f, /!f and /r requests are refused if they are directed at a
  597.       PKTDRV which was loaded under DOS and the PKTDRV issuing them is
  598.       running under Windows or DESQview.  This can be overriden by
  599.       repeating the option for example /ff, /!f!f or /rr.
  600.  
  601.       A copy of PKTDRV can be loaded at any time.  If it is required to
  602.       unload the system at some later time it is perhaps wise to load all
  603.       the PKTDRV copies that are required under DOS just after PKTMUX.
  604.       This minimises the chance of problems with interrupt chains but
  605.       means that any use of the /f or /r options need the "pkt_drvr_int"
  606.       specifying.
  607.  
  608.       2.  Instead of requesting certain packet types some applications,
  609.       notably PC-NFS, ask for all packet types.  PKTMUX does not allow
  610.       this since it makes its job extremely difficult so PKTDRV
  611.       intercepts such a request and replaces it by specific packet types.
  612.       By default these are 0800 (IP Protocols) and 0806 (ARP - Address
  613.       Resolution Protocols) and these are all PC-NFS really needs for its
  614.       own use.  Where further packet types are required these can be
  615.       overridden and alternatives supplied.
  616.  
  617.       One limitation of this implementation is that an application with a
  618.       genuine requirement for all packet types cannot be supported.  An
  619.       exception is IEEE 802.3 (ISO 8802/3) and this can be supported by
  620.       via the /i option.
  621.  
  622.  
  623.       3.  Under Windows 3 (and possibly DESQview) some communications
  624.       cards which use DMA (direct memory access) for sending data don't
  625.       work properly.  The same thing can happen when the application is
  626.       located in upper memory (ie above 640K).  The solution is to copy
  627.       the data from the application's buffer into one in PKTMUX and send
  628.       it from there.  This is done by the /c option and it only applies
  629.       to data sent via that PKTDRV.  The only card so far found to
  630.       require this is the BICC 16bit ethernet card though this may be
  631.       dependent on the PC hardware and the EMM in use.
  632.  
  633.       4.  The /l and /!l options indicate whether or not the application
  634.       using this PKTDRV should act as a listener for well known services.
  635.       See Technical Description below for further details.
  636.  
  637.       5.  The /d (drop) option makes this PKTDRV channel behave as a
  638.       normal Packet Driver and drop any packet for which the application
  639.       has no buffer rather than holding it in a buffer which is the
  640.       default.  The PKTMUX option /d implements the same feature for all
  641.       channels and overrides the PKTDRV setting.
  642.  
  643.       6.  The /u option causes PKTDRV to unload unless it is still busy
  644.       with an application.  Adding an /r requests all PKTDRVs be
  645.       unloaded.  Note this may not be possible if other TSRs where loaded
  646.       between PKTDRVs.  If it is known that an application is not Busy,
  647.       such as when it has crashed, then the /uu option will force the
  648.       unload.  The /t option does the same thing but also sends a
  649.       terminate request to PKTMUX which, if it is acceptable, will also
  650.       send a terminate request to the Packet Driver. These requests are
  651.       refused if the PKTDRV they are directed at was loaded under DOS
  652.       and the PKTDRV issuing them is running under Windows or DESQview.
  653.  
  654.       If the "pkt_drvr_int" is not specified then a search is made from
  655.       the last possible PKTDRV Interrupt number (7f) back to the first
  656.       (60).  Thus a generalised use of this feature is only possible
  657.       provided the PKTDRV being unloaded is the last one that was loaded
  658.       and also the highest Interrupt number. See also note 11.
  659.  
  660.       7.  If the /i option is given then a request for all types will
  661.       result in IEEE 802.3 (ISO 8802/3) type packets (ie those 1500 bytes
  662.       long or less) being routed up this channel.  The PKTMUX /i option
  663.       must also be given for this to work.
  664.  
  665.       Thus implementations of ISO CONS (Pinkbook in the UK academic
  666.       community) can run over PKTMUX.  UK Academic users of the RAINBOW
  667.       software who wish to use a Packet Driver alongside to run say
  668.       PC-NFS or any other TCP/IP stack thus have two options.  They can
  669.       either run the RAL LLCPKT2 product which provides a packet driver
  670.       interface.  This interface can then be either used directly by an
  671.       application or via PKTMUX for several applications.
  672.  
  673.       Alternatively they can run LLCPKT direct to a PKTDRV with the /i
  674.       option.  Note however that the overheads of both methods are
  675.       significant. However if the /b option is successfully used on
  676.       PKTMUX then the latter is dramatically more efficient.
  677.  
  678.       Note this is a new facility to evaluate feasibility and may not be
  679.       very satisfactory.
  680.  
  681.  
  682.       8.  The /n option instructs PKTDRV to check either the specified
  683.       "pkt_drvr_int" or, if this is not given, then Interrupts between 60
  684.       to 7f to see if a PKTDRV is already running and whether it is Free.
  685.       If this is true it does not load and returns an ERRORLEVEL
  686.       similar to the /q option as follows:
  687.  
  688.                 0    No Free PKTDRV found - PKTDRV loaded ok
  689.                 2    Free PKTDRV found - PKTDRV not loaded
  690.                 3    As 2 but Free PKTDRV loaded before Control Program
  691.                 4    No Free PKTDRV found - PKTDRV load failed for
  692.                      another reason such as no PKTMUX present.
  693.  
  694.       This option allows a BAT file to only load a PKTDRV if it is
  695.       required. See also note 11. Note that the ERRORLEVEL denoting a
  696.       failure is now 4 instead of 1 as it is when the /n option is not
  697.       present.
  698.  
  699.       9.  If the /s option is given then PKTDRV does not give out any
  700.       messages unless an error or warning occurs. The option /ss prevents
  701.       any warning messages and /sss prevents error messages as well.
  702.  
  703.       10. The /q option causes PKTDRV to return the state of
  704.       "pkt_drvr_int" in both text form and also via the ERRORLEVEL as
  705.       follows:
  706.  
  707.                 0    No PKTDRV found
  708.                 1    Busy PKTDRV found
  709.                 2    Free PKTDRV found
  710.                 3    As 2 but Free PKTDRV loaded before Control Program
  711.  
  712.       If the "pkt_drvr_int" is not specified then a search is made from
  713.       Interrupts 60 to 7F looking for any PKTDRVs.  Reporting a Free
  714.       PKTDRV takes precedence over a Busy one. See also note 11.
  715.  
  716.       11.  The rules for searching for a PKTDRV are modified when
  717.       running in the DOS session of a control program such as Windows or
  718.       DESQview.  In this case, even if the "pkt_drvr_int" is specified,
  719.       only the PKTDRV programs loaded in this DOS session are checked.
  720.       To expand the search to all PKTDRVs, that is to include those
  721.       loaded before the control program was run, the option /e must be
  722.       given.  Thus it is possible to target the effect of any option to
  723.       either the current DOS session or all the PKTDRVs in the machine
  724.       excluding those in other DOS sessions.  If the /v option is given
  725.       then the PKTDRV interrupt is recorded in the Environment variable
  726.       PKT_INT.  These search rules affect options /f, /!f, /n, /q, /r,
  727.       /t and /u.
  728.  
  729.       12.  One of the problems in running PKTDRV from a batch file is
  730.       that if an error occurs then the message often disappears off the
  731.       screen before it can be noted. The /p option causes output to pause
  732.       if an error is detected whn PKTDRV is first loaded and wait for
  733.       input from the user before proceeding.
  734.  
  735.  
  736.  
  737.  
  738.       5.3 PKTSTATS.EXE
  739.       ----------------
  740.  
  741.       This program displays program details and statistics from PKTMUX.
  742.       Its format is:
  743.  
  744.         PKTSTATS /options
  745.  
  746.       The following options modify the action taken:
  747.  
  748.         a  display further information - can be repeated (note 1).
  749.         e  extend PKTDRV search area under a control program (note 5).
  750.         h  display this help information.
  751.         q  query state of a Packet Driver, PKTMUX and PKTDRV (note 4).
  752.         s  silence output from /q option.
  753.         v  set DOS Environment variable PKT_INT to interrupt found by
  754.            /q option (note 5).
  755.  
  756.       Examples are:
  757.  
  758.         pktstats             ; normal use
  759.         pktstats /a          ; show further information
  760.         pktstats /q          ; query state
  761.         pktstats /qe         ; query state under Windows including
  762.                              ; PKTDRV copies loaded under DOS
  763.  
  764.       Notes:
  765.  
  766.       1.  The option /a can be repeated up to 3 times to give increasing
  767.       levels of information.  This is mainly intended for debugging
  768.       purposes.  Repeating /a 3 times can get the program in a loop or
  769.       give misleading information since it scans queues which may be
  770.       changing.  This is intended only for cases when PKTMUX has stopped
  771.       with a system error.
  772.  
  773.       2.  The counts given by PKTSTATS are 16 bit integers so will
  774.       overflow over a period of time.  The counts are not read at the
  775.       same time but are obtained as they are required by PKTSTATS.  As
  776.       PKTMUX is processing data at the same time there may be some
  777.       inconsistencies in fast moving values such as Broadcast and Ignored
  778.       counts.
  779.  
  780.       3.  In the output from PKTSTATS where the name before a count value
  781.       is in CAPITAL letters then this indicates that data is being lost
  782.       or discarded for some reason.  Further details are given in the
  783.       section on Problem Solving.
  784.  
  785.  
  786.  
  787.       Each PKTDRV channel may have one or more of the following
  788.       qualifiers againsts it:
  789.  
  790.         /Drop_buff      PKTDRV /d option given
  791.         /DV             PKTDRV running under DESQview
  792.         /Tag            PKTDRV running under DOS but application under
  793.                         Windows so application tagged for uniqueness.
  794.         /TIMED_OUT      PKTDRV appears to be no longer active.
  795.         /TX_Copy        PKTDRV /c option given
  796.         /Win            PKTDRV running under Windows
  797.         /Zero_type      All Packet Types requested so mapped onto
  798.                         specified Types - usually 0806 and 0800.
  799.         /802.3          PKTDRV /i option given
  800.  
  801.       4. The /q option causes PKTSTATS to search Interrupts 60 to 7f
  802.       for the state of a Packet Driver, PKTMUX and PKTDRV and report
  803.       back in both text form (unless /s option given) and also via the
  804.       ERRORLEVEL as follows:
  805.  
  806.                 0    No Packet Driver found
  807.                 1    Packet Driver found
  808.                 2    PKTMUX and Packet Driver found
  809.                 3    Busy PKTDRV, PKTMUX and Packet Driver found
  810.                 4    Free PKTDRV, PKTMUX and Packet Driver found
  811.                 5    As 4 but Free PKTDRV loaded before Control Program
  812.  
  813.       Reporting a Free PKTDRV takes precedence over a Busy one.  See also
  814.       note 5.
  815.  
  816.       5.  The rules for searching for a PKTDRV with the /q option are
  817.       modified when running in the DOS session of a control program such
  818.       as Windows or DESQview.  In this case only the PKTDRV programs
  819.       loaded in this DOS session are checked.  To expand the search to
  820.       all PKTDRVs, that is to include those loaded before the control
  821.       program was run, the option /e must be given.  Thus it is possible
  822.       to target the effect of the /q option to either the current DOS
  823.       session or all the PKTDRVs in the machine excluding those in other
  824.       DOS sessions.  If the /v option is given then the interrupt of
  825.       whatever is found is recorded in the Environment variable PKT_INT.
  826.  
  827.  
  828.  
  829.       5.4 WINPKT.COM
  830.       --------------
  831.  
  832.       This program is not part of the PKTMUX system but since it provides
  833.       a subset of the facilities for a smaller memory requirement it is
  834.       included.  In is not supported by RAL.  In accordance with the
  835.       distribution licence the source is also supplied in WINPKT.ASM.
  836.       The program COPYING mentioned at start up is not supplied as I dont
  837.       have a copy.  WINPKT is also part of the Crynwr (ex Clarkson)
  838.       Packet Driver collection v10 and may be a later version.
  839.  
  840.       WINPKT acts as an interface between an application running under
  841.       Windows 3 in Enhanced mode and a Packet Driver.  It uses Windows 3
  842.       calls so is specific to this case.  Its format is:
  843.  
  844.         WINPKT new_pkt_drvr_int old_pkt_drvr_int
  845.  
  846.       where "old_pkt_drvr_int" is the interrupt of the Packet Driver in
  847.       either decimal or hex preceeded by 0x.  "new_pkt_drvr_int" is the
  848.       new interrupt to use and cannot be the same as "old_pkt_drvr_int".
  849.       There are no documented options.
  850.  
  851.  
  852.       Examples are:
  853.  
  854.         winpkt 0x63 0x64        ; Packet driver on Interrupt 64, WINPKT
  855.                                 ; accessed via Interrupt 63
  856.         winpkt                  ; provide help information
  857.  
  858.  
  859.       Notes:
  860.  
  861.       1.  WINPKT should be loaded after the Packet Driver and before
  862.       Windows 3 is loaded.  It is recommended that "new_pkt_drvr_int" is
  863.       before "old_pkt_drvr_int" since applications that search for a
  864.       packet driver will find the driver and not WINPKT.
  865.  
  866.       2.  WINPKT has no unloading mechanism so if unloading is required
  867.       the RAL LOADSYS system or similar must be used.
  868.  
  869.       3. WINPKT may not work with certain ethernet cards. The BICC 16 bit
  870.       card is the only know example so far found. PKTMUX should be used
  871.       in these cases along with the /c option on PKTDRV.
  872.  
  873.  
  874.  
  875.       6.  Examples
  876.       ============
  877.  
  878.       The following examples illustrate the use of PKTMUX and attempt to
  879.       show the various possible uses of the system. It assumes a degree
  880.       of familiarity with setting up and use of the various systems
  881.       exampled. Examples include the RAL MOS2 IBM 3270 emulator since
  882.       this system was one of the reasons for writing PKTMUX. The RAL
  883.       LOADSYS program to load and unload TSRs and Device Drivers can also
  884.       be useful in running multiple protocol stacks. Details of both are
  885.       given in the Reference Section.
  886.  
  887.       It is usually the case that a sequence of commands is put into a
  888.       BAT file and one section below gives examples of techniques that
  889.       facilitate this.
  890.  
  891.       In general there are two classes of communications applications.
  892.       The simplest are those that just need a Packet Driver in order to
  893.       work, for example the CUTCP programs PING, LPR and FTPBIN.  A more
  894.       complicated type are those applications which require their own TSR
  895.       to be loaded first.  The applications then communicate via this
  896.       instead of directly to the Packet Driver.  Examples are
  897.       applications that run over PCTCP and PC-NFS.
  898.  
  899.       Another twist are those applications that either are, or can
  900.       become, TSRs and thus allow you to return to DOS.  Thus further
  901.       applications can be run.  Examples are MOS2 which is a TSR and FTP
  902.       which via the command !  becomes a TSR and starts up a DOS session.
  903.  
  904.  
  905.       6.1 Packet Driver, PCTCP and PC-NFS Applications under DOS
  906.       ----------------------------------------------------------
  907.  
  908.       The following illustrates how to run a Packet Driver application
  909.       alongside those requiring their own TSR to be loaded.  The first is
  910.       for PCTCP and assumes IPCUST.SYS and IFCUST.SYS are loaded in
  911.       CONFIG.SYS.
  912.  
  913.         ne2000 0x63 0x5 0x320    ; Load Packet Driver for NE2000 card
  914.         pktmux                   ; Support 2 channels
  915.         pktdrv                   ; PKTDRV for PCTCP to use
  916.         pktdrv                   ; PKTDRV for Packet Driver application
  917.                                  ; to use
  918.         ethdrv                   ; PCTCP Packet Driver interface
  919.  
  920.       You can now run applications from the PCTCP program suite, such as
  921.       FTP, PING or LPR. Programs that just require a Packet Driver can
  922.       also be run such as FTPBIN from the CUTCP program suite.
  923.  
  924.  
  925.  
  926.       The following illustrates how to run a Packet Driver application
  927.       alongside the PC-NFS TSR.  It is assumed that SOCKDRV.SYS, PKTD.SYS
  928.       and ANSI.SYS are loaded in CONFIG.SYS.
  929.  
  930.         pcnfs.sys /b1            ; loaded in CONFIG.SYS
  931.  
  932.         mbdndpd 0x63 /I10 /D3    ; Load Packet Driver for BICC 16 bit
  933.                                  ; card
  934.         pktmux                   ; Support 2 channels
  935.         pktdrv                   ; PKTDRV for PC-NFS to use
  936.         pktdrv                   ; PKTDRV for Packet Driver application
  937.         cd \nfs
  938.         prt *                    ; Normal PC-NFS loading
  939.         nfsrun
  940.  
  941.       PC-NFS applications such as NFSPING can now be run as well as those
  942.       just requiring a Packet Driver such as FTPBIN from CUTCP.
  943.  
  944.  
  945.       6.2 MOS2 under DOS
  946.       ------------------
  947.  
  948.       The RAL MOS2 IBM 3270 Emulator v2.3 is a TSR.  It supports the
  949.       Waterloo TCP/IP protocol stack and is normally run by loading the
  950.       Packet Driver and then running the file MOS2T.BAT.  To achieve this
  951.       using PKTMUX type:
  952.  
  953.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  954.         pktmux                   ; Support 2 channels
  955.         pktdrv                   ; PKTDRV for MOS2 to use
  956.         pktdrv                   ; PKTDRV for applications to use
  957.         mos2t                    ; Run MOS2
  958.  
  959.       Once MOS2 is running you can then hot key (Alt-Esc) back to DOS and
  960.       then any other communications application which runs over a Packet
  961.       Driver can be used. For example PING from the Waterloo TCP/IP
  962.       suite or FTPBIN or LPR from the CUTCP suite. For example:
  963.  
  964.         ftpbin ib                ; establish FTP communications with IB
  965.  
  966.  
  967.       To run MOS2 alongside applications from the PCTCP applications
  968.       suite the following is suggested:
  969.  
  970.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  971.         pktmux                   ; Support 2 channels
  972.         pktdrv                   ; PKTDRV for PCTCP to use
  973.         pktdrv                   ; PKTDRV for MOS2 to use
  974.         ethdrv                   ; PCTCP Packet Driver interface
  975.         mos2t                    ; Run MOS2
  976.  
  977.       Once MOS2 is running the PCTCP applications can be used.
  978.  
  979.       A combination of the two cases, that is the ability to run
  980.       applications from the PCTCP program suite or any other application
  981.       that runs directly over a Packet Driver can be achieved by the
  982.       following:
  983.  
  984.  
  985.  
  986.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  987.         pktmux 3                 ; Support 3 channels
  988.         pktdrv                   ; PKTDRV for PCTCP to use
  989.         pktdrv                   ; PKTDRV for MOS2 to use
  990.         pktdrv                   ; PKTDRV for applications to use
  991.         ethdrv                   ; PCTCP Packet Driver interface
  992.         mos2t                    ; Run MOS2
  993.  
  994.       Once MOS2 is running either the PCTCP applications or those
  995.       requiring a Packet Driver can be used.
  996.  
  997.       Note that it is possible to run MOS2 before loading PCTCP but this
  998.       is not recommended.  Loading PCTCP first removes any problems
  999.       with the provision of well known services such as an FTP listener.
  1000.       If MOS2 must be loaded first then its PKTDRV should have the /!l
  1001.       option so that any incoming calls for well known services are
  1002.       routed to the next PKTDRV which should be the one for PCTCP.
  1003.  
  1004.  
  1005.       6.3 Packet Driver and IEEE 802.3 (ISO 8802/3) applications
  1006.       ----------------------------------------------------------
  1007.  
  1008.       The following illustrates how to run an IEEE 802.3 application
  1009.       alongside one or more Packet Driver applications. One obviously
  1010.       must be a TSR in order to allow a return to DOS in order to run the
  1011.       other. If the Packet Driver application was a TSR (eg PC-NFS) then
  1012.       the sequence could be:
  1013.  
  1014.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  1015.         pktmux /ib               ; Support 2 channels
  1016.         pktdrv                   ; PKTDRV for application to use
  1017.         pktdrv /i                ; PKTDRV for IEEE 802.3 use
  1018.  
  1019.       You then load the Packet Driver application TSR then on returning
  1020.       to DOS run the IEEE 802.3 application. Note that PKTMUX and the
  1021.       PKTDRV used by the IEEE 802.3 application must have a /i option. In
  1022.       fact all PKTDRVs could have the /i option so that the IEEE 802.3
  1023.       application could use any one. However the exception to this is an
  1024.       application, such as PC-NFS, which asks for all packet types. Its
  1025.       PKTDRV must not have a /i option.
  1026.  
  1027.       The /b option on PKTMUX is very strongly recommended for IEEE 802.3
  1028.       work since, if it works, it should dramatically reduce the
  1029.       overheads.
  1030.  
  1031.  
  1032.  
  1033.       6.4 Packet Driver and Rainbow Applications
  1034.       ------------------------------------------
  1035.  
  1036.       UK academic users of the Rainbow product can run Packet Driver
  1037.       applications alongside by use of a similar sequence to the previous
  1038.       section. The Rainbow software (eg PINKBOOK) must be run over the
  1039.       IEEE 802.3 PKTDRV via the LLCPKT interface provided by RAL. Thus to
  1040.       run it alongside PC-NFS could be done as follows:
  1041.  
  1042.         pcnfs.sys /b1            ; loaded in CONFIG.SYS
  1043.  
  1044.         mbdndpd 0x63 /I10 /D3    ; Load Packet Driver for BICC 16 bit
  1045.                                  ; card
  1046.         pktmux /ib               ; Support 2 channels
  1047.         pktdrv                   ; PKTDRV for PC-NFS to use
  1048.         pktdrv /i                ; PKTDRV for PINKBOOK to use
  1049.         cd \nfs
  1050.         prt *                    ; Normal PC-NFS loading
  1051.         nfsrun
  1052.  
  1053.         llcpkt                   ; LLCPKT Packet Driver to BICC MPS
  1054.                                  ; interface
  1055.         pinkbook                 ; PINKBOOK TSR
  1056.         rainbow                  ; Rainbow application
  1057.  
  1058.  
  1059.       6.5 Packet Driver Applications under Windows 3
  1060.       ----------------------------------------------
  1061.  
  1062.       The following illustrates how to run Packet Driver applications
  1063.       under Windows 3 in Enhanced mode. Use under DESQview is very
  1064.       similar.
  1065.  
  1066.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  1067.         pktmux 8 /4              ; Support 8 channels but only 4 will
  1068.                                  ; will be active at once
  1069.         win                      ; Run Windows 3
  1070.  
  1071.       To run an application open a DOS session and type:
  1072.  
  1073.         pktdrv                   ; PKTDRV for application to use
  1074.  
  1075.       followed by the application. The application could be the MOS2
  1076.       emulator BAT file for example:
  1077.  
  1078.         mos2t
  1079.  
  1080.       To run further applications just open more DOS sessions and run
  1081.       PKTDRV then the application. For IEEE 802.3 applications the PKTMUX
  1082.       call must have the option /i added (and /b is also recommended) and
  1083.       the PKTDRV run under the DOS session should have a /i. Thus to run
  1084.       the Rainbow application in their Windows DOS session would type:
  1085.  
  1086.  
  1087.         pktdrv /i
  1088.         llcpkt                   ; LLCPKT Packet Driver to BICC MPS
  1089.                                  ; interface
  1090.         pinkbook                 ; PINKBOOK TSR
  1091.         rainbow                  ; Rainbow application
  1092.  
  1093.       Where a PIF file is used then the associated BAT file could
  1094.       contains commands similar to above. A little care is needed with
  1095.       error conditions since if there is no free channel then the PKTDRV
  1096.       load will fail. For example:
  1097.  
  1098.         pktdrv /p
  1099.         IF ERRORLEVEL 1 GOTO EXIT          ; Jump if failed
  1100.         .
  1101.         run application
  1102.         .
  1103.         :EXIT
  1104.  
  1105.       If the loading of PKTDRV fails for any reason the /p option holds
  1106.       up processing allowing the user to see the error message generated.
  1107.       The complete BAT file for the MOS2 emulator would therefore be:
  1108.  
  1109.         pktdrv /p
  1110.         IF ERRORLEVEL 1 GOTO FAIL          ; Jump if failed
  1111.         call mos2t
  1112.         command
  1113.         :EXIT
  1114.  
  1115.       Be warned that Windows, especially 3.0, can become unstable if you
  1116.       have insufficient memory and opening too many DOS sessions may
  1117.       result in a Unrecoverable Application Error.  This usually does no
  1118.       damage and other sessions are unaffected.  Note also that, unless
  1119.       the PC is quite powerful, applications may fail as they will not
  1120.       get enough CPU to process their communications in time and
  1121.       protocols may time out. This is especially so if IEEE 802.3
  1122.       protocols are used.
  1123.  
  1124.  
  1125.  
  1126.       6.6 Packet Driver, PCTCP and PC-NFS Applications under Windows 3
  1127.       ----------------------------------------------------------------
  1128.  
  1129.       This is essentially the same as under DOS but with the PKTDRV for
  1130.       the Packet Driver application run under a DOS session. For example
  1131.       to run both PCTCP and Packet Driver applications the following
  1132.       would suffice.
  1133.  
  1134.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  1135.         pktmux 8 /4              ; Support 8 channels but only 4 will
  1136.                                  ; will be active at once
  1137.         pktdrv                   ; PKTDRV for PCTCP to use
  1138.         ethdrv                   ; PCTCP Packet Driver interface
  1139.         win                      ; Run Windows 3
  1140.  
  1141.       To run a Packet Driver application open a DOS session and type:
  1142.  
  1143.         pktdrv                   ; PKTDRV for application to use
  1144.  
  1145.       followed by the application. For PCTCP applications just run the
  1146.       application.
  1147.  
  1148.  
  1149.       6.7  Windows 3 Applications
  1150.       ---------------------------
  1151.  
  1152.       Windows 3 applications are slightly different in that they do not
  1153.       run in a DOS session so it is not possible to run PKTDRV after
  1154.       Windows has been loaded.  For those that run over PCTCP or PC-NFS
  1155.       then the appropriate TSR is loaded under DOS after PKTMUX and one
  1156.       PKTDRV as illustrated above.  The application is then run under
  1157.       Windows as normal.
  1158.  
  1159.       For those that run over a Packet Driver, for example WINQVT, then
  1160.       the procedure is very similar to running them under DOS, that is
  1161.       the PKTDRV is loaded before Windows 3. For example to run WINQVT
  1162.       and also other applications that use a Packet Driver the following
  1163.       would suffice:
  1164.  
  1165.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  1166.         pktmux 8 /4              ; Support 8 channels but only 4 will
  1167.                                  ; will be active at once
  1168.         pktdrv                   ; PKTDRV for WINQVT to use
  1169.         pktint                   ; WINQVT Packet Driver interface
  1170.         win                      ; Run Windows 3
  1171.  
  1172.       Then run WINQVT as normal with QVT_TCP.RC edited to contain the
  1173.       line:
  1174.  
  1175.       packet_vector=65
  1176.  
  1177.       This is done because WINQVT has to have its Packet Driver interrupt
  1178.       specified and PKTDRV will use 65 by default in the above example.
  1179.       If there is any doubt then PKTDRV could have its interrupt number
  1180.       specified as the first parameter for example:
  1181.  
  1182.         pktdrv 65
  1183.  
  1184.  
  1185.  
  1186.       If WINQVT is not going to be loaded immediately then there is a
  1187.       problem that another application may use the PKTDRV intended for
  1188.       WINQVT since it would the the first one found when searching down
  1189.       the Interrupts.  To combat this it is recommended that
  1190.       WINQVT is given a high interrupt number (eg 7F) to guarantee it
  1191.       will be free. For example:
  1192.  
  1193.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  1194.         pktmux 8 /4              ; Support 8 channels but only 4 will
  1195.                                  ; will be active at once
  1196.         pktdrv 7f                ; PKTDRV for WINQVT to use
  1197.         pktint                   ; WINQVT Packet Driver interface
  1198.         win                      ; Run Windows 3
  1199.  
  1200.       Then run WINQVT as normal with QVT_TCP.RC edited to contain the
  1201.       line:
  1202.  
  1203.       packet_vector=7f
  1204.  
  1205.       To run further Packet Driver applications open a DOS session and
  1206.       run PKTDRV and the application as before.  To run PCTCP or PC-NFS
  1207.       applications then modify the above to include the TSR before
  1208.       loading Windows.  Alternatively for PCTCP the TSR can be run under
  1209.       Windows 3 inside a DOS session since it is effectively a Packet
  1210.       Driver application.  IPCUST.SYS and IFCUST.SYS must have previously
  1211.       been loaded in CONFIG.SYS or could be loaded by the RAL LOADSYS
  1212.       system.
  1213.  
  1214.  
  1215.       6.8  Novell Netware
  1216.       -------------------
  1217.  
  1218.       Only the Novell protocol that uses a TYPE 8137 packet has been
  1219.       tested with PKTMUX and there are a variety of ways it may be run.
  1220.       Note that because PKTMUX hides the real Packet Driver by taking
  1221.       over its interrupt then the Novell Packet Driver interface IPX must
  1222.       use a PKTDRV. For example:
  1223.  
  1224.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  1225.         pktmux 2                 ; Support 2 channels
  1226.         pktdrv                   ; PKTDRV for Novell to use
  1227.         pktdrv                   ; PKTDRV for application to use
  1228.         ipx                      ; Load Novell 8137 Packet Driver
  1229.                                  ; interface
  1230.         etc
  1231.  
  1232.       An improvement on this is to note that PKTDRV, like a normal Packet
  1233.       Driver, can support several protocol types so it is possible for
  1234.       one PKTDRV to support both Novell and an application. However the
  1235.       difference is that PKTDRV sets itself busy when it is Accessed so
  1236.       it must be made Free again before it can be Accessed again. For
  1237.       example:
  1238.  
  1239.  
  1240.  
  1241.         ne2000 0x63 0x5 0x320    ; Load Packet Driver
  1242.         pktmux 2                 ; Support 2 channels
  1243.         pktdrv                   ; PKTDRV for Novell and one
  1244.                                  ; application to use
  1245.         ipx                      ; Load Novell 8137 Packet Driver
  1246.                                  ; interface
  1247.         pktdrv /f                ; make PKTDRV free again
  1248.         pktdrv                   ; PKTDRV for second application to use
  1249.         etc
  1250.  
  1251.  
  1252.       6.9 Packet Driver/PKTMUX/PKTDRV BAT files
  1253.       -----------------------------------------
  1254.  
  1255.       It is frequently the case that a general purpose BAT file has to be
  1256.       written to load communications software.  PKTMUX provides various
  1257.       tools to assist in this as are illustrated in the following
  1258.       examples.  Note that the /s option can be added to all the calls to
  1259.       avoid confusing the user with the messages that are generated. It
  1260.       is also recommended that the /p option is added to all calls to
  1261.       load PKTMUX and PKTDRV so that the BAT file pauses if an error is
  1262.       found thus allowing the user to read the message.
  1263.  
  1264.       The following example checks if a Packet Driver or PKTMUX has
  1265.       already been loaded before loading both along with a PKTDRV ready
  1266.       to run a communications application.
  1267.  
  1268.         pktstats /qp                       ; Query state
  1269.         IF ERRORLEVEL 4 GOTO GOT_FREE      ; Jump if got a Free PKTDRV
  1270.         IF ERRORLEVEL 2 GOTO GOT_PKTMUX    ; Jump if got a PKTMUX
  1271.         IF ERRORLEVEL 1 GOTO GOT_PACKET    ; Jump if got a Packet Driver
  1272.         ne2000 0x63 0x5 0x320              ; Load Packet Driver
  1273.  
  1274.         :GOT_PACKET
  1275.         pktmux                             ; Load PKTMUX
  1276.         IF ERRORLEVEL 1 GOTO FAIL          ; Jump if failed
  1277.  
  1278.         :GOT_PKTMUX
  1279.         pktdrv                             ; PKTDRV busy so load new one
  1280.         IF ERRORLEVEL 1 GOTO FAIL          ; Jump if failed
  1281.  
  1282.         :GOT_FREE                          ; All loaded and a Free PKTDRV
  1283.         etc                                ; available
  1284.  
  1285.  
  1286.       Alternatively the PKTDRV call could have the /n option which would
  1287.       remove the need for the second line jump to GOT_FREE and is a
  1288.       general purpose way of loading a PKTDRV only if one is not already
  1289.       Free.  Such use does require a different testing of the ERRORLEVEL
  1290.       since a value is returned if the PKTDRV is not loaded because a
  1291.       Free one already exists.  For example:
  1292.  
  1293.         pktdrv /n
  1294.         IF ERRORLEVEL 4 GOTO FAIL          ; Jump if failed
  1295.  
  1296.       Note that ERRORLEVEL values of 2 and 3 mean not loaded due to a
  1297.       Free PKTDRV being present.
  1298.  
  1299.  
  1300.  
  1301.       If the application was one that terminated and then released the
  1302.       Packet Driver, for example LPR or TRUMPET, then the line:
  1303.  
  1304.         pktdrv /u
  1305.  
  1306.       could be added after the application had been run to unload the
  1307.       PKTDRV, if this is possible.  This would reduce the memory
  1308.       occupancy and increase the possibility of being able to unload any
  1309.       other TSRs.
  1310.  
  1311.       Note that in all the above cases the /v option could have been
  1312.       added thus causing the interrupt used to be recorded in the DOS
  1313.       Environment variable PKT_INT. Thus in the above case the call:
  1314.  
  1315.         pktdrv /nv
  1316.  
  1317.       would set PKT_INT to either the Free interrupt it found or the
  1318.       Interrupt used by the new PKTDRV. Hence an application requiring to
  1319.       know the Interrupt value in its call could be passed this detail.
  1320.  
  1321.       However if such an application held the interrupt number in a file
  1322.       so that it could not be easily changed in a BAT file then checks
  1323.       for a PKTDRV on this fixed interrupt number, 7f in the
  1324.       example, could be done as follows:
  1325.  
  1326.         pktdrv /q 7f
  1327.         IF ERRORLEVEL 3 GOTO GOT_FREE      ; Jump if got a Free PKTDRV
  1328.         IF ERRORLEVEL 2 GOTO FAIL          ; Jump if got a Busy PKTDRV
  1329.         pktdrv 7f                          ; Load PKTDRV on 7f
  1330.         IF ERRORLEVEL 4 GOTO FAIL          ; Jump if failed
  1331.  
  1332.         :GOT_FREE
  1333.         run application
  1334.  
  1335.         pktdrv 7f /u                       ; Unload PKTDRV if possible
  1336.  
  1337.       If there was already a Busy PKTDRV on Interrupt 7F then it would
  1338.       not be possible to run the application.
  1339.  
  1340.       All the above cases would also work under a control program such as
  1341.       Windows or DESQview provided certain conditions are met concerning
  1342.       any PKTDRV programs loaded under DOS, that is before the control
  1343.       program was loaded.  They must all be busy when the control program
  1344.       was loaded, for example being used by PCTCP or PC-NFS.  If they are
  1345.       still free then they must either be made busy as soon as the
  1346.       control program is loaded by the application, such as WINQVT, being
  1347.       loaded at startup, or they must use a high interrupt such as 7F.
  1348.       The reason behind all this is to avoid an application in a DOS
  1349.       session searching from Interrupt 60 and finding a free PKTDRV
  1350.       running under DOS rather than in the DOS session itself.  Whilst an
  1351.       application will work in this case the response will be a lot
  1352.       slower and the likelyhood of failure much higher.  If it can be
  1353.       guaranteed that any Free PKTDRV loaded under DOS has an Interrupt
  1354.       at the end of the range, eg 7F, then the examples above will work.
  1355.  
  1356.  
  1357.  
  1358.       If not then any Free PKTDRV under DOS must be made Busy to avoid
  1359.       any problems.  The following suggests how and uses the /e option to
  1360.       widen the search outside the DOS session and the /v option to note
  1361.       the PKTDRV interrupt number:
  1362.  
  1363.         pktdrv /nv                         ; Load PKTDRV unless one Free
  1364.                                            ; in this DOS session
  1365.         IF ERRORLEVEL 4 GOTO FAIL          ; Jump if failed
  1366.  
  1367.         :TEST_AGAIN                        ; Have a Free PKTDRV in the
  1368.                                            ; DOS session
  1369.         pktdrv /qve                        ; Check entire machine
  1370.         IF ERRORLEVEL 3 GOTO GOT_DOS       ; Jump if Free PKTDRV under DOS
  1371.         run application                    ; All ok so run application
  1372.         GOTO EXIT
  1373.  
  1374.         :FAIL                              ; Failure to load PKTDRV
  1375.         Echo Cannot load PKTDRV
  1376.         GOTO EXIT
  1377.  
  1378.         :GOT_DOS                           ; Free PKTDRV under DOS
  1379.         pktdrv /e!f!f %PKT_INT%            ; Busy it
  1380.         GOTO TEST_AGAIN                    ; Test again in case another
  1381.  
  1382.         :EXIT
  1383.  
  1384.       This BAT file forces to Busy any Free PKTDRV running under DOS with
  1385.       a lower Interrupt number than any in the DOS session so that an
  1386.       application does not use it.  Note that this BAT file will run
  1387.       equally happily under DOS provided a PKTDRV at a high interrupt
  1388.       number is not Free.
  1389.  
  1390.  
  1391.  
  1392.       7.  Technical Description
  1393.       =========================
  1394.  
  1395.       This section describes how PKTMUX goes about its task and is
  1396.       intended for those who wish to understand how the system works and
  1397.       why it has the limitations it has.  An understanding of the Packet
  1398.       Driver interface is assumed.  The various PKTMUX counts and states
  1399.       detailed below are shown the command:
  1400.  
  1401.         pktstats /a
  1402.  
  1403.       Additional states are given by the option /aa.
  1404.  
  1405.  
  1406.       7.1 Basic Methodology
  1407.       ---------------------
  1408.  
  1409.       In essence the system is very simple.  PKTMUX talks to the Packet
  1410.       Driver and receives data from it.  Each PKTDRV passes all commands
  1411.       onto PKTMUX with the addition of the channel number.  PKTDRV also
  1412.       sits on a timer interrupt and asks PKTMUX once per system tick if
  1413.       there are any packets for this channel and if so then gets them
  1414.       passed over.  A PKTDRV is only Busy from when it has been
  1415.       asked by an application to Assign a packet type to when that is
  1416.       Released.  In between it remains Free.
  1417.  
  1418.       Whilst PKTMUX makes every attempt to be efficient it does create a
  1419.       significant overhead when multiplexing between several
  1420.       applications.  This is because the Packet Driver interface only
  1421.       tells you it has a packet and does not give a pointer so that you
  1422.       can see if you are interested in its contents.  Where only one
  1423.       application is using this packet type then the packet is sent
  1424.       direct to the application.  Otherwise it is necessary for PKTMUX to
  1425.       read the packet into its own storage, analyse its contents and then
  1426.       send it when asked by a PKTDRV to the appropriate application(s).
  1427.       Thus every packet received in this manner has to be copied once
  1428.       more than necessary unless devious cunning is employed via the
  1429.       /b option.
  1430.  
  1431.  
  1432.       7.2 Buffer Strategy
  1433.       -------------------
  1434.  
  1435.       When an application is unable to accept a packet, usually because
  1436.       it has no free buffer space, then PKTMUX keeps the packet in its
  1437.       buffers and every timer tick keeps asking the application to accept
  1438.       it.  It does this even when it normally sends data direct to the
  1439.       application, thus those applications which operate on a small
  1440.       buffer pool may lose less data when under PKTMUX especially when
  1441.       they receive less CPU cycles when running under Windows 3.  The
  1442.       decision whether to keep a packet when an application is unable to
  1443.       accept it is a difficult one and depends on the available buffer
  1444.       pool and activity on other channels.  The ultimate criterion is the
  1445.       age of the buffer and after between 2 and 3 seconds it is dropped.
  1446.       Whilst this mechanism is satisfactory for most applications there
  1447.       are some that give problems.  One that has been noted is TRUMPET
  1448.  
  1449.  
  1450.  
  1451.       which, when an interaction has been completed and it is waiting for
  1452.       user input, refuses to accept any more packets.  Whilst
  1453.       PKTMUX's buffer strategy will cope in normal circumstances, under
  1454.       heavy loading this could give problems.  The /d option is therefore
  1455.       available on PKTDRV which causes a packet to be always dropped when
  1456.       an application is unable to accept it.  Thus it behaves exactly as
  1457.       a Packet Driver.  The /d option is also available on PKTMUX to
  1458.       provide this feature on all channels and could be used in cases of
  1459.       extreme loading.
  1460.  
  1461.  
  1462.       7.3 Channel Management
  1463.       ----------------------
  1464.  
  1465.       Normally a channel is freed when the application Releases all the
  1466.       packet TYPEs is has Accessed.  If this does not occur, usually
  1467.       because the application has crashed, then there are two possible
  1468.       cases.
  1469.  
  1470.       The first, and most normal, is where the PKTDRV being used by the
  1471.       application is still running and a call the PKTSTATS shows it to be
  1472.       Busy.  The command:
  1473.  
  1474.         pktdrv /r
  1475.  
  1476.       will reset the PKTDRV and free the channel.
  1477.  
  1478.       The second case is when the PKTDRV is not running.  PKTMUX detects
  1479.       this by the absense of any timer interrupts and frees the channel
  1480.       after about two seconds.  However this technique fails under a
  1481.       control program such as Windows 3 or DESQview since the DOS session
  1482.       can be locked thus preventing the PKTDRV from sending its timer
  1483.       interrupts.  An example is when an area is Selected under
  1484.       Windows 3.0 for such actions as cut and paste.
  1485.  
  1486.       To overcome this PKTMUX does not immediately free such channels
  1487.       when running under a control program but this gives the new problem
  1488.       that it now has no means of knowing the channel can be freed.  Such
  1489.       channels are marked as having Timed Out and this is displayed by
  1490.       PKTSTATS.  To reset such a channel use the following command:
  1491.  
  1492.         pktmux /r
  1493.  
  1494.       in a DOS session and this will make all such channels free again.
  1495.  
  1496.       An automatic means of recovery from this situation is provided by
  1497.       the third PKTMUX parameter, Chan_time_out.  This is the time in
  1498.       seconds the call stays in a timed out state before being freed
  1499.       automatically.  However this should be set with care since if you
  1500.       spend too long on your cut and paste the channel may be freed and
  1501.       your application will fail.
  1502.  
  1503.  
  1504.       One side effect of an application crashing is that it may leave
  1505.       PKTMUX in one of its internal busy states. This is shown by the
  1506.       PKTSTATS /aa output in the line "Busy Flags". If this occurs then
  1507.       PKTMUX will effectively go to sleep. When this is the case then the
  1508.       call:
  1509.  
  1510.         pktmux /rr
  1511.  
  1512.       will also reset these flags and PKTMUX may resume working. It may
  1513.       also crash!
  1514.  
  1515.       The maximum number of Busy channels supported by PKTMUX is 8 but
  1516.       realistically a rather lower number is recommended.  This value is
  1517.       permitted in order to mitigate the problems detailed above by
  1518.       preventing timed out channels from blocking other applications.  If
  1519.       say only 4 channels are actually going to be required but 8 are
  1520.       specified then to save memory the number of buffers should be
  1521.       reduced by a call such as:
  1522.  
  1523.         pktmux 8 /4
  1524.  
  1525.  
  1526.       7.4 Control Programs
  1527.       --------------------
  1528.  
  1529.       One of the problems with the Packet Driver interface is that when
  1530.       it receives a packet it then calls a routine in the application.
  1531.       This will not fail under DOS but if the application is running
  1532.       under a control program such as Windows 3 or DESQview, where the
  1533.       application can be swopped in and out of the current virtual
  1534.       memory, then there is a need to establish that the current
  1535.       application is the correct one.  PKTMUX does this by noting the
  1536.       code it is to jump to when a packet is received and checking if
  1537.       that is present.  This works satisfactorily unless two copies of
  1538.       the same application are running and in this case the application
  1539.       has to be tagged in a unique way.
  1540.  
  1541.       Note that there are two ways of using PKTDRV under a control
  1542.       program.  The preferred way is to load it in a DOS session after
  1543.       the control program has been started and then run the application.
  1544.       In this way when PKTDRV asks PKTMUX if it has received a buffer it
  1545.       can be sure the application is in memory and so minimises any
  1546.       delay.  Alternatively when an application runs directly under the
  1547.       control program it is therefore not possible to load PKTDRV in the
  1548.       same virtual memory so it has to be loaded under DOS before the
  1549.       control program.  It therefore has no certainty that the
  1550.       application is running when it asks PKTMUX if any data has been
  1551.       received so sometimes has to wait until its timer interrupt
  1552.       coincides with the time slice of the application.  This can slow
  1553.       things down considerably and may require PKTMUX to have a larger
  1554.       buffer pool in order to cope.
  1555.  
  1556.  
  1557.  
  1558.       7.5 Listeners and /l Options
  1559.       ----------------------------
  1560.  
  1561.       One of the problems PKTMUX has to solve is to which application to
  1562.       route packets for which it has no previous knowledge.  Examples are
  1563.       ARP requests and calls to previously unused TCP or UDP ports.
  1564.       Experience has shown it is best to send ARP requests to all
  1565.       applications.  For TCP and UDP ports the requests can be either for
  1566.       well know services (such as TELNET or FTP) in which case the
  1567.       default is to send it to the first application to sign up for that
  1568.       packet type in the hope that it has a listener for this service.
  1569.       This avoids more than one response to such a request.
  1570.  
  1571.       Alternatively it may be to a port previously notified by the
  1572.       application (an example is FTP) and in this case it is sent to all
  1573.       applications who use that packet type.  This latter technique works
  1574.       provided the application is tolerant of such unsolicited messages.
  1575.       Tests so far indicate that PC-NFS and CUTCP dont mind.  However
  1576.       PCTCP, Waterloo TCP and WINQVT are more strict and send back an
  1577.       error message.  For TCP this is a RST (reset) and for UDP it is an
  1578.       ICMP Port Undefined message.  Since this upsets the service being
  1579.       used such cases are trapped and the error message filtered out.
  1580.       Note that the WINQVT log will report "Packet received for invalid
  1581.       port - reset sent".  In the PKTSTATS output such packets are
  1582.       counted under "Ignored:  err Resp" and under "Ign" in the "PKTDRV
  1583.       channels:" tables.  There is currently no way of preventing such
  1584.       unsolicited messages being sent to an application and the /l
  1585.       options only apply to packets for well known ports.
  1586.  
  1587.       The definition of a well known port is a little vague these days.
  1588.       Originally it was 0-255 but the Unix fraternity officially extended
  1589.       this to 1024 for Unix Standard Services and the current RFC 1106
  1590.       list goes way beyond this value.  As some applications assume this
  1591.       rule in their port usage so PKTMUX designates ports 0-255 as well
  1592.       known and routes them to only one channel.  Any other services
  1593.       outside this range are likely to be provided by a specialist server
  1594.       so sending to all should locate it.  This may be revised in the
  1595.       light of experience.
  1596.  
  1597.       The various /l options on PKTDRV override the default setting for
  1598.       well know services and indicate where such a request should be
  1599.       sent or not.  Options of the form /l indicate this application has
  1600.       servers of this type and /!l indicates it does not.  The absence
  1601.       of an /l or /!l option means the application provides all servers
  1602.       but it is used only when no other application has an /l option.
  1603.  
  1604.       The /l option types are implemented as an hierarchy with the
  1605.       specific protocol ports for TCP and UDP taking precedence over the
  1606.       protocols themselves which in turn take precedence over the
  1607.       protocol family (IP).  Last in precedence is a general listener.
  1608.       The applications are also searched in reverse order of loading so
  1609.       that a later application can take precedence over an earlier one.
  1610.  
  1611.  
  1612.       The simplest method of making sure the main services such as FTP
  1613.       are found is to load that application first.  Where this is not
  1614.       possible then the PKTDRVs for applications that do not support
  1615.       servers over a protocol should be marked as such by an /!l (ie not
  1616.       a listener) type option so that it is avoided when looking for the
  1617.       default.  And any application that wants to take over from the
  1618.       default can be marked by an /l (ie I am a listener) type option.
  1619.       Note that requests will be discarded if no listener is found.
  1620.  
  1621.       PKTSTATS will display the listener settings for each channel.
  1622.  
  1623.  
  1624.       7.6 Port Duplication
  1625.       --------------------
  1626.  
  1627.       When an application makes a call to a service it specifies the port
  1628.       to which replies should be sent.  How this port number is generated
  1629.       is dependent on the application.  There is therefore a possibility
  1630.       that two applications could generate the same reply port number.
  1631.       To combat this PKTMUX inspects all reply port numbers in outgoing
  1632.       packets for TCP and UDP and replaces any new and duplicated number
  1633.       by the next one higher, if that is not in use.  It also resets the
  1634.       packet header sumcheck if this is being used.  Port numbers on
  1635.       incoming packets are similarily mapped along with ICMP packets
  1636.       containing TCP and UDP.  Thus it is possible to run two copies of
  1637.       the same application without any problems of port duplication.
  1638.  
  1639.       However there are two areas that cannot be fixed.  One is where the
  1640.       application specifies the reply port via the protocol.  For example
  1641.       FTP usually specifies the port to be used for the file transfer via
  1642.       the PORT command in its controlling data stream.  Since PKTMUX does
  1643.       not analyse the data going through it this is not noted.  There is
  1644.       therefore the possibility that such a port number may be duplicated
  1645.       if two copies of the same application are run.  Fortunately tests
  1646.       with the FTP implementations from PCTCP and CUTCP have not shown
  1647.       this to be a problem.
  1648.  
  1649.       The second is where the reply port is a well known port and an
  1650.       example of this is BOOTP. In this case it assumed that any
  1651.       duplicate use of this port is by an application taking over the
  1652.       function this well known port supports. Thus a BOOTP exchange on
  1653.       one channel will be assumed complete when a second channel uses
  1654.       BOOTP. If this is not the case, as it would be if two applications
  1655.       started up at the same time, then hopefully the BOOTP retry
  1656.       mechanisms will recover the situation.
  1657.  
  1658.  
  1659.  
  1660.       7.7 IP Fragmentation
  1661.       --------------------
  1662.  
  1663.       IP Fragmentation is a means whereby a large packet is carried
  1664.       through a network whose packet size limit is too small. It is done
  1665.       by simply putting the extra data into the data part of one or more
  1666.       IP packets ie. where you would normally expect the TCP or UDP
  1667.       header to be. The constituent packets of the fragment are linked by
  1668.       having the same IP Identification.
  1669.  
  1670.       PKTMUX notes the channel that the first fragment is sent to and
  1671.       then routes all further fragments with the same Identifier to that
  1672.       channel. This works satisfactorily for most cases but has some
  1673.       potential problems.
  1674.  
  1675.       The first is when the fragments arrive out of order.  As PKTMUX
  1676.       needs the first packet in order to get the TCP or UDP header out
  1677.       then any fragment that arrives before this packet will be
  1678.       discarded. Such cases are recorded in the NO FRAGMENT count of
  1679.       PKTSTATS output. The protocol retry mechanisms should retransmit
  1680.       the packet and hopefully the first packet of the fragment will
  1681.       arrive first and everything will be ok.
  1682.  
  1683.       The second is a more difficult problem in that if the same IP
  1684.       Identification is used by two fragmentation sources then PKTMUX has
  1685.       no way of distinquishing between the two.  Hopefully this will be
  1686.       very rare and the receiving application(s) should spot that they
  1687.       have the wrong fragments and their retry mechanisms should recover
  1688.       the situation.
  1689.  
  1690.       Note that when fragmentation is occurring then the number of
  1691.       received and copied fragments (excluding the first) is displayed by
  1692.       PKTSTATS.
  1693.  
  1694.  
  1695.       7.8 Other IP Protocols
  1696.       ----------------------
  1697.  
  1698.       PKTMUX is only able to multiplex on IP protocols it knows about.
  1699.       These currently are TCP, UDP and ICMP. Any other IP protocol type
  1700.       will be handled correctly provided there is only one channel using
  1701.       it. Multiple usage of another IP protocol will therefore fail.
  1702.       Provided any such protocol has a port mechanism of some form it
  1703.       would be possible add to support to PKTMUX if required.
  1704.  
  1705.  
  1706.  
  1707.       7.9 IEEE802.3 (ISO 8802/3) Protocol Support
  1708.       -------------------------------------------
  1709.  
  1710.       Since this protocol changes the meaning of the TYPE field to be the
  1711.       length, PKTMUX has to ask the Packet Driver to send it all packets
  1712.       and not just those of a certain TYPE.  This dramatically increases
  1713.       the number of packets copied into PKTMUX and hence the overhead on
  1714.       the PC.  It also increases the response time, especially under
  1715.       control programs such as Windows 3, so can give protocol problems
  1716.       as well. Use of the /b option (see next section) can improve this.
  1717.  
  1718.       Users of the RAL LLCPKT2 product which allows the Rainbow software
  1719.       to run alongside a Packet Driver interface should note that PKTMUX
  1720.       now supports the simpler LLCPKT product which, f used with the /b
  1721.       option, can give a more efficient system.
  1722.  
  1723.  
  1724.       7.10 Use of Packet Driver Internal Buffer
  1725.       -----------------------------------------
  1726.  
  1727.       One of the limitations of the Packet Driver interface is that when
  1728.       it receives a packet it then calls a routine in the application
  1729.       asking for a buffer of a certain size.  Thus PKTMUX only knows how
  1730.       big the data is but has no idea of the contents other than that
  1731.       provided via the handle used in the call.  The generic Packet
  1732.       Driver code is actually provided with a pointer to the TYPE field
  1733.       which is also used to access the next byte but unfortunately the
  1734.       registers pointing to this are overwritten before PKTMUX is called.
  1735.  
  1736.       It is therefore reasonable to assume that somewhere within the
  1737.       Packet Driver program are held the first few bytes of the incoming
  1738.       packet and that they are valid at the point when PKTMUX is asked to
  1739.       provide a buffer in order to read this packet.  The /b option
  1740.       instructs PKTMUX to search the Packet Driver for this buffer, to
  1741.       copy it and then to test it against the data it actually obtains
  1742.       from the Packet Driver.  Should a consistent match be found then
  1743.       the Packet Driver buffer is used to filter out those packets that
  1744.       are of no interest and to send those packets for which there is in
  1745.       only one channel direct to the application.  This should therefore
  1746.       reduce the copying of data and in the case of IEEE802.3 support can
  1747.       dramatically reduce the overhead.  The gain in other cases is
  1748.       dependent on how much of the packet is found and hence how much of
  1749.       the protocol headers is available for analysis.
  1750.  
  1751.       How you locate the buffer is an interesting problem.  So far two
  1752.       types of Packet Driver implementations have been found.  One,
  1753.       exampled by NE2000, uses a fixed buffer every time so this is
  1754.       fairly easy to locate.  A second type uses a buffer pool and this
  1755.       is rather more difficult to track.  The BICC 16 bit card uses this
  1756.       technique and experimentation has shown that a segment register
  1757.       always points to the correct area of memory.  An algorithm that
  1758.       copes with both these cases has been implemented.  Testing with
  1759.       other cards will no doubt require it to be modified.  PKTSTATS
  1760.       gives an indication of where the algorithm is and the eventual
  1761.       outcome of the testing.
  1762.  
  1763.  
  1764.       Please note that this is a test implementation to evaluate the
  1765.       technique.  Once again PKTMUX is breaking all the rules.  How
  1766.       effective this option is depends on the size of buffer available.
  1767.       When the available buffer is 64 bytes you get the full benefit and
  1768.       for all cases there should be a significant improvement in
  1769.       performance.  Where the buffer is smaller then below 48 bytes the
  1770.       benefits tail off considerably. However if you are using IEEE802.3
  1771.       then the /b option avoids the copying of all packets not for
  1772.       this address so gives a significant reduction in overheads.
  1773.  
  1774.  
  1775.       7.11 Novell Protocol Support
  1776.       ----------------------------
  1777.  
  1778.       PKTMUX has been tested satisfactorily with Novell Netware using
  1779.       their TYPE 8137 protocol.  It has not been tested with the 802.3
  1780.       varient and this is not recommended due to the overheads it
  1781.       creates.  If however the /b option successfully located a Packet
  1782.       Driver buffer then the overheads would probably be acceptable.  The
  1783.       examples section shows various ways of using PKTMUX with Novell
  1784.       Netware.
  1785.  
  1786.  
  1787.  
  1788.  
  1789.       8. Problem Solving
  1790.       ==================
  1791.  
  1792.       This section attempts to suggest how problems with PKTMUX should be
  1793.       tackled. It is worthwhile reading the meaning of the various
  1794.       options and also the Technical Description above in order to
  1795.       ascertain if your problem and its solution is documented therein.
  1796.       Also the section on Bugs/Features and Problem Programs should be
  1797.       consulted.
  1798.  
  1799.       One of the biggest difficulties with PKTMUX is sorting out why
  1800.       something is not working properly.  To assist in this the utility
  1801.       PKTSTATS is provided which, when used with the /a option, gives
  1802.       details of what PKTMUX is up to and its various counts.  Any count
  1803.       whose name is in CAPITAL letters indicates data being lost or
  1804.       discarded because there is a problem and the following attempts to
  1805.       explain what they mean.  Note that such counts are usually only
  1806.       displayed when they have a value so their absence indicates all
  1807.       should be well.
  1808.  
  1809.       The first class of problems is where PKTMUX simply does not work
  1810.       with an application.  The first test is to run the application on
  1811.       its own having loaded PKTMUX with the /x option.  Normally in this
  1812.       situation PKTMUX would pass data direct to the application but with
  1813.       the /x option (multiplex) it copies data to its buffers and uses
  1814.       its multiplexing facilities thus checking if they can cope with the
  1815.       application.  If this fails then the application probably has some
  1816.       quirk that confuses PKTMUX.  If it is a standard application that
  1817.       works elsewhere then you may have a networking set up that PKTMUX
  1818.       cannot cope with.
  1819.  
  1820.       A second test is to add the /c (copy) option to each PKTDRV -
  1821.       PKTSTATS will show /TX_Copy for that channel.  This causes it to
  1822.       copy the data sent to the network into its own buffers and this has
  1823.       been known to cure problems related to the use of upper and/or
  1824.       EMS/XMS memory.
  1825.  
  1826.       Where an application works with PKTMUX as above but not in
  1827.       conjunction with other applications then it is worth trying
  1828.       different combinations and seeing what does and does not work.
  1829.       This may isolate one application as being the problem or show a
  1830.       certain loading order to be the cause.  Possible reasons are that a
  1831.       listener for a well known port is being usurped by another
  1832.       application (see PKTDRV /l option) or that one application simply
  1833.       prevents any other from running.  Check the Bugs/Features and
  1834.       Problem Programs section for any indication of problems.  It is
  1835.       also worthwhile checking if anyone else has a similar problem.
  1836.  
  1837.       Another class of problems is where PKTDRV is marked Busy when it
  1838.       should be Free or there are no Free PKTMUX channels.  This is
  1839.       usually due to applications failing in some manner and the means of
  1840.       recovery are described in the Channel Management part of the
  1841.       Technical Description section.
  1842.  
  1843.  
  1844.       The final, and probably the largest, class of problems is where
  1845.       everything works for a while then things start going wrong. Using
  1846.       PKTSTATS can give an indication of the cause but in general it is
  1847.       only those cases where the problem can be reproduced that a
  1848.       solution can be found with any degree of certainty. Note that
  1849.       PKTMUX depends on probability for its successfull working and when
  1850.       the odds are wrong it will fail for no apparent reason. However for
  1851.       regular failures the suggestions below may help.
  1852.  
  1853.       If the /b option is in use on PKTMUX it should be removed to see if
  1854.       this is the cause.
  1855.  
  1856.       A general technique is to run PKTSTATS /a and note the various
  1857.       counts.  Then run the application(s) that cause the failure and
  1858.       subsequently run PKTSTATS /a again and note which counts have
  1859.       increased.  This could give a clue about whats going wrong as
  1860.       detailed below.
  1861.  
  1862.       A possible reason for an application not working properly is that
  1863.       it, or PKTMUX, has run out of buffers with which to receive data.
  1864.       This is especially prevalent under a control program such as
  1865.       Windows where applications do not get enough CPU time to process
  1866.       their data.  Details of buffer usage are given in the "Buffers:"
  1867.       table and for the case of PKTMUX running out of buffers the count
  1868.       "PKTMUX NO BUFFER" is given in the "Recv ignored reasons" line.
  1869.       Increasing the number of buffers used via the /1 to /9 options on
  1870.       PKTMUX should solve this one.
  1871.  
  1872.       Detecting that the application is running out of buffers is more
  1873.       difficult since PKTMUX may not be able to deliver the data for a
  1874.       variety of reasons.  This can be isolated by running the
  1875.       application on its own over PKTMUX (without the /x option).  As it
  1876.       has only one channel operative PKTMUX just passes all calls
  1877.       directly to the application.  Any refusal by an application to
  1878.       supply a buffer causes PKTMUX to copy the data into its own
  1879.       buffers.  This is shown in the Copied count on the "Recv total"
  1880.       line and and in the "Recv copy reasons" line.  The PKTDRV channel
  1881.       counts also show the copied count for each channel.  The only
  1882.       solution is to increase the applications buffers if this is
  1883.       possible.
  1884.  
  1885.       When PKTMUX has more than one channel Busy, and has to wait to pass
  1886.       received data to an application, this is also recorded in the
  1887.       PKTDRV table.  The wait reason is either no buffer available from
  1888.       application (Buff) or, under Windows 3 or DESQview only, the
  1889.       application was not in memory (App).  For the Buff case if the /d
  1890.       option is given then the data is discarded and the "Dropped" counts
  1891.       increamented.  The App case is especially prevalent for background
  1892.       processes paticularily when a foreground process requires a lot of
  1893.       CPU.  When it has to wait PKTMUX has to decide whether to try again
  1894.       later or discard the buffer.  The latter is only done when PKTMUX
  1895.       has several channels that are actually moving data at the same time
  1896.       and it has insufficient buffers to meet all their demands.  The
  1897.       "LOST" count in the "PKTDRV channels:" table would be incremented
  1898.       in this instance and again increasing the number of PKTMUX and/or
  1899.       application buffers is a possible solution.  The count in the
  1900.       "Queues" section "LOST DUE TO APPLICATION ....." sums this total
  1901.       for all channels.  It may be
  1902.  
  1903.  
  1904.  
  1905.       that, especially under Windows 3 or DESQview, the PC has simply not
  1906.       enough horsepower to cope with the communications load as well as
  1907.       any processing in progress at the same time.  Thus the
  1908.       application(s) are not processing the received data fast enough to
  1909.       cope with the incoming rate.  Alternatively it may be an
  1910.       application, such as TRUMPET, that refuses to accept packets when
  1911.       it knows it is not expecting data.  Note that the /d option can
  1912.       significantly increase this count since packets are throw away at
  1913.       the first refusal.
  1914.  
  1915.       Another reason that data may be discarded is when there is no
  1916.       listener for the service that is being requested.  The count "NO
  1917.       LISTENER" is incremented in the "Recv ignored reasons" list.  There
  1918.       are several possible reasons for this but in general it is because
  1919.       the /l and /!l options on PKTDRV calls dont leave a suitable
  1920.       listener.  Note that this count will not be incremented if there is
  1921.       a listener available but it does not support the service requested.
  1922.       In this case an application that supports the service must be run
  1923.       with a PKTDRV that routes requests for the service to it by using
  1924.       the /l or /!l options.
  1925.  
  1926.       A final reason for discarding data is when an IP Fragment arrives
  1927.       out of order.  If it arrives before the first fragment then PKTMUX
  1928.       has no way of knowing to which channel it belongs and so discards
  1929.       it and increments the count "NO FRAGMENT" in the "Recv ignored
  1930.       reasons" list. The subsequent retry should overcome this problem
  1931.       provided that this time the first fragment arrives first.
  1932.  
  1933.  
  1934.  
  1935.  
  1936.       9. Bugs/Features and Problem Programs
  1937.       =====================================
  1938.  
  1939.       The following list of situations that need special action.  It is
  1940.       based upon limited experience so only covers a few cases at
  1941.       present.
  1942.  
  1943.       The 16 bit BICC ethernet cards require the /c option on PKTDRV
  1944.       when running under a control program and dont work with WINPKT.
  1945.       The /c is not required when under DOS but is needed when a
  1946.       protocol stack such as PCTCP is run under DOS for a Windows 3
  1947.       application such as Vista eXceed X Windows.
  1948.  
  1949.       When the X Window server Vista eXceed is running over PCTCP it
  1950.       must have enough buffers allocated via the ETHDRV command otherwise
  1951.       the call will be reset at intervals and thus fail. An ETHDRV call
  1952.       similar to the following is recommended:
  1953.  
  1954.          ethdrv -t 10 -p 20
  1955.  
  1956.       Further details are given the Vista eXceed and PCTCP manuals.  It
  1957.       may also be necessary to increase the PKTMUX buffer allocation when
  1958.       using this or other X Windows servers.
  1959.  
  1960.       PKTMUX will not work with the packet driver version of Novell IPX
  1961.       if the PKTDRV is using Interrupt 64. This is because Interrupt 64
  1962.       is a Novell API and so from v1.1 onwards it is not allocated by
  1963.       default.
  1964.  
  1965.       IEEE802.3 support can give problems with other protocols due to the
  1966.       overheads it imposes. In particular Novell running over TYPE 8137
  1967.       protocol has been found to crash in this mode. Whether Novell using
  1968.       their version of 802.3 works is currently untested.
  1969.  
  1970.       PKTMUX tends to operate a lot with interrupts disabled. This may
  1971.       cause problems with time critical communications methods such as
  1972.       asynchronous links using SLIP.
  1973.  
  1974.       TRUMPET refuses to accept packets when it is waiting for user input
  1975.       and expects no more data.  This can cause PKTMUX to run out of
  1976.       buffers under heavy loading.  It is recommended that the /d option
  1977.       be added to the PKTDRV used by TRUMPET.
  1978.  
  1979.       When PC-NFS is in use alongside PCTCP then a TSR, such as the MOS2
  1980.       3270 emulator, is unable to run when the PCTCP FTP program is
  1981.       waiting for a command. The problem does not occur with the CUTCP
  1982.       FTP so it appears to be related to the wait loop used by the PCTCP
  1983.       FTP when waiting for a command.
  1984.  
  1985.  
  1986.  
  1987.  
  1988.       10. Differences in PKTMUX versions
  1989.       ==================================
  1990.  
  1991.  
  1992.       10.1 Version 1.0
  1993.       ----------------
  1994.  
  1995.       First release to prove that the techniques worked.  Note this
  1996.       version does not support IP Fragmentation.
  1997.  
  1998.  
  1999.       10.2 Version 1.0a
  2000.       -----------------
  2001.  
  2002.       PKTMUX now checks that it is loading on top of a real Packet Driver
  2003.       and aborts if it finds its actually a PKTDRV.
  2004.  
  2005.  
  2006.       10.3 Version 1.1
  2007.       ----------------
  2008.  
  2009.       The programs from this version must not be mixed with those from
  2010.       version 1.0 as they are incompatible.
  2011.  
  2012.       In searching for a Packet Driver PKTMUX now checks the interrupts
  2013.       to see if PKTMUX or PKTDRV is already loaded and aborts if one is.
  2014.       Similarily if the Packet Driver interrupt is specified this is
  2015.       checked to see if it is a real Packet Driver.  This is to prevent
  2016.       multiple loadings of the system.  The option /o (override) has
  2017.       been added to PKTMUX to override this restriction.
  2018.  
  2019.       PKTMUX now starts by default with 2 channels.
  2020.  
  2021.       PKTDRV options /f and /!f have been added to force a PKTDRV to the
  2022.       Free or Busy state.  The PKTSTATS output has been changed to
  2023.       reflect this.
  2024.  
  2025.       PKTDRV no longer uses Interrupt 64 by default as this clashes with
  2026.       a Novell API.
  2027.  
  2028.       IP Fragmentation was not supported in previous versions.  It is now
  2029.       supported within limitations (see Technical Description).
  2030.  
  2031.       The buffer management system has been improved especially with
  2032.       regard to discarding unwanted packets. The option /d (drop) has
  2033.       been added to tell PKTMUX to drop all packets for which the
  2034.       application has no buffer rather than keeping them until the
  2035.       application has space. The same option is available on PKTDRV which
  2036.       works on a per channel basis. The number base of buffers has been
  2037.       also been increased in some cases.
  2038.  
  2039.       A bug in the Packet Driver handle mapping when PC-NFS was in use
  2040.       has been fixed as has one in the area of duplicate handles.
  2041.  
  2042.       A bug in the mapping of ICMP packets onto channels has been fixed.
  2043.       The bug caused ICMP packets containing IP data to be sent all
  2044.       channels.
  2045.  
  2046.  
  2047.  
  2048.       PKTMUX v1.0 used a time out mechanism to determine whether a PKTDRV
  2049.       and its application had been forcably terminated under a Windows or
  2050.       DESQview environment.  Unfortunately this mechanism was also
  2051.       triggered when the window was Selected under Windows 3.0 for
  2052.       actions such as cut and paste and caused the channel to be closed
  2053.       down.  This has been changed in v1.1 so that in these circumstances
  2054.       a channel will not be closed down.  The option /r has been added to
  2055.       PKTMUX to reset such channels otherwise they are permanently busy
  2056.       and there is no PKTDRV to reset them.  A third parameter has also
  2057.       been added to PKTMUX to reset such channels after a given time.
  2058.  
  2059.       ARP Request Broadcasts are now sent to all channels.  The /la
  2060.       option is therefore no longer needed.  The handling of Broadcast
  2061.       packets has also been improved so that only those ARP requests that
  2062.       are not for this address are discarded.
  2063.  
  2064.       BOOTP did not work for second and subsequent channels because it
  2065.       replies on a well known port and this only went to the first
  2066.       listener. This has now been changed and the response is sent to
  2067.       originator of the BOOTP provided no other channel has done a BOOTP
  2068.       in between. If this occurs then the timeout and retry mechanisms
  2069.       should recover the situation.
  2070.  
  2071.       The problem solving section has been improved and the /x option
  2072.       (multiplex) added to PKTMUX to assist this process.
  2073.  
  2074.  
  2075.       10.4 Version 1.2
  2076.       -----------------
  2077.  
  2078.       The maximum number of channels has been increased to 8 in order to
  2079.       improve the flexibility under Windows 3. If a Channel is in a timed
  2080.       out state then further channels can still be opened without
  2081.       reaching the maximum.
  2082.  
  2083.       The /q, /v, /e and PKTDRV /n options have been added and should
  2084.       enable a BAT file to work out the current state and load programs
  2085.       as required and this is illustrated by examples. Details of the
  2086.       options follows.
  2087.  
  2088.       The option /n on PKTDRV only loads PKTDRV if it is needed, that is
  2089.       if there is not already a Free one available, and reports the
  2090.       result via the DOS ERRORLEVEL.
  2091.  
  2092.       The option /q has been introduced on PKTDRV, PKTMUX and PKTSTATS in
  2093.       order to query the current state and returns the reply in text and
  2094.       the DOS ERRORLEVEL.  PKTSTATS indicates the presence of a Packet
  2095.       Driver, PKTMUX and PKTDRV (Free or Busy).  PKTDRV and PKTMUX return
  2096.       the state of their own program.
  2097.  
  2098.       The /v option causes the DOS Environment variable PKT_INT to be set
  2099.       to the hexadecimal value of the interrupt used or found by PKTDRV,
  2100.       PKTMUX or PKTSTATS when executing a command.
  2101.  
  2102.  
  2103.  
  2104.       The /e option extends the search under a control program to outside
  2105.       the DOS session and helps in determining whether a PKTDRV is
  2106.       running within the DOS session or not.
  2107.  
  2108.       The repeatable /s (silent) option has been introduced to reduce the
  2109.       output from PKTMUX, PKTDRV and PKTSTATS.  /sss inhibits all output,
  2110.       /ss all but errors and /s lets through warnings as well.
  2111.  
  2112.       The /b option to reduce packet copying by trying to locate the data
  2113.       in the Packet Driver has been added.  This can may give improved
  2114.       performance which in the case of IEEE 802.3 can be dramatic.  This
  2115.       is a test implementation for evaluation purposes.
  2116.  
  2117.       Support for a channel using IEEE 802.3 is now included via the /i
  2118.       option on both PKTMUX and PKTDRV.  This feature allows PKTMUX to
  2119.       support the RAL LLCPKT product instead of using LLCPKT2 and with
  2120.       the /b option can be very much more efficient.  This is a test
  2121.       implementation for evaluation purposes.
  2122.  
  2123.       A bug in PKTDRV whereby the /d option did not work has been fixed.
  2124.  
  2125.       A bug in PKTDRV and PKTMUX whereby they could not be run by
  2126.       LOADHIGH when there was a limited amount of upper memory has been
  2127.       fixed. A bug in correct allocation allocation of buffer memory in
  2128.       such circumstances has also been fixed.
  2129.  
  2130.       PKTDRV and PKTMUX now release all their file handles so frequent
  2131.       unloading does not cause you to run out.
  2132.  
  2133.       A bug which caused WINQVT to crash the PC if it was run twice has
  2134.       been cured. This fix should cure problems with any Windows
  2135.       application which uses a DOS TSR (PKTINT in the case of WINQVT) to
  2136.       interface it to a Packet Driver.
  2137.  
  2138.       The decision criteria for sending a packet direct to an application
  2139.       rather than copying it has been improved.
  2140.  
  2141.       The algorithm whereby packets held in the buffer queue were dropped
  2142.       after a certain time has been improved.  Packets are now held until
  2143.       the application requests them provided there are sufficient free
  2144.       buffers left.
  2145.  
  2146.       The filtering of broadcasts and especially ARP requests has been
  2147.       improved.
  2148.  
  2149.       Bugs in the handling of ICMP messages have been fixed.
  2150.  
  2151.       PKTDRV actions on another PKTDRV such as /r, /u and /t are now
  2152.       checked under Windows and DESQview to see if they are being done on
  2153.       a PKTDRV that was loaded under DOS and refused if so.
  2154.  
  2155.       PKTSTATS output now gives more information especially that relevent
  2156.       to the effect of the /b option.
  2157.  
  2158.  
  2159.  
  2160.  
  2161.       11. Support
  2162.       ===========
  2163.  
  2164.       PKTMUX is supplied free and is supported, within the limits of its
  2165.       specification, for all users at RAL on IBM PC and PS/2 computers
  2166.       and near clones.  Note that support is confined to bugs in the
  2167.       programs and clarification in the documentation of the systems
  2168.       limitations.
  2169.  
  2170.       Users outside RAL are requested in the first instance to obtain
  2171.       copies and help from their normal support sources.
  2172.  
  2173.       Academic user support organisations may seek help from RAL but the
  2174.       latter will only be given on a 'best endeavours' basis.
  2175.  
  2176.       There is no support for other organisations other than by private
  2177.       arrangement with the author.
  2178.  
  2179.       Updates of the software may be file transferred from the binary
  2180.       file PKTMUXxx EXE (xx being version number without a point -
  2181.       currently 12) on the RAL IBM mainframe (UK.AC.RL.IB on JANET,
  2182.       IB.RL.AC.UK on the Internet) disc PCSOFT 192.  TCP/IP users of
  2183.       Anonymous FTP should CD to PCSOFT.192 and binary GET PKTMUXxx.EXE.
  2184.       Executing the file will produce the program and documentation.
  2185.       Further details of how this is done can be obtained by email from
  2186.       the author.
  2187.  
  2188.       Bug reports or problems should be reported, ideally by email, to
  2189.       Graham Robinson:
  2190.  
  2191.       Via JANET    : GWR@UK.AC.RL.IB         G W Robinson
  2192.       Via Internet : GWR@IB.RL.AC.UK         Atlas Centre
  2193.       UK Telephone : 0235 44 5636 or 6391    Rutherford Appleton Laboratory
  2194.       International: +44 235 44 5636         Chilton, Didcot
  2195.                                              Oxon,OX11 0QX,UK
  2196.  
  2197.       12. References
  2198.       ==============
  2199.  
  2200.       The RAL LOADSYS system version 1.4 is held in file LOAD14 EXE on
  2201.       PCSOFT 192 as detailed above. It is a loader/unloader for both
  2202.       programs and device drivers.
  2203.  
  2204.       The RAL LLCPKT and LLCPKT2 systems are held together in file
  2205.       LLCPKTS EXE on PCSOFT 192.  They map the BICC MPS ethernet
  2206.       interface onto a Packet Driver and are only of use to users of the
  2207.       Rainbow software.
  2208.  
  2209.       The RAL MOS2 IBM 3270 emulator version 2.3 is held in files MOS23
  2210.       EXE, MOS23X EXE and MOS23Y EXE on PCSOFT 192.  This TSR provides
  2211.       IBM 3270 emulation, EEHLLAPI and GDDM-PCLK support over
  2212.       asynchronous and ethernet communications.
  2213.  
  2214.