CHANGES
-------

The major number changes for such things as code rewrites, changes in
syntax, and/or dramatic changes in functionality. The minor number 
changes for corrections, enhancements, etc. made to the code. There 
is no set schedule for releases. 

--TODO--

   !	Fix "hash skew", where the indexes are skewed by one entry 
   	from optimal when viewed in the watch-table. (Some servers).
   	
   +	Add the ability to count concurrent requests for mod_throttle/4.0.
   
   +	Add a new counter/gauge that maintains the average transmission 
   	rate for mod_throttle/4.0.
   	
   +	Enhancement request: add counters for HTTP status code families
   	(ie. 100-199, 200-299, 300-399, 400-499, 500-599). 

--3.13--

   !	SharedHash.c: renamed "table" to "tp", because of some user namespace
   	conflict on Mac OS X 10.1 within the header files.
   	
   !	mod_watch.c: added ";" null statement after lines 863 and 894, because
   	Mac OS X cc complains. Also replaced LARGE string with embedded newlines
   	into separate ap_rprintf() statements, because the Mac OS X cc doesn't
   	like it.
   	
   !	*.h: Wrap all the externs in the headers with `extern "C" {...}'
   
   +	Shared.c: Add MMAP_ANON as a SHARED_MEMORY_API technique (for use with
   	Mac OS X).
   	
   +	Makefile: Added Mac OS X compile time configuration.
   
   !	Mutex.c: FLOCK_API and FCNTL_API should not unlink() the lockfile in
   	MutexCreate() - in other words - don't expect the usual Unix trick of
   	opening a temporary file and unlink it before using it will keep the
   	file open or continue or continue to create it. On Mac OS X this does
   	not work.
   	
   !	mod_watch.c: Replaced ap_get_server_name() with 
   	watchGetCanonicalName() to avoid generating many different sets of
   	counters for the same virtual host when UseCanonicalName is off. 

   +	mod_watch.c, SharedHash.c, Makefile: watchInit() now verifies the
	WatchSpoolDirectory and if necessary will create it, with the
	correct permissions. The Makefile is no longer responsible for
	this. Also when the weenie files are created, we make sure
	they are owned by the Apache user. Too

--3.12--

   +	mod_watch.c: Add new tokens for WatchWhat so that its now possible
   	to count things by-port number and/or as a whole.

		As whole		By-Port
		--------		-------	
		server			server-by-port	
		remote-ip		remote-ip-by-port	
		file-owner		file-owner-by-port	
		virtual-host		virtual-host-by-port	

	Note remote-ip-by-port is the port the request came to, not the
	remote port the client is connecting from.	
  
   +	mod_watch.c: The length of the request and response headers are now
   	added to ifInOctets and ifOutOctets respectively. Apache does not
   	normally count them. Hey, you'll finally see some values for 
   	ifInOctets. See WatchWhat.
   	
   +	mod_watch.c: Add the ifInOctets column into the watch-table now that
   	we'll have something to look at.

   !	mod_watch.c: fix seg. fault when isWatchHandler in watchLog is null
   	because of an error document redirect.

--3.11--

   +	Makefile: add uninstall target that removes scripts, dynamic
   	and static modules. It does NOT yet disable the related LoadModule
   	and AddModule directives in httpd.conf; must be done by hand.
   
   +	nfields.pl: created utility to add/remove fields from spool
   	files. Intended for future enhancements requiring additional
   	fields.
   	
   !	mod_watch.c: Fix seg. fault for watch-table handler when
   	"WatchStorage files", which was introduced by some debug code.
   	
   !	Makefile: move APXS into the configurable section.
   
   !	mod_watch.c: avoid using global per request r/w variables as this
   	will not be thread safe.
   	
   !	mod_watch.c: mod_gzip always sets a value for mod_gzip_output_size
   	EVEN if it chooses not to compress a file, in which case the value
   	is zero (0). This could result in ifOutOctets not being counted
   	properly. This should now be fixed.

   !	LICENSE.TXT: minor change from "author" or "author or licensee".
      	
--3.10--

   !	mod_watch.c: Fixed incorrect report of shared memory available
   	by watch-table. This came from of changes made in 3.8.   	   
   	
--3.9--

   +	mod_watch.c: Added enhancement that allows the values monitored
   	by mod_watch to be passed to other modules. This is a prelude
   	to a possible (though not yet certain) mod_watch / mod_throttle
   	pairing, where mod_watch handles monitoring only and mod_throttle
   	would handle enforcement. This saves me duplicating alot of
   	the code in an up and coming mod_throttle/4.0, which shares
   	similar data structures. (This is an idea I've been toying with
   	since mod_watch/1.0.)
   	
   +	mod_watch.c: Add support for mod_gzip compressed output size.

--3.8--

   !	SharedHash.c: Perform bounds checking on the key string field for
   	secuirty concerns raised by <zen-parse@gmx.net>, where a rogue
   	mod_php or mod_perl script could possibly alter the contents of 
   	shared memory hash table, in particular the pointers.   	
   	
   !	Memory.c: Reimplemented the code to avoid the use of pointers
   	within the memory accounting structures and provide some basic
   	means of verifying allocated and freed memory chunks. This
   	addresses some secuirty concerns raised by <zen-parse@gmx.net>.
   	
--3.7-- (private release)

   !	Shared.c: fixed SharedDestroy() to detach AND remove the shared
   	memory block for SYSTEMV_API.
   	
   +	Shared.c: added SharedGetSize() to flesh out the API for another
   	project.
   	
--3.6--

   !	mod_watch.html, apache2mrtg.html: synced with LICENSE.TXT.
   
   +	Add WatchSpoolFile directive intended for supporting monitoring
   	of <Directory> and <Location> blocks. <LocationMatch> or 
   	<Location regex> should work, but will be grouped together under
   	the one WatchSpoolFile. Requested by Kevin Brooks (elf-friend) 
   	<brooks@netgate.net>

   !	Modified WatchWhat to accept "nothing".
   
--3.5--

   !	SharedHash.c: Fixed shLock(), shUnlock() to return -1 instead of 0
   	when the table is NULL. This is consistant with MutexLock() and
   	MutexUnlock().

   !	mod_watch.c: Fixed watchContentTable() to try first shLock()
   	then MutexLock() -- without the mixed-up return values for
   	shLock(), shUnlock() -- yes, I'm an idiot for not testing more
   	completely.
   
--3.4--

   !	mod_watch.c: Changed "WatchStorage files" to use a Mutex, but NOT 
   	allocate any shared memory (see 3.2 notes). This allows mod_watch
   	to be used on FreeBSD 4.2 "jailed" (chroot?) environment in some
   	capacity. The jailed environment appears to restrict the use of
   	shared memory.
   	
   	Bugger me. FreeBSD jailed environment restricts even the use if 
   	System V semaphores. So the only choices for serialization are:
   	
  		-DSERIALIZATION_API=FCNTL_API
  		-DSERIALIZATION_API=FLOCK_API
   	
   !	Mutex.c: MutexDestroy() would attempt to free() memory even if no
   	API had been selected.

   !	mod_watch.pl: Fix case when MRTG queries the Apache web server when
   	its down and falsely reports activity.
   	
   	Actually I have since reasoned that this is NOT a bug in either 
   	MRTG or mod_watch, but a configuration issue with MRTG's 
   	"unknaszero" as zero option. I've however left in the changes since
   	they are still useful.
   	
   !	notes-static.txt: Made minor text correction, since makefile macros
   	are not applied when this file is displayed (duh).
   	
   !	Makefile: some minor changes to style.
   
   +	Does anyone read these notes?
   
--3.3--

   !	LICENSE.TXT: has been changed once again to clarify some confusion 
   	concerning my intent and restrictions for commercial use. Essentially
   	everyone is free to use it (schools, businesses, ISPs), but not 
   	allowed to sell it (alone or bundled with other software) without
   	my permission.

   !	SharedHash.c: Added several error messeages for when shCreate() fails.
   
   !	mod_watch.c: removed static from watchMainServer for shCreate()
   	error reporting.

   !	mod_watch.c: renamed ml_id2uname() to watchGetUidName() for shCreate()
   	error reporting.
   
   +	mod_watch.c: added watchGetGidName() for shCreate() error reporting.

   !	Shared.c: SharedCreate() for the SYSTEMV_API no longer releases the
   	shared memory ID in advance, because FreeBSD 4.4 & HPUX don't like 
   	it when I later do a SharedPermission() on a non-existant ID.
   	This means that if the Apache process exits abnormally, then shared
   	memory blocks (and mutexes) will not be released to the system. 
   	You'll have to either reboot or use "ipcrm" to clean up manually.
   
--3.2--

   !	Makefile: Changed from POSIX.2 Korn Shell syntax, $(), to use
   	old Bourne Shell syntax, ``, since some machines do not 
   	default to a POSIX shell.
   	
   !	Makefile: Restructure Makefile to build two different libraries
   	for static and dynamic builds. Shared library complier flags have
   	to be applied on all objects for HP-UX.
   	
   !	Makefile: Fixed makefile to use APXS macro throughout instead.
   	
   !	mod_watch.c: Fix bug where default configuration caused a seg. 
   	fault, because watchUpdate was not set. The work around was to
   	explicitly specify a WatchStorage directive in httpd.conf.
   
   !	SharedHash.c: Replaced use of NAME_MAX with MAX_KEY_LENGTH, since
   	SunOS systems don't define NAME_MAX since it can vary depending
   	on context (bah!).

   +	NetworkTable.h: Add include of <sys/types.h> for FreeBSD 4.4.
   
   !	Mutex.c: Added definitions of flock() contants for when <sys/file.h>
   	fails to define them (SunOS and HP-UX machines).
   	
   !	mod_watch.c: Changed "WatchStorage files" to use the shared memory
   	hash table mutex instead of flock() to simplify building under
   	SunOS and HP-UX.
   	
   !	Memory.c: Fix memory aligment problem in MemoryAllocate() that 
   	would generate Bus Errors for memory accessed on non-word align
   	addresses for some processors.
   	
   !	mod_watch.c: Fix bug when default SPOOLDIR value does NOT have a
   	trailing slash.
   	
--3.1--

   !	Rephrased Support conditions more simply.
   
   !	mod_watch.c: "WatchItem all" failed to include remote-ip.
   
   +	mod_watch.c: Added WatchNotLogged in order to force Apache NOT
   	to log a transaction for the handlers in the access log.
   	Suggested by Paul Andrews <andrews@shaw.ca>
   	
   +	Mutex.c, Shared.c: Added support for WIN32_API (not tested).
            
--3.0--

   !	LICENSE.TXT has been changed dramatically.  Please read.
   
   +	mod_watch.c: add watch-copyright handler to display version
   	and copyright message. See LICENSE.TXT 2) c)
   
   -	mod_watch.c: Removed DBM as a possible storage policy, as it
   	was far too slow to be ever practical. 

   +	mod_watch.c: Added new hash storage policy for a shared memory
   	hash table with disk swapping to reduce disk accesses made from
   	the files storage policy. 
   	
   !	mod_watch.c: Replaced WatchStore by WatchStorage with new syntax.
   	Added WatchSpoolDirectory and WatchHashTableSize.
   
   +	mod_watch.c: Added WatchNetwork to include/exclude network
   	connections for the purposes of counting. Intended to for ISPs
   	that want to exclude their internal network from skewing the 
   	stats for a virtual host during development and testing of a web
   	site. Suggested by Peter Ruegg <pruegg@eproduction.ch>
   	
   +	mod_watch.c: Added the ability to watch remote-ip addresses. See
   	WatchWhat. This will generate lots of data for extremely active
   	servers.
   	
   !	Makefile: now handles both dynamic and static builds, and supplies
   	more commentary on manual steps.
   	
--2.4--

   !	mod_watch.pl: Fixed the script to make an end-point request
   	instead of a proxy style request, even though RFC 2616 states
   	that it should be handled by servers.
   
--2.3--

   !	mod_watch.c: I'm an idiot. The WatchWhat constants and code
   	for file-owner and virtual-host were reversed (thanks to
   	Oleg Arkhangelsky <oleg123@progtech.ru> for finding this).

--2.2--

   !	mod_watch.c: fixed problem with WatchWhat watching everything
   	regardless of the setting.

--2.1--

   !	mod_watch.pl: fixed incorrect regular expression, which failed
   	to match some domain and/or user names.

   !	index.shtml: Updated Notes concerning systems known to work.

--2.0--

   !	mod_watch.c: Replaced WatchDbmServer & WatchDbmDatabase with
	WatchStore. DBM server can be a	bottle neck for high volume
	servers, so other methods are being considered.

	WatchStore provides support for "weenie" files as an
	alternative storage policy.  This policy should be suitable
	for servers with fast disks and/or good caches that server
	many virtual hosts. (Needs to be benchmarked.)

	Other storage policies being considered for future releases
	are random-access and/or memory-mapped.

   +	mod_watch.c: added "watch-info" handler to display the raw
   	counters.

   +	mod_watch.c: added checks in log_* not to count output from
  	mod_watch content handlers.

   +	mod_watch.c: added WatchWhat directive to provided finer
   	control over what actually needs to be logged to the DBM
   	server or weenie files. Currently there are three items:
   	virtual-host, file-owner, and the server.  The default is to
   	watch all three.

   !	mod_watch.pl: updated to use "watch-info" output as a
   	generic means of querying the counters independent of storage
   	policy.

   !	apache2mrtg.pl: updated to correspond to current mod_watch.pl
   	usage.  It reflected my original 0.5 test case and was
   	completely broken.

   +	convert.pl: utility to convert to/from DBM and weenie files.


--1.2--

	mod_watch.c: Add SERVER database key to track all requests.

	mod_watch.c: Add new counter for "documents" and
	WatchDocuments directive.

	mod_watch.pl: Replaced -r option with -f option to select
	which pair of fields to return for In and Out.  The field
	names are:

		ifInOctets ifOutOctets ifRequests ifDocuments

	mod_watch.pl: Add -t target option for when the key and target
	names are actually different.  [Tobias Oetike author or MRTG
	told explained a few things to me that make this option
	pointless, so its not documented.]

	dbm-server.pl: Add option -D for debugging. Changes special
	file paths to point to the current directory.

--1.1--

	mod_watch.c: Fix segmentation fault caused by dbm_connect()
	returning NULL when the dbm-server.pl process is not running.

--1.0--

	Replaced with TCP implementation to avoid possible lost
	updates. While my testing never showed any problems, I have a
	light load on my server.  I wanted the dbm-server.pl to make
	use of listen() to queue connections to the DBM database.

	Revised the DBM server request and response message formats to
	include version numbers and return status code. The headers
	are meant to be small enough to read on the first packet so
	that the length of data can be determined for the next read.

--0.5--

	Never released.  UDP implementation.  Alpha testing.





