July 5, 2000
The following modules have changed as a result of the implementation of
the new library module ip.c. These changes are refelected in the
GPL package 1.24-2000.07.05. Here is a list of the changes:
Header Files
There is a new library header file called ip.h. This header is
not automatically included.
Library Modules
A new library module called ip.c has been created to handle all
functions related to IP addressing and resolution. There are currently
three functions in this module: ip_host2ip will resolve a host
name to an IP address, ip_ip2host will resolve an IP address to a
host name and the function isip, which used to be located in the
library module parse.c has been moved to this new library module.
Application Modules
The following application server modules have changed:
- dbsrv.c - Bbuuzzb database server
- dumsocks.c - dumsocks server
- socloc.c - socloc server
- sys_log.c - system log server
The above servers have had their main initialization function changed
to obtain the IP address of the current machine and passing this IP
address to socloc.
The following application client modules have changed:
- db.c - Bbuuzzb database client
- dbstress.c - Bbuuzzb database stress
- dumsockc.c - dumsocks client
- iresolve.c - IP resolve
- sockc.c - universal socket client
Each of the above applications has had the new library module ip.c
added to its link sequence and also included the header file ip.h.
API Modules
The two socloc API modules sloc.c and slconfig.c
have had the header file ip.h included.
Unix Shell Scripts
The following Unix shell scripts have been changed to add the new
library module ip.c:
- cclib
- mkdbsrv
- mkdumsocks
- mksocloc
- mksys_log
- mkdb
- mkdbm
- mkdbstress
- mkdbstresm
- mkdumsockc
- mkiresolve
- mksockc
July 1, 2000
While porting the socloc API code to
REALbasic, I
discovered that the automatic failover built into the API was not
functioning as designed. Only the first dead socloc server was being
recorded. Changed the function sloc_client_connect to call the
function sl_config_get_first. Also changed the function
sloc_failover to record the value of the dead port index (spos)
before entering the sloc_config_delete loop.
This change is reflected in the GPL package version
1.23-2000.07.01.
May 31, 2000
I found a major structural problem with the
client socket high level API module.
The function ipc_init was calling the socket function
connect. This means that the only way to connect to a socket server
would be to call this function. This is not the intention of the design.
I re-structured the ipclient.c module
by removing the ipc_init function as there is no specific
initialization required other than to load the host name and port number
of the socket server. I also added the functions ipc_set_active to
set/load the host name and port number of the server, ipc_get_active
to obtain the current host name and port number and also added the
function ipc_send_receive which will connect to the server, send the
command request and wait for a reply. The connection to the server is now
performed in the new function ipclient_connect. The functions
ip_send_data and ipc_recv_data no longer have any purpose
and have been removed.
The
client socket high level API header
has also been changed so that the function prototypes match the
client socket high level API module.
The sockc application also has been changed
by adding two command line switches. The -s switch will disable the
socloc interface when the program is executed.
The -l (el) command line switch specifies a client log file to use
once logging is enabled. The application now uses the
client socket high level API module to
communicate to the currently connected socket server. The client socket
global data that also was part of this application has now been removed as
well as the d_client_connect function. Two new commands have been
added to the application, they are: socloc.on and socloc.off
which allow the socloc interface to be turned
on or off while the application is running.
The above changes are reflected in the GPL package version
1.22-2000.06.01.
May 25, 2000
I discovered a bug in the sockc application. The commands
socloc.list and socloc.config.list sometimes caused the
program to blow. Upon investigation, the program turned out to be dynamic
memory allocation related. I was freeing a string and then later in
the function, attempting to use that same string. This bug has been
corrected in the new package 1.21-2000.05.25.
April 30, 2000
Completed coding of the new GPL software package designated as
1.2-2000.05.03. This version contains the completed integration of the
socloc interface with all applications.
The new GPL package has not been posted as yet. See the
newsletter for more information.
Here is a detailed list of all the code changes:
Header Files
- comcode.h - This is a new header file which contains the common socket
send and reply codes. This header is now included from other API header
files. Normally, this file should not be included from your application.
- dbcomm.h - A new command DBENG_VERSION has been added which
represents the socket server version.
- dbcs.h - Added the function prototypes db_version and
db_get_active.
- dbcscfg.h - Added the extern "C" sections for a C++ compiler.
- dbengcfg.h - Added the extern "C" sections for a C++ compiler.
- dbengver.h - Changed the value of DBENG_VERSION to
.40.03-2000.04.28.
- dbmess.h - Added the reply codes DBENG_SOCLOC_NO_INIT,
DBENG_NO_SERVER and DBENG_FAILOVER. Added include of
comcode.h.
- flsocket.h - Moved the common socket send and reply codes to the
include file comcode.h.
- ipclient.h - Added the extern "C" sections for a C++ compiler.
- ipcomm.h - Added the extern "C" sections for a C++ compiler.
- ipconfig.h - Added the extern "C" sections for a C++ compiler.
Note that this module is now obsolete but is not being removed as it might
be of some use.
- ipcsrv.h - Added the extern "C" sections for a C++ compiler.
- logger.h - Added log_file_name, log_console and
log_get_console prototypes.
- parse.h - The prototypes for the functions stricmp and
strnicmp will now only be included if the define
HAS_STRICMP (from stdhead.h) is not defined. These function
prototypes used to be controlled via the platform define OS_DOS.
- sconnect.h - Added the extern "C" sections for a C++ compiler
and added the include of the file comcode.h.
- sliocode.h - Added the extern "C" sections for a C++ compiler.
- slogcode.h - Added the extern "C" sections for a C++ compiler.
- socloc.h - Added the include of the file comcode.h.
- stdhead.h - Added the define HAS_STRICMP to control the
definition and compilation of the functions stricmp and
strnicmp. These are non-ANSI functions and some compilers include
them.
- sys_log.h - Added the include of the file comcode.h. Added the
prototype of the new function sys_log_get_active.
Library Modules
- ipconfig.c - This module is now obsolete since
socloc is now used to obtain the host name
and TCP/IP port number. This file will not be removed as it still may be of
some use.
- logger.c - This module has undergone a major change including:
- Added the global variable p_has_init to track whether the logger
interface has been successfully initialized at least once.
- Added the global variable p_console_output to control message
output to the console/display.
- Added the function log_file_name to obtain the name of the
current log file.
- Modified the function log_start to allow a NULL string in place
of the log file name if the logger interface has been successfully
initialized at least once. A NULL or empty log file name indicates to start
logging with the previously registered log file name.
- Added the function log_console to turn console/screen message
output on or off.
- Added the function log_get_console to obtain the current value
of the console/screen output flag p_console_output.
- sys_log.c - Added the function sys_log_get_active to obtain the
host name and TCP/IP port number of the currently connected sys_log server.
Removed all personal logging calls from the sys_log and
sys_log_header functions as these cause too many debugging messages.
Database API Modules
- dbcs.c - This module has seen major changes with the integration of
socloc. A Bbuuzzb server failover
will be detected and another server will be selected (if one is running)
but the database command will not be re-tried as the new Bbuuzzb
server does not have the same tables open as the original server. Upon
failover and a successful connection to another Bbuuzzb server, this
API module will return DBENG_FAILOVER to the application. Changed
items include:
- Removed all references to Winsock WSA functions and the
WSAdata structure since it is now the responsibility of the
application to use these.
- Renamed all socket variables by adding the prefix db_.
- Added function db_version to obtain the Bbuuzzb server
version string.
- Modified to use the socloc interface.
- Implemented limited failover as above.
- Added function db_get_active to obtain the current
Bbuuzzb server host name and TCP/IP port in use.
- dbeng.c - Cleaned up some debug messages.
- dbiocode.c - Added messages for reply codes DBENG_SOCLOC_NO_INIT,
DBENG_NO_SERVER and DBENG_FAILOVER.
- dblocal.c - Cleaned up some debug messages.
- dblocfg.c - Implemented turning on or off of the system logger
or personal logger (depending on the MULTIUSER define) from the
function db_config_set_log_flag.
Unix Shell Scripts
All of the Unix shell scripts have had major changes including:
- Compilation and linking is assisted using environment variables.
- Two new shell scripts have been composed called include.generic
and include.linux which load the environment variables. These two
shell scripts are dot executed from the compile/link scripts.
Refer to the script documentation for
a complete reference
Applications
- datagen - Removed log statements and unnecessary printf
statements.
- db/dbm - Moved the include of the flsocket.h inside the
multiuser defines. Modified to use socloc
if in multiuser mode. Changed the keyword connecting character from the
underscore (_) to the period (.). Added the command
version. Added the display of the currently connected Bbuuzzb
server host name and TCP/IP port number if in multiuser mode.
- dbsrv - Modified to use the socloc
interface. Added all common send and reply codes. Removed requirement in
function process_request to have at least two command words
received. Added a command line parameter consisting of the TCP/IP port
number to service.
- dbstress/dbstresm - Moved the include of the flsocket.h inside
the multiuser defines. Modified to use
socloc if in multiuser mode. Changed
function c_config_set_log_flag to turn logging back on if it was
turned off. Added command line parameters to specify the primary and
alternate table names as well as the log file name.
- dumsocks - Added command line option to suppress all console/screen
output, running quiet.
- socloc - Added command line options to run quiet and specify the
output log file name.
- sys_log - Added command line option to suppress all console/screen
output, run quiet.
April 3, 2000
Generated a new version of the GPL software package designated as
1.11-2000.04.03. This version contains the inclusion of the
socloc interface into the
sys_log server and the
Bbuuzzb database server. The database client
applications that use the sys_log API
have also been re-compiled to include the socloc API
although these applications do not (as yet) directly call the
socloc API.
While adapting the
Bbuuzzb database server, I discovered a
structural problem with the common socket codes.
These codes are required for both single and multi user applications and by
placing the codes in the header file
flsocket.h,
the single user applications will require the include of this header
which is not appropriate. For now, I have included this header file as
required. In the next version of the GPL software, I plan to separate these
common socket codes into a separate header file.
The website documentation has not yet been updated with these changes.
The documentation will be updated once the integration of
socloc is complete.
March 9, 2000
Generated a new version of the GPL software package designated as
1.1-2000.03.09. This version contains the following new components:
This GPL software package also contains the following changes:
The function log_start
has been changed to return a integer flag representing success or
failure.
The TCP IPC library modules
ipclient.c and
ipcsrv.c have been changed to remove the
Windows specific WinSock functions WSAStartup and
WSACleanup. These functions should now be called from the application
module instead of the library module. The name of the socket structure
was also changed in these two modules to prevent global naming conflicts
that have been found to affect the CodeWarrior V4 Windows compiler.
A new function called
isip has
been added to the GPL parse library module. This function will check for
a valid TCP/IP address.
September 12, 1999
While building a DOS version of the GPL software package, I encountered
some bugs in the code that the other compilers did not catch. Generated a
new package designated as 1.01-99.09.12 which contains the corrected code
in the iresolve application.
September 7, 1999
Initial release of the Future Lab GPL software including the following
components:
- clib - GPL library
- datagen - application
- db - application
- dbeng - Bbuuzzb database engine and APIs
- dbsrv - Bbuuzzb server application
- dbstress - application
- include - header files
- iresolve - application
- sys_log - system log server and API
This release designated as 1.0-99.09.07