Files for simulation:
  The generic class for sockets work.
     GenericHostSockets.h
     GenericHostSockets.cpp

  The generic protocol class from which other protocols are derived.
  Also contains the definition of the Variable struct.
     Protocol.h
     Protocol.cpp

  The IOS protocol.  Also contains RegisterIOSVariable, IOSHostComms,
  and IOSHostCommsExitRoutine which are not part of a class and are
  defined as extern "C" functions for use with other languages.
     IOSProtocol.h
     IOSProtocol.cpp

  The DCLS protocol. Also contains RegisterDCLSVariable, DCLSHostComms,
  and DCLSHostCommsExitRoutine which are not part of a class and are
  defined as extern "C" functions for use with other languages.
     DCLSProtocol.h
     DCLSProtocol.cpp

  Platform specific symbol definitions as well as debugging definitions.
     HostComms.h

Files for testing:
     commstest.cpp

Sample Makefile:
     Makefile

Symbol Defines:
     VXWORKS is used for VxWorks specific sections.
     WIN32 is used for Windows specific sections.
     _DEBUG, if defined, will define additional symbols for printing
          error and status messages.

Constants:
     Protocol.h :
        // Maximum len of a string for a symbol name.
        static const unsigned short MAX_VARIABLE_NAME_LEN   =   80;

        // Note: this is for IPv4.  IPv6 is 1440.
        static const unsigned short MAX_ETHERNET_SEG        = 1460;

     IOSProtocol.h :
        static const unsigned short IOS_MAX_VARIABLES         = 75;

        // MAX_ETHERNET_SEG is defined in protocol.h
        static const unsigned char  IOS_MAX_SEGMENTS_TO_SEND  = 5;

        // default: 7300 for IOS but can be overridden.
        static const unsigned short IOS_MAX_SEND_BUFFER       = 
                                                      MAX_ETHERNET_SEG * 
                                                      IOS_MAX_SEGMENTS_TO_SEND;

        // default: 1460 for IOS but can be overridden.
        static const unsigned short IOS_MAX_RECEIVE_BUFFER    = 
                                                              MAX_ETHERNET_SEG;

        // expands the size of the TCP/IP layer buffers to hold 
        // more than one message in case the current message can
        // not be sent. Can be overridden.
        static const unsigned short IOS_RECEIVE_BUFFER_CACHE  = 5;
        static const unsigned short IOS_SEND_BUFFER_CACHE     = 5;

        // default port number but can be overridden.
        static const unsigned short IOS_PORT                  = 3000;

     DCLSProtocol.h :
        static const unsigned short DCLS_MAX_VARIABLES         = 50;

        // MAX_ETHERNET_SEG is defined in protocol.h
        static const unsigned char  DCLS_MAX_SEGMENTS_TO_SEND  = 1;

        // default: 1460 for DCLS but can be overridden.
        static const unsigned short DCLS_MAX_SEND_BUFFER       = 
                                                      MAX_ETHERNET_SEG * 
                                                      DCLS_MAX_SEGMENTS_TO_SEND;

        // default: 1460 for DCLS but can be overridden.
        static const unsigned short DCLS_MAX_RECEIVE_BUFFER    = 
                                                              MAX_ETHERNET_SEG;

        // expands the size of the TCP/IP layer buffers to hold 
        // more than one message in case the current message can
        // not be sent. Can be overridden.
        static const unsigned short DCLS_RECEIVE_BUFFER_CACHE  = 1;
        static const unsigned short DCLS_SEND_BUFFER_CACHE     = 1;

        // default port number but can be overridden.
        static const unsigned short DCLS_PORT                  = 4000;

     
  To overide buffer sizes, cache sizes, and port numbers, several methods
  are possible.  One is to change the header files.  Another is to go
  to the constructor for the protocol that you wish to change and change
  the call that creates a instance of CGenericHostSockets since all of
  these parameters are passed.

     GenericHostSockets.h
        CGenericHostSockets(unsigned short ushPort = 3000,
                            unsigned long int ulMaxReceiveBuffer = 1460,
                            unsigned long int ulReceiveCache = 5,
                            unsigned long int ulMaxSendBuffer = 7300,
                            unsigned long int ulSendCache = 5,
                            BYTE_ORDERING eNetworkByteOrdering = BIG);

  If parameters are not passed, the default is the IOS data.  Also,
  the last option tells the class how the data is to be represented over
  the network.  The TCP/IP spec says that it is big endian.  Based on the
  value passed and a determination of the current machines byte-ordering
  several function pointers will be set to either reverse the byte-ordering
  or leave the byte-ordering alone.  The default is to send the data as
  big endian.

Status:
  The IOS protocol is mostly functional.  An IOS can connect and get data.
  However, I have not tested changing values in a real-IOS sense.  Also,
  I still considering changes to what happens if duplicate data or unknown
  variables are requested by the IOS.

  For DCLS, I still have a lot of unknowns.  The IOS protocol works generally
  as a publish-subscribe method in that the client tells the protocol what
  it wants, once, and will get all of that data every pass.  And, the only
  variables that can be changed are variables that the IOS has requested to
  watch.  For the DCLS, I know of two different sets of data--one from the 
  host to the DCLS and one going in the opposite direction.  Sometimes I think
  this would call for a host at each end and a client at each end.  But, I
  don't think that would use the bandwidth efficiently.  I don't think I can
  adequately finish the DCLS code until I know more about the data.  And when
  I say finish, I mean to make the code as share as much commonality as 
  possible.  I have been thinking about adding additional parameters to the
  RegisterDCLSVariable to allow for different data to be going each way.  
  However, the question of the same variable going both ways comes up every
  now and then and I am not sure if this happens and if it does what to 
  do about it.

  To run the DCLS code, the DCLSHostComms function needs to be scheduled.  The
  GenericHostSockets using a non-blocking socket with the Nagle algorithm 
  disabled.  IP addresses are determined by looking up the current hostname
  and then getting the address for that host.  This will require that the
  hosts file be set up.  The code doesn't care if the IP address is the same
  on every DCLS nor does it care if the name is the same.  As long as the
  name of the machine is set and an IP address is assigned to it.  Since I
  don't have a dual ported card nor the VxWorks environment, I am at a lost
  as to how the hosts file looks or where it resides.  I do know that VxWorks
  allows an application to add to the host table using something like:

    hostAdd("jpats-tgt1", "206.189.251.194");

  Of course, the name would have to match the name that is returned by 
  gethostname().