Future Lab - Windows 32-bit Socloc Package for C/C++ Users Journal

This package contains the full source code, Windows 32-bit executable programs and documentation for the September 2000 article in C/C++ Users Journal titled A TCP/IP Socket Location Server. This version is designated 1.24-2000.07.05 which is a package version. The change log will completely describe the new or changed material. Each application also has its own version.

This package contains all necessary modules to compile socloc and all applications mentioned in the article. In order to maintain the integrity of the HTML links, the included documentation covers all current Future Lab GPL software.

The Windows 32-bit executables included in this package have been built using the GCC 2.95.2 cross-compiler hosted under Linux. This cross-compiler uses the Mingw32 (Minimalist GNU Win32) interface/library.

System Requirements

You must have enough disk space for the decompressed contents of this package which is about 1.22MB currently.

You must be running a Windows 32-bit OS. This includes one of:

You must also have the TCP/IP protocol defined and operational.

Since all of the enclosed software is extremely compact and not at all bloated, the memory requirements are minimal.

If you want to re-compile this GPL code, you will need a 32-bit Windows ANSI C compiler. Re-compiling the source code is completely discussed below.

This GPL code is very generic. You may also use the compiler of your choice providing the compiler is full ANSI C complaint and the full WinSock V1.1 (at minimum) API and library is present. Make sure you understand the code structure and the module dependencies.

Decompressing the Package

The Windows 32-bit package is distributed in WinZip format. To unZip the package, you will need to have the WinZip program installed. All files in this package use the 8.3 naming convention except for the HTML documentation which uses the '.html' extension (for compatibility with Unix).

To decompress the package:

Package Structure

This package contains all the source code, executable programs, and documentation. The directory structure of the package is as follows:

Recompiling the Source Code

In order to recompile the source code included in this package, you will need to have a Windows 32-bit ANSI C compiler installed. Create a top level directory. Copy all of the directories underneath the code directory from the package to your new directory.

The exact method of compilation will depend on whether the compiler is command line or IDE based. If the compiler is command line based, build a series of batch/command files to perform the compilation and linking.

Edit the main include file stdhead.h and make sure the correct platform is selected via the appropriate define. Also make sure the define MULTIUSER is defined or not defined as appropriate. You also may supply the appropriate defines using compiler options.

Quirks

While building the Future Lab GPL software under GNU GCC, I ran into the following issues with the compiler.

A number of warnings are flagged upon compilation. These warnings are of two types:

Socket Header Warnings

The Mingw32 (Minimalist GNU Win32) socket header files contain definitions of a number of structures where no instance of this structure is defined. This causes the GCC compiler to complain. I cannot figure out how to suppress these warnings.

Function gets is Dangerous

The GCC compiler reports that the standard C library function gets is dangerous and should not be used. I have found no issues with this function and continue to use it. There is also no documentation as to the reason why the gets is deemed dangerous.

Running the Applications, A Quick Start

Most of the single user applications can be run immediately by using the start/run option within Windows. All of the applications are text console-based and can also be run from an MS-DOS prompt. Many of the applications have one or more configuration files that need to be read. You should execute all of the Future Lab GPL applications from within the same directory where they are stored. You should also store all configuration files within this same directory. Here is a list of all Future Lab GPL applications and their runtime requirements:

dumsockc

This is the multi user client socket application that interfaces with the dumsocks and socloc server. This application requires at least one socloc server to be running and needs to be executed in a directory that also contains the socloc startup file. Refer to the dumsockc application doc for more information.

dumsocks

This application is a dumb socket server which accepts a very limited number of commands. The server is intended to be used for testing along with the dumsockc client application. This application requires at least one socloc server to be running and needs to be executed in a directory that also contains the socloc startup file. Refer to the dumsocks application doc for more information.

socloc

This socket server application serves as an information depot for all other socket servers. Socket client applications can connect to socket servers by obtaining server details from a socloc server. Multiple socloc servers can be running to provide redundancy. Multiple socket servers of the same type (identified by service name) can also be running. The socloc APIs provide automatic fail over protection for client applications interfacing with socloc servers. Automatic fail over protection is easy to accomplish with socket servers.

Documentation Guide

Here is a complete guide to the included package documentation. Note that I have tried to make sure that most links function properly. You will find that all links that refer to the Future Lab GPL software function. Links that refer to other parts of the Future Lab web site will not function properly from this readme file. In that case, please refer to the actual Future Lab web site.