[Spread-cvs] commit: r862 - in trunk: . buildtools daemon libspread-util

jschultz at spread.org jschultz at spread.org
Thu Nov 17 13:50:55 EST 2016


Author: jschultz
Date: 2016-11-17 13:50:54 -0500 (Thu, 17 Nov 2016)
New Revision: 862

Added:
   trunk/buildtools/make_copyright.pl
   trunk/release_announcement_5.0.txt
Removed:
   trunk/release_announcement_4.4.txt
Modified:
   trunk/Readme.IPv6
   trunk/Readme.txt
   trunk/daemon/Changelog
   trunk/daemon/config_gram.l
   trunk/daemon/config_parse.y
   trunk/daemon/configuration.c
   trunk/daemon/spread_params.h
   trunk/libspread-util/configure.in
   trunk/license.txt
Log:
Changed VirtualID from an IPv4 syntax to be a positive integer. Changed Conf_id_to_str from an IPv4 syntax to be a decimal, positive interger.
Updated build dates, Changelog, release_announcement and Readme files in prepartion for release.
Added make_copyright.pl to buildtools/



Modified: trunk/Readme.IPv6
===================================================================
--- trunk/Readme.IPv6	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/Readme.IPv6	2016-11-17 18:50:54 UTC (rev 862)
@@ -1,26 +1,39 @@
 Spread IPv6 Readme
 ------------------
 
-This is a test version of Spread IPv6 support.
+Spread version 5 adds support for IPv6.
 
-System Specification
---------------------
+Spread version 5 adds support for IPv6 in the Spread daemon, C
+language client library and several example and support programs
+(e.g. - spmonitor, spuser, spsend, sprecv, spflooder).  This version
+of Spread supports Posix environments (e.g. - Linux) and Windows.
 
-The IPv6 support is part of Spread version 5.0. The IPv6 supported system includes the Spread daemon, C language client library and included example and support programs (spmonitor, spuser, spsend, sprecv, spread, spflooder). 
+Spread 5 can work on IPv4-only hosts, IPv6-only hosts or dual stack
+hosts.  However, all daemons in a Spread deployment must run using
+only IPv4 or IPv6 addresses.  Spread 5 does not yet support
+configurations where some daemons use IPv4 addresses while others use
+IPv6 addresses, even if transition mechanisms such as network address
+translation (e.g. - stateless IP/ICMP translation) would allow such
+hosts to communicate using those addresses.
 
-IPv6 Spread 5.0 works on IPv4 only networks, IPv6 only networks or networks with dual-stack IPv4 and IPv6 on all nodes. Spread daemons in an active configuration run on either all IPv6 addresses or all IPv4 addresses (a ring can not be made of some IPv4 only and some IPv6 only hosts). Spread client programs can run on IPv4 only or IPv6 only hosts and can connect to a Spread daemon running on a dual-stack host. This version of Spread supports Linux (tested on RHEL5, RHEL6). 
+Daemons' IP addresses can be configured explicitly or by using names
+which will be looked up using standard system services (i.e. - DNS,
+/etc/hosts, etc.) in order to map them back to IP addresses.  Clients
+can similarly specify either explicit addresses or names to connect to
+daemons.
 
-The clients can be provided either DNS/Host names or direct IPv4/v6 addresses to connect to daemons. The daemons can be configured using direct IP addresses or names which will be looked up using standard system services (DNS or /etc/hosts) in order to map them back to IP addresses. This supports configuring the daemon's conf file with names only and dynamically looking up the correct IPs at daemon start time. 
-
 Current Status:
 ---------------
 
-Currently, only the configuration file parsing supports new IPv6 addresses and new syntax.  IPv6 addresses do not yet work in this version.
+IPv6 addressing is fully supported and functional.  Automatic
+translation between IPv4 and IPv6 addresses for daemon communication
+is not yet supported.
 
 Building Spread:
 ----------------
 
-The build process for Spread and supporting libraries has not changed. It is build with the standard process:
+The build process for Spread and supporting libraries has not changed.
+It is built with the standard process:
 
 ./configure
 make 
@@ -29,50 +42,76 @@
 Spread Configuration:
 ---------------------
 
-To use the new IPv6 enabled version of Spread on an IPv4 network, you can use the same spread.conf file as you used with the previous version including only IPv4 nodes. In this case the syntax of the configuration has not changed.
+Spread 5's configuration file is largely backwards compatible, meaning
+if you are upgrading from Spread 4 to 5, then your previous
+configuration files are highly likely to still work as expected.
 
-To use the new IPv6 enabled version of Spread on an IPv6 network you need to make the following changes to your spread.conf:
+To use the new IPv6 enabled version of Spread on an IPv6 network you
+need to make the following changes to your spread.conf:
 
-1) In the Spread_Segment declarations you should use an IPv6 multicast address for the segment address, and if you provide specific IP addresses for each node, then provide the address as a IPv6 address. See the example section below:
+1) In the Spread_Segment declarations you should use an IPv6 multicast
+address for the segment address, and if you provide specific IP
+addresses for each node, then provide the address as a IPv6
+address.
 
-Spread_Segment [ff02::5]:3333 {
+Spread_Segment [ff02::5]:3333
+{
      node1	2001:db8:1234::1
      node2	2001:db8:1234::2
-     node3     2001:db8:1234::3
+     node3      2001:db8:1234::3
 }
 
-2) This version also allows you to sepcify multiple segment addresses for a segment, although only the last one will currently be used:
+1a) For IPv6, each Spread daemon tries to determine appropriate
+interfaces to use from addresses by matching them against the local
+interfaces on the machine.  However, you can explicitly specify
+interfaces in your addresses if necessary or if you like.  Interface
+names as part of addresses in a configuration file are "local" to each
+daemon: they can be different on different daemons all running within
+the same configuration.  For a given daemon, the only interfaces that
+are actually used are the ones for that daemon (e.g. - its own daemon
+address and segment address).  A daemon will only use its own
+particular interfaces whenever it tries to communicate with other
+daemons.  This means that you can use the same configuration file for
+all of your daemons, but the interface portions of addresses will only
+be interpreted locally where appropriate.
 
-Spread_Segment [ff02::5]:3333 227.1.2.3:9294 {
-     node1	2001:db8:1234::1
-     node2	2001:db8:1234::2
-     node3     2001:db8:1234::3
+Spread_Segment [ff02::1:2:3:4:5%eth1]:5000
+{
+     node1 fe80::6a05:caff:fe01:7f7a%eth2
+     node2 fe80::be30:5bff:fee5:1d65%eth1
+     node3 fe80::be30:5bff:fee5:1d36%eth1
 }
 
-3) This version also introduces the concept of virtual IDs for daemons, which are an optional way of specifying the IDs that daemons use in their intercommunication.  These IDs are parsed as IPv4 addresses and can be any valid unicast address
-you want, so long as each daemon has a unique ID within a configuration.  Most of the logging and spmonitor reporting will refer to these virtual IDs rather than the network addresses you assign to the daemons.  If you do not specify them, then 
-Spread will choose them for you in the following fashion.  If you use an IPv4 address for your daemon, then that will be its virtual ID too.  If you use an IPv6 address for your daemon, then the virtual ID will be a 32 bit, configuration-unique 
-hash of that address and, therefore, look rather random.
+2) This version introduces the concept of virtual IDs for daemons,
+which are the low level, unique IDs that daemons use in their
+intercommunication.  Normally, Spread will generate a hash of the
+daemon's name (or address, if no name is given) as its virtual ID.
+However, in the unlikely event that two daemon's hashes collide or if
+an administrator wants to control these IDs explicitly, then they can
+use the VirtualID syntax below.  A VirtualID is a positive, decimal
+integer.  For maximum forwards compatability of a configuration,
+VirtualIDs should be positive integers less than 255.
 
-Spread_Segment [ff02::5]:3333 227.1.2.3:9294 {
-     node1	2001:db8:1234::1	VirtualID = 1.2.3.4
-     node2	2001:db8:1234::2	VirtualID = 1.2.3.5
-     node3	2001:db8:1234::3	VirtualID = 1.2.3.6
+Spread_Segment [ff02::5]:3333
+{
+     node1	2001:db8:1234::1	VirtualID = 1
+     node2	2001:db8:1234::2	VirtualID = 2
+     node3	2001:db8:1234::3	VirtualID = 3
 }
 
-
-
 Spread API Changes:
 -------------------
 
-The only changes to the Spread API (libspread) are those necessitated by the change in the size of daemon identifiers (from IPv4 32 bit IDs to IPV6 128 bit IDs). This only affects the contents of the body of Membership messages. The existing functions in sp_func.h to parse the contents of Membership messages are updated so if you use those API functions you do not need to make any other changes to your code except recompiling/relinking with the new Spread library. The change to the size of a 'group_id' structure is transparent as long as your application does not examine the contents of the group_id. If you want to format the group_id for printing in output, there is a new API function SP_group_id_to_string(group_id gid, char *str, int strlen) which will correctly format the group_id for both IPv4 and IPv6 compiled versions of Spread and return it in the 'str' parameter. 
+For clients to connect to a daemon over IPv6, just use an IPv6 address
+or hostname that resolves to a IPv6 address in the normal
+"spread_name" parameter to SP_connect() instead of using an IPv4
+address.
 
-To use the Spread API in your application and connect to the daemon over IPv6, just use an IPv6 address or hostname that resolves to a IPv6 address in the normal "spread_name" parameter to SP_connect() instead of using an IPv4 address.
-
-
 Example/Test programs:
 ----------------------
 
-In examples/ are the spuser and spflooder programs which have been updated to connect to Spread over IPv4 or IPv6. 
+In examples/ are the spuser and spflooder programs which have been
+updated to connect to Spread over IPv4 or IPv6.
 
-In daemon/ is the spmonitor program for checking the status of daemons and creating partitions. It is updated to work with the IPv6 daemon. 
+In daemon/ is the spmonitor program for checking the status of daemons
+and creating partitions.  It is updated to work with the IPv6 daemon.

Modified: trunk/Readme.txt
===================================================================
--- trunk/Readme.txt	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/Readme.txt	2016-11-17 18:50:54 UTC (rev 862)
@@ -49,9 +49,14 @@
 | WWW    : http://www.spread.org  and  http://www.spreadconcepts.com          |
 | Contact: info at spreadconcepts.com                                            |
 |                                                                             |
-| Version 5.0.0 Alpha built 18/Apr/2016                                       |
+| Version 5.0.0 RC1 built 18/Nov/2016                                         |
 \=============================================================================/
 
+November 18, 2016 Ver 5.0.0 RC1
+--------------------------------
+
+IPv6 support fully functional.  See Readme.IPv6 for details.
+
 April 18, 2016 Ver 5.0.0 Alpha
 ------------------------------
 
@@ -118,65 +123,6 @@
 
  - Turned off Nagle algorithm in Java library.
 
-July 2, 2013 Ver 4.3.0 Final
-----------------------------
-
-June 11, 2013 Ver 4.3.0 Final
------------------------------
-Features:
- - Reload flow control parameters when spread.conf file is reloaded. 
-
-April 4, 2013 Ver 4.3.0 RC3
-----------------------------
-Features:
- - Updated copyright
-
-March 25, 2013 Ver 4.3.0 RC1
-----------------------------
-Features:
-
- - C library supports using a single <port> value as the spread name to connect 
-to for all platforms when the daemon is on the same host as the client. 
-On Unix that uses a Unix domain socket which should have the best performance, 
-on Windows it now automatically converts this to a TCP connection to localhost. 
-So applications can now safely use just <port> for any local connection and they 
-will get the best option for each platform.
-
- - Improve default Membership timers to react faster to changes. 
-
- - Improve default flow control parameters to allow higher throughput.
-
- - Improve performance for multicast LANs by setting socket options so each daemon 
-does not get it's own data messages back. 
-
- - Change the way we look for the local daemon in the configuration file when no 
-daemon name is specified.  We now consult both the addresses returned by 
-gethostbyname(gethostname()) and by directly queryin
-
- - Rework C client library handling of send/receive mutexes to eliminate blocking 
-on Windows when lots of connections are made to a daemon and simplify the logic 
-for all platforms. 
-
- - Export membership timeouts and flow control parameters to configuration file 
-so that they can be changed at runtime. 
-
- - For Java library, add an isConnected() method. 
-
-Bug Fixes:
-
- - Prevent frequent log message from being reported every time a non-faulty event 
-was modified. This should remove a common source of the daemon flooding the log file. 
-
- - Change configure to actually test clock_gettime(CLOCK_MONOTONIC) works, rather 
-than just that it compiles.
-
- - Change to stdutil configure to append onto CFLAGS rather than replacing it.
-
- - Remove optimization of long Lookup_timeout for single segment configurations.
-
- - Performance bug fix to protocol.c to only decrement retrans_allowed when we 
-actually request a retransmission.
-
 SOURCE INSTALL:
 ---------------
 

Copied: trunk/buildtools/make_copyright.pl (from rev 861, branches/secure_spread_4.4/buildtools/make_copyright.pl)
===================================================================
--- trunk/buildtools/make_copyright.pl	                        (rev 0)
+++ trunk/buildtools/make_copyright.pl	2016-11-17 18:50:54 UTC (rev 862)
@@ -0,0 +1,153 @@
+#!/usr/bin/perl -w
+
+# Make the Copyright notices in Spread appear and disappear
+
+sub sub_notice_from_file()
+{
+    my ($filename, $notice_file) = @_;
+    my ($newfilename, $line, $ln, @notice_lines, $mode, $first_line);
+    
+    open(NOTICE, "< $notice_file") or die "can't open $notice_file: $!";
+    @notice_lines = <NOTICE>;
+    close(NOTICE);
+
+    if (@notice_lines < 2 || $notice_lines[@notice_lines - 1] !~ /^[ \t]*\*\/[ \t]*$/) {
+      die "$notice_file length was too small or didn't end with a closing comment!";
+    }
+
+    open(IN, "< $filename") or die "can't open $filename: $!";
+    $mode = (stat IN)[2];
+    @file_lines = <IN>;
+    close(IN);
+
+    $newfilename = $filename . ".new";
+    open(OUT, "> $newfilename") or die "can't open $filename.new: $!";
+
+    if (-f $newfilename && ! -w $newfilename) {
+        chmod(0600, $newfilename) or die "Failed to make $newfilename Writable: $!\n";
+    }
+
+    # print file until we match against first two lines of NOTICE
+
+    for ($ln = 0; $ln < @file_lines && ($ln + 1 == @file_lines || $file_lines[$ln] ne $notice_lines[0] || $file_lines[$ln + 1] ne $notice_lines[1]); $ln++) 
+    {
+        print OUT $file_lines[$ln];
+    }
+
+    # skip lines until we find an end comment that matches last line of NOTICE
+
+    for (; $ln < @file_lines && $file_lines[$ln] !~ /^[ \t]*\*\/[ \t]*$/; $ln++) 
+    {}
+
+    # print rest of file
+
+    for (++$ln; $ln < @file_lines; $ln++) 
+    {
+        print OUT $file_lines[$ln];
+    }
+
+    close(OUT);
+    chmod ($mode, $newfilename) or die "chmod failed: $!";
+    rename( $filename, "$filename.bak1") or die "Can't rename $filename to $filename.bak1\n";
+    rename( $newfilename, $filename) or die "can't rename $newfilename to $filename\n";
+
+    return 1;
+}
+    
+sub add_notice_to_file()
+{
+    my ($filename, $notice_file) = @_;
+    my ($newfilename, $line, @notice_lines, $mode);
+    
+    open(NOTICE, "< $notice_file") or die "can't open $notice_file: $!";
+    @notice_lines = <NOTICE>;
+    close(NOTICE);
+
+    $newfilename = $filename . ".new";
+    open(IN, "< $filename") or die "can't open $filename: $!";
+    open(OUT, "> $newfilename") or die "can't open $filename.new: $!";
+
+    $mode = (stat IN)[2];
+    if (-f $newfilename && ! -w $newfilename) {
+	chmod(0600, $newfilename) or print "Failed to make $newfilename Writable: $!\n";
+    }
+    foreach $line (@notice_lines) {
+	print OUT $line;
+    }
+    while(<IN>)
+    {
+	print OUT $_;
+    }
+
+    close(IN);
+    close(OUT);
+    chmod ($mode, $newfilename) or die "chmod failed: $!";
+    rename( $filename, "$filename.bak2") or die "Can't rename $filename to $filename.bak2\n";
+    rename( $newfilename, $filename) or die "can't rename $newfilename to $filename\n";
+    return 1;
+}
+
+use Getopt::Long;
+
+$tgt_opt = "./";
+
+GetOptions( "sub=s" => \$sub_opt,
+	    "add=s" => \$add_opt,
+            "tgt=s" => \$tgt_opt );
+
+#main function
+
+if ( -d $tgt_opt )
+{
+    opendir(DIR, $tgt_opt) or die "can't opendir $tgt_opt: $!";
+
+    while (defined($file = readdir(DIR))) 
+    {
+        if ( ($file !~ /^\./ ) && ( 
+                 ( $file =~ /\.[ch]$/) ||
+                 ( $file =~ /\.java$/) ) ) 
+        {
+            $file = $tgt_opt . $file;
+            print "About to act on file: $file\n";
+
+            if ( $sub_opt ) 
+            {
+                print "Removing notice from... $file\n";
+                &sub_notice_from_file($file, $sub_opt);
+            }
+
+            if ( $add_opt ) 
+            {
+                print "Adding notice to... $file\n";
+                &add_notice_to_file($file, $add_opt);
+            }
+        } 
+        else 
+        {
+            print "Skipping... $file\n";
+        }
+    }
+
+    closedir(DIR);
+}
+elsif ( -f $tgt_opt )
+{
+    $file = $tgt_opt;
+    print "About to act on file: $file\n";
+    
+    if ( $sub_opt ) 
+    {
+        print "Removing notice from... $file\n";
+        &sub_notice_from_file($file, $sub_opt);
+    }
+    
+    if ( $add_opt ) 
+    {
+        print "Adding notice to... $file\n";
+        &add_notice_to_file($file, $add_opt);
+    }
+}
+else
+{
+    print "$tgt_opt is neither a file nor a directory... skipping!\n";
+}

Modified: trunk/daemon/Changelog
===================================================================
--- trunk/daemon/Changelog	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/daemon/Changelog	2016-11-17 18:50:54 UTC (rev 862)
@@ -1,3 +1,217 @@
+November 18, 2016 Ver 5.0.0 RC1
+-------------------------------
+Spread version 5 adds support for IPv6.
+
+Spread version 5 adds support for IPv6 in the Spread daemon, C
+language client library and several example and support programs
+(e.g. - spmonitor, spuser, spsend, sprecv, spflooder).  This version
+of Spread supports Posix environments (e.g. - Linux) and Windows.
+
+Spread 5 can work on IPv4-only hosts, IPv6-only hosts or dual stack
+hosts.  However, all daemons in a Spread deployment must run using
+only IPv4 or IPv6 addresses.  Spread 5 does not yet support
+configurations where some daemons use IPv4 addresses while others use
+IPv6 addresses, even if transition mechanisms such as network address
+translation (e.g. - stateless IP/ICMP translation) would allow such
+hosts to communicate using those addresses.
+
+Daemons' IP addresses can be configured explicitly or by using names
+which will be looked up using standard system services (i.e. - DNS,
+/etc/hosts, etc.) in order to map them back to IP addresses.  Clients
+can similarly specify either explicit addresses or names to connect to
+daemons.
+
+r845 | jschultz | 2016-08-08 15:12:02 -0400 (Mon, 08 Aug 2016)
+r844 | jschultz | 2016-08-08 12:28:07 -0400 (Mon, 08 Aug 2016)
+r843 | jschultz | 2016-08-02 14:48:54 -0400 (Tue, 02 Aug 2016)
+r842 | jschultz | 2016-08-02 14:48:08 -0400 (Tue, 02 Aug 2016)
+r841 | jschultz | 2016-07-28 12:45:59 -0400 (Thu, 28 Jul 2016)
+r840 | jschultz | 2016-07-28 12:37:52 -0400 (Thu, 28 Jul 2016)
+r839 | jschultz | 2016-07-18 22:14:26 -0400 (Mon, 18 Jul 2016)
+r838 | jschultz | 2016-07-18 22:00:06 -0400 (Mon, 18 Jul 2016)
+     Exported a WideAreaNetwork parameter to config file to allow user to optionally specify what set of default membership timeouts they want to use.
+     Slight change in setting sin6_scope_id for locally configured ipv6 interfaces
+     Added checks that sin6_scope_id's didn't change for local addresses after reconfiguration
+     Converted all usages of Alarm to Alarmp
+     Downgrade log lines of recving already existing packets from WARNING to DEBUG
+     Remove any interface specification from derived name if we derived it from the daemon's address
+     Added the ability to specify an interface (scope_id) as part of an IPv6 address using the ::%eth0 syntax.
+           - These are excluded from calculating configuration hashes and can therefore be specific to each daemon (as local interface indexes often are) in their configuration file.
+           - Still need to check that they can't sneak in to a daemon's name any way. (If they did then it would affect the hash, etc.)
+     Removed interface specifications from calculating configuration hashes.  
+           - These too are now considered daemon specific and don't affect the overall configuration hash.  Working towards allowing some dynamic network changes without as much disruption.
+           - However, changes in a daemon's interface spec will still cause it to exit.             
+     Added the ability to specify multiple segment addresses for one segment. This will cause msgs sent to such a segment to be sent (and received) N times.
+
+r837 | jschultz | 2016-07-05 14:35:10 -0400 (Tue, 05 Jul 2016)
+r836 | jschultz | 2016-07-03 22:00:27 -0400 (Sun, 03 Jul 2016)
+r835 | jschultz | 2016-07-03 21:51:06 -0400 (Sun, 03 Jul 2016)
+r834 | jschultz | 2016-07-03 21:32:48 -0400 (Sun, 03 Jul 2016)
+r833 | jschultz | 2016-07-03 20:22:54 -0400 (Sun, 03 Jul 2016)
+r832 | jschultz | 2016-07-03 18:46:37 -0400 (Sun, 03 Jul 2016)
+r831 | jschultz | 2016-07-03 18:41:57 -0400 (Sun, 03 Jul 2016)
+r830 | jschultz | 2016-07-03 18:09:06 -0400 (Sun, 03 Jul 2016)
+r829 | jschultz | 2016-07-03 16:33:55 -0400 (Sun, 03 Jul 2016)
+r828 | jschultz | 2016-07-03 16:08:06 -0400 (Sun, 03 Jul 2016)
+r827 | jschultz | 2016-07-03 16:07:02 -0400 (Sun, 03 Jul 2016)
+r826 | jschultz | 2016-07-03 16:04:02 -0400 (Sun, 03 Jul 2016)
+r825 | jschultz | 2016-07-03 16:03:24 -0400 (Sun, 03 Jul 2016)
+r824 | jschultz | 2016-07-03 16:02:47 -0400 (Sun, 03 Jul 2016)
+r823 | jschultz | 2016-07-03 13:53:27 -0400 (Sun, 03 Jul 2016)
+r822 | jschultz | 2016-07-02 17:21:34 -0400 (Sat, 02 Jul 2016)
+r821 | jschultz | 2016-07-02 11:58:46 -0400 (Sat, 02 Jul 2016)
+r820 | jschultz | 2016-07-02 11:57:04 -0400 (Sat, 02 Jul 2016)
+r819 | jschultz | 2016-07-02 11:55:39 -0400 (Sat, 02 Jul 2016)
+     Set my segment address to have same sin6_scope_id as my daemon address
+     Change ip_enum to explicitly look up if index (i.e. - if_nametoindex) rather than trust that getifaddrs set sin6_scope_id properly
+     Changed network layer to drop msgs from internet addresses that don't match the source's primary address
+             NOTE: daemons and monitor now bind their send channel to the daemon's primary address             
+     Added a few spu_addr_ip_is_* fcns
+     Made alarm.c comport with spu_alarm.h (i.e. - ALARMP_NEEDED); SPLOG_PRINT and SPLOG_FATAL will always print now regardless of mask
+     Converted spread daemon name lookup from gethostbyname to getaddrinfo
+     Will connect either by AF_INET, AF_INET6 or AF_UNIX now
+     Made macros in sp.h safer
+     Added SP_strerror fcn
+     Added an INVALID_SOCKET definition on *nix to check against socket() return
+
+r818 | jschultz | 2016-07-02 11:54:33 -0400 (Sat, 02 Jul 2016)
+r817 | jschultz | 2016-07-02 00:42:39 -0400 (Sat, 02 Jul 2016)
+r816 | jschultz | 2016-07-02 00:36:54 -0400 (Sat, 02 Jul 2016)
+r815 | jschultz | 2016-07-01 21:34:36 -0400 (Fri, 01 Jul 2016)
+r814 | jschultz | 2016-07-01 20:50:45 -0400 (Fri, 01 Jul 2016)
+r813 | jschultz | 2016-07-01 16:49:19 -0400 (Fri, 01 Jul 2016)
+r812 | jschultz | 2016-07-01 16:43:10 -0400 (Fri, 01 Jul 2016)
+r811 | jschultz | 2016-07-01 16:22:42 -0400 (Fri, 01 Jul 2016)
+r810 | jschultz | 2016-07-01 14:28:03 -0400 (Fri, 01 Jul 2016)
+r809 | jschultz | 2016-07-01 14:24:11 -0400 (Fri, 01 Jul 2016)
+r808 | jschultz | 2016-07-01 14:22:41 -0400 (Fri, 01 Jul 2016)
+r807 | jschultz | 2016-07-01 14:15:49 -0400 (Fri, 01 Jul 2016)
+r806 | jschultz | 2016-07-01 14:13:46 -0400 (Fri, 01 Jul 2016)
+r805 | jschultz | 2016-07-01 14:11:54 -0400 (Fri, 01 Jul 2016)
+r804 | jschultz | 2016-07-01 14:05:20 -0400 (Fri, 01 Jul 2016)
+r803 | jschultz | 2016-07-01 14:03:52 -0400 (Fri, 01 Jul 2016)
+r802 | jschultz | 2016-07-01 14:03:14 -0400 (Fri, 01 Jul 2016)
+r801 | jschultz | 2016-06-30 20:45:36 -0400 (Thu, 30 Jun 2016)
+r800 | jschultz | 2016-06-30 16:09:21 -0400 (Thu, 30 Jun 2016)
+r799 | jschultz | 2016-06-28 21:57:44 -0400 (Tue, 28 Jun 2016)
+r798 | jschultz | 2016-06-28 16:18:31 -0400 (Tue, 28 Jun 2016)
+r797 | jschultz | 2016-06-28 16:11:53 -0400 (Tue, 28 Jun 2016)
+r796 | jschultz | 2016-06-27 23:24:47 -0400 (Mon, 27 Jun 2016)
+r795 | jschultz | 2016-06-27 23:16:05 -0400 (Mon, 27 Jun 2016)
+     Made protocol log lines if Net_recv* returns <= 0
+     Tightened up protocol's handling of monitor msgs a bit
+     Changed all DL_send's to DL_sendto_gen's 
+     Changed all DL_init_channel's to DL_init_channel_gen's
+     Change to use one DL_init_channel_gen rather than two DL_init_channel's
+     Change to use actual configuration hash rather than MONITOR_HASH;
+     ############## NOTE: monitor can only talk to daemons with same config hash now!!!  This will require reworking reloads a bit inside and/or outside monitor.
+     Get rid of magic # in memb_id.proc_id
+     Slight change to check that daemon's primary address is covered by its interface spec
+     Got rid of MONITOR_HASH from net_types.h: monitor will also need to have same conf hash as daemons to which it is talking now
+     Made macros safe by wrapping their parameter with parens
+     Change a bunch of files to include winsock2.h instead of winsock.h
+     Did change to use snprintf rather than _snprintf on Windows
+     Allow DL_init_channel_gen to have NULL as mcast_addr
+     Convert remaining Alarm -> Alarmp in libspreadutil
+     Get rid of check for winsock.h and look for winsock2.h instead
+     Changed tokenizer to distinguish between ip addr's with and without ports.  Parser now only accepts port specifications in segment addresses.
+     ARCH_SCATTER_NONE: changed data_link to use a 1500 byte buffer on the stack (rather than 2^16 bytes) and to malloc a larger buffer if needed
+     Changed all Alarm's to Alarmp's; made print fcn names correct; added function comments; other minor changes
+     Changes to network.c completed
+     Major changes to data_link.c completed
+
+r794 | jschultz | 2016-06-27 23:15:24 -0400 (Mon, 27 Jun 2016)
+r793 | jschultz | 2016-06-27 23:14:49 -0400 (Mon, 27 Jun 2016)
+r792 | jschultz | 2016-06-27 23:13:00 -0400 (Mon, 27 Jun 2016)
+r791 | jschultz | 2016-06-27 21:26:34 -0400 (Mon, 27 Jun 2016)
+r790 | jschultz | 2016-06-27 21:24:09 -0400 (Mon, 27 Jun 2016)
+r789 | jschultz | 2016-06-27 21:20:58 -0400 (Mon, 27 Jun 2016)
+r788 | jschultz | 2016-06-27 21:20:40 -0400 (Mon, 27 Jun 2016)
+r787 | jschultz | 2016-06-27 17:02:50 -0400 (Mon, 27 Jun 2016)
+r786 | jschultz | 2016-06-27 17:02:09 -0400 (Mon, 27 Jun 2016)
+r785 | jschultz | 2016-06-27 17:01:09 -0400 (Mon, 27 Jun 2016)
+r784 | jschultz | 2016-06-27 16:34:59 -0400 (Mon, 27 Jun 2016)
+r783 | jschultz | 2016-06-26 22:00:49 -0400 (Sun, 26 Jun 2016)
+r782 | jschultz | 2016-06-26 18:54:00 -0400 (Sun, 26 Jun 2016)
+r781 | jschultz | 2016-06-26 18:53:18 -0400 (Sun, 26 Jun 2016)
+r780 | jschultz | 2016-06-26 18:44:32 -0400 (Sun, 26 Jun 2016)
+r779 | jschultz | 2016-06-26 18:38:52 -0400 (Sun, 26 Jun 2016)
+r778 | jschultz | 2016-06-26 16:22:30 -0400 (Sun, 26 Jun 2016)
+r777 | jschultz | 2016-06-26 16:20:32 -0400 (Sun, 26 Jun 2016)
+r776 | jschultz | 2016-06-26 16:03:37 -0400 (Sun, 26 Jun 2016)
+r775 | jschultz | 2016-06-26 16:02:13 -0400 (Sun, 26 Jun 2016)
+r774 | jschultz | 2016-06-26 15:50:58 -0400 (Sun, 26 Jun 2016)
+r773 | jschultz | 2016-06-26 15:29:26 -0400 (Sun, 26 Jun 2016)
+r772 | jschultz | 2016-06-25 13:39:33 -0400 (Sat, 25 Jun 2016)
+r771 | jschultz | 2016-06-25 13:38:59 -0400 (Sat, 25 Jun 2016)
+r770 | jschultz | 2016-06-23 16:10:06 -0400 (Thu, 23 Jun 2016)
+r769 | jschultz | 2016-06-23 15:59:37 -0400 (Thu, 23 Jun 2016)
+r768 | jschultz | 2016-06-23 14:06:38 -0400 (Thu, 23 Jun 2016)
+r767 | jschultz | 2016-06-23 14:01:58 -0400 (Thu, 23 Jun 2016)
+r766 | jschultz | 2016-06-23 13:23:46 -0400 (Thu, 23 Jun 2016)
+r765 | jschultz | 2016-06-23 13:13:53 -0400 (Thu, 23 Jun 2016)
+r764 | jschultz | 2016-06-22 12:34:23 -0400 (Wed, 22 Jun 2016)
+r763 | jschultz | 2016-06-21 22:44:40 -0400 (Tue, 21 Jun 2016)
+r762 | jschultz | 2016-06-21 17:28:29 -0400 (Tue, 21 Jun 2016)
+     Added SPCLAMP macro to spu_alarm.h
+     Removed unused spu_compatibility.h
+     Expunged all inclusions of winsock.h for winsock2.h instead
+     Minor changes to configure:
+           Made check for ARCH_SCATTER_NONE a bit more thorough (shouldn't change anything though)
+           Got rid of checks for windows.h and winsock.h and instead check for winsock2.h and ws2tcpip.h (shouldn't change anything though)
+     Main definition of DL_sendto_gen
+     Cleanup of alarm.c
+     Got rid of HAVE_GOOD_VARGS and associated old code from alarm.[ch]; that define isn't exported and usually won't be present in typical inclusions of spu_alarm.h
+     Added a ALARMP_WILL_PRINT macro for a quick check to condition potentially expensive / common calls to Alarmp that won't do anything actually
+     Main implementation of DL_init_channel_gen
+     Added a dmy_init field to spu_addr for static initialization; changed Alarmp's to use defines rather than hardcoded; changed spu_addr_len to return sizeof(spu_addr) when the family is unspecified (i.e. - 0)
+     Exported alarm print types used by libspreadutil itself; reassigned some values; updated spread's tokenizer to use #define values rather than hardcoded
+     Updating code to use spu_addr instead of spread_addr
+     Moved union of socket addresses into libspread-util.  Type and associated fcns now called spu_addr.
+     Cleanup of configuration.[ch]
+     Better handling of _SIZEOF_ADDR_IFREQ 
+     Add checks that daemon and segment addresses are compatible with ActiveIPVersion
+     Changes to ip_enum.c to work with getifaddrs and _SIZEOF_ADDR_IFREQ or sockaddr.sa_len
+    
+r761 | jschultz | 2016-06-21 17:07:56 -0400 (Tue, 21 Jun 2016)
+r760 | jschultz | 2016-06-21 13:48:38 -0400 (Tue, 21 Jun 2016)
+r759 | jschultz | 2016-06-21 10:29:06 -0400 (Tue, 21 Jun 2016)
+r758 | jschultz | 2016-06-21 10:28:27 -0400 (Tue, 21 Jun 2016)
+r757 | jschultz | 2016-06-21 10:27:15 -0400 (Tue, 21 Jun 2016)
+r756 | jschultz | 2016-06-21 10:26:03 -0400 (Tue, 21 Jun 2016)
+r755 | jschultz | 2016-06-21 10:24:48 -0400 (Tue, 21 Jun 2016)
+r754 | jschultz | 2016-06-21 10:22:41 -0400 (Tue, 21 Jun 2016)
+r753 | jschultz | 2016-06-21 10:22:14 -0400 (Tue, 21 Jun 2016)
+r752 | jschultz | 2016-06-16 16:37:06 -0400 (Thu, 16 Jun 2016)
+r751 | jschultz | 2016-06-16 16:31:57 -0400 (Thu, 16 Jun 2016)
+r750 | jschultz | 2016-06-16 16:07:03 -0400 (Thu, 16 Jun 2016)
+r749 | jschultz | 2016-06-16 16:06:02 -0400 (Thu, 16 Jun 2016)
+r748 | jschultz | 2016-05-31 16:10:54 -0400 (Tue, 31 May 2016)
+     All of configuration development done
+     Added a declaration of Alarmp() without an parameters if don't have variable arguments (suppress warning)
+     Major updates to config_gram.l, config_parse.y and configuration.[ch]
+     Removal of debug intial sequence code
+     Added a currently disabled fix to suppress spurious retransmitted tokens from Prot_handle_hurry
+     Adding soft link so include/sp_events.h links to libspread-util/include/spu_events.h
+     Removing old sp_events.h from spread/include
+     Creation of new variadic type spread_addr to contain any kind of sockaddr
+     Replaced multi_inet_addr with spread_addr in lex/parse of configuration
+
+April 18, 2016 Ver 5.0.0 Alpha
+------------------------------
+
+r745 | jschultz | 2016-04-18 12:08:04 -0400 (Mon, 18 Apr 2016)
+r744 | jschultz | 2016-04-18 11:59:19 -0400 (Mon, 18 Apr 2016)
+r743 | jschultz | 2016-04-17 22:24:43 -0400 (Sun, 17 Apr 2016)
+r742 | jschultz | 2016-04-17 20:37:32 -0400 (Sun, 17 Apr 2016)
+r741 | jschultz | 2016-04-17 12:38:54 -0400 (Sun, 17 Apr 2016)
+r740 | jschultz | 2016-04-17 11:51:53 -0400 (Sun, 17 Apr 2016)
+r739 | jschultz | 2016-04-17 10:00:02 -0400 (Sun, 17 Apr 2016)
+     Changes to config_gram.l and config_parse.y to allow a VirtualID specification for a daemon and to allow multiple segment addresses in the configuration file.
+     Changes to config_gram.l to incorporate ipv6 addrs.
+     Adding IPtype enum to configuration.h
+     Changes to conf_body.h for ipv6
+
 May 27, 2014 Ver 4.4.0
 ----------------------
 
@@ -3,5 +217,18 @@
 May 19, 2014 Ver 4.4.0 RC2
 --------------------------
+Improvements:
+  - Slightly improved MSVS project files -- will work with MSBuild 4.0 (e.g. - .NET 4.0, MSVS 2010) now. Later versions of MSVS can auto-upgrade solution (thanks to Johann Lochner)
+  - Remove named pipe for accepting UNIX socket connections on exit
+  - Allow token sizes up to 64KB (uses IP fragmentation may exacerbate loss -- will log a warning) rather than hard failure if > 1.5KB
+  - Send bcast retransmissions immediately rather than queue to suppress unnecessary re-requests in accelerated protocol
 
+Bug fixes:
+  - Reset Commit_set to only contain this daemon after installing a regular membership
+  - Improved validity check for FORM1 tokens to either process or swallow
+  - Only process FORM2 token that corresponds to most recent FORM1 token
+  - Block delivery of < AGREED msgs until GROUPS algorithm is completed
+  - Consult Last_discarded rather than Aru for deciding whether we have a packet already or not (Prot_handle_bcast)
+  - Handle receiving packet after FORM1 processed and it is still listed as a hole on FORM2
+
 r724 | jschultz | 2014-05-15 11:04:35 -0400 (Thu, 15 May 2014)
 	After delivering all EVS packets; sweep the Packets struct to ensure it is empty; exit if not
@@ -52,7 +279,42 @@
 
 January 22, 2014 Ver 4.4.0 RC1
 ------------------------------
+Features:
 
+ - New accelerated ring protocol tailored for data center networks.
+   This protocol provides 30%-50% higher throughput and 20-35% lower latency 
+   in modern local area networks. Both the original protocol and the accelerated
+   ring protocol are available in this version.
+
+ - More efficient packet packing.
+
+ - Windows project files now build again.
+
+ - New spread-service project to make Spread into a proper Windows service.
+        - Needs testing from the community!
+
+ - Additional and improved MEMBERSHIP and PROTOCOL logging.
+
+Bug fixes:
+
+ - EVS bugs:
+        - Set Aru to 0 when we transition to EVS.
+        - Ignore Token->seq when in EVS.
+        - Fixed Backoff_membership referring to wrong packet when ring breaks in EVS.
+        - Fixed token retransmissions while transitioning from EVS to OP.
+
+ - Token bugs:
+        - Token->aru calculaton fixed; Set_aru eliminated.
+        - Ignore tokens from wrong membership + sender.
+
+ - Alarm on Windows:
+        - Alarm(EXIT) now exits with non-zero code instead of aborting.
+        - Fixed long log lines crash bug.
+
+ - Allow ports >= 2^15 to be used.
+
+ - Turned off Nagle algorithm in Java library.
+
 r687 | jschultz | 2014-01-24 18:28:55 -0500 (Fri, 24 Jan 2014)
 	Bugfix of Send_new_packets: using previously disposed structure
 
@@ -170,7 +432,52 @@
 
 June 11, 2013 Ver 4.3.0 
 -----------------------
+Features:
 
+ - Reload flow control parameters when spread.conf file is reloaded.
+ 
+ - C library supports using a single <port> value as the spread name to connect 
+to for all platforms when the daemon is on the same host as the client. 
+On Unix that uses a Unix domain socket which should have the best performance, 
+on Windows it now automatically converts this to a TCP connection to localhost. 
+So applications can now safely use just <port> for any local connection and they 
+will get the best option for each platform.
+
+ - Improve default Membership timers to react faster to changes. 
+
+ - Improve default flow control parameters to allow higher throughput.
+
+ - Improve performance for multicast LANs by setting socket options so each daemon 
+does not get it's own data messages back. 
+
+ - Change the way we look for the local daemon in the configuration file when no 
+daemon name is specified.  We now consult both the addresses returned by 
+gethostbyname(gethostname()) and by directly queryin
+
+ - Rework C client library handling of send/receive mutexes to eliminate blocking 
+on Windows when lots of connections are made to a daemon and simplify the logic 
+for all platforms. 
+
+ - Export membership timeouts and flow control parameters to configuration file 
+so that they can be changed at runtime. 
+
+ - For Java library, add an isConnected() method. 
+
+Bug Fixes:
+
+ - Prevent frequent log message from being reported every time a non-faulty event 
+was modified. This should remove a common source of the daemon flooding the log file. 
+
+ - Change configure to actually test clock_gettime(CLOCK_MONOTONIC) works, rather 
+than just that it compiles.
+
+ - Change to stdutil configure to append onto CFLAGS rather than replacing it.
+
+ - Remove optimization of long Lookup_timeout for single segment configurations.
+
+ - Performance bug fix to protocol.c to only decrement retrans_allowed when we 
+actually request a retransmission.
+
 Tue Jun 11 23:40:30 2013  Jonathan Stanton  <jonathan at spreadconcepts.com>
 
 	* protocol.c, flow_control.c (FC_signal_conf_reload): Reload flow control 
@@ -289,14 +596,27 @@
 
 June 18, 2012 Ver 4.2.0 RC3 (and final)
 ---------------------------------------
+This release has one significant bugfixe over RC2.
 
+1) Fix regression from 4.1 release in which daemons were not connecting 
+when using multicast groups in a configuration with limited interfaces 
+for clients and daemons. This includes updating included libspread-util 
+version to 4.2.0rc1. 
+
 2012-06-18 13:47:23 Jonathan Stanton  <jonathan at spreadconcepts.com>
 
 	* libspread-util/*: Update libspread-util to libspreadutil release 4.2.0rc1
 
 May 03, 2012 Ver 4.2.0 RC2
 --------------------------------------
+This release has two significant bugfixe over RC1.
 
+1) Fix regression from 4.1 release in which daemons were not connecting 
+when using multicast groups.
+
+2) Fix crashes when a new configuration is loaded while the daemons are running.
+This is a bug from the previous 4.1 release. 
+
 Thu May  3 14:58:47 2012  Jonathan Stanton  <jonathan at spreadconcepts.com>
 
 	* configuration.c, groups.c (G_signal_conf_reload): Rework how
@@ -320,6 +640,54 @@
 March 20, 2012 Ver 4.2.0 (RC1)
 ------------------------------
 
+This release has a large number of small changes which include bugfixes,
+very specific performance improvements, and general improvements to the code 
+and build process.
+
+Details of all changes can be found in the daemon/Changelog file. Note with 
+the new libspread-util library broken out into it's own package, to see the 
+changes to that library (which used to be included as code in the daemon
+directory) read the libspread-util/Changelog file. 
+
+Features:
+
+-) Added Keepalive support to client-server TCP connections. Requires correct
+operating system values set for keepalives in order to be useful. 
+-) Switch internal code to use MONOTONIC clocks when available and appropriate
+to remove chance of system clock changes (from the clock being set) from affecting
+message processing
+-) Break out events, memory, data_link and alarm code into separate 
+libspread-util package. This package also has a number of improvements in
+the functionality of those code files which are listed in the internal
+package release notes. 
+
+Fixes:
+
+-) Fix bug with structure size on 64 bit platforms causing crash.
+-) Fix several deadlocks and race conditions in java Listener code.
+-) Fix 100 ms timeout in java socket handling code so it does not corrupt 
+messages that take a long time to arrive. 
+-) Fix java disconnect bug that prevented client from reconnecting until restarted.
+-) Fix crash when adding array of groups in java library. . 
+-) Improve mutex initialization on Windows and POSIX systems.
+-) Remove cause of slow message delivery when a client is receiving a lot of
+messages and gets into a badger state. 
+-) Print useful help messages for spmonitor and correct error messages when bad
+commandline options provided. 
+-) Remove printf calls in libspread that should not be there as they interrupt
+client program output. 
+-) Fix token hurry bug that caused messages to have a 2 second latency in 
+specific circumstances.
+-) Fix Solaris linker compile bug.
+-) Build fixes for sprecv program.
+-) Fix autoconf so it correctly detects the endianness of PPC systems. 
+
+Known Regressions:
+
+1) The Windows build is broken by the separation of the libspread-util library
+into a separate package. The code is intended to be Windows compatible, but 
+requires build changes and testing in order to work. 
+
 Mon Feb 20 21:35:49 2012  Jonathan Stanton  <jonathan at spreadconcepts.com>
 
 	* SpreadConnection.java: Fix deadlock in stopListener where listener
@@ -449,7 +817,47 @@
 
 June 18, 2009 Ver 4.1.0 
 -----------------------
+This is mainly a bugfix release. Details of all changes can be found in the
+daemon/Changelog file. 
 
+Features:
+1) Make location of unix domain socket configurable at compile time.
+
+2) Add version numbers to the Spread library. 
+
+3) Add runtime configuration option in spread.conf for the maximum number
+of messages Spread should buffer for each client before disconnecting them.
+
+4) Add high-precision timestamps to log file events. To activate enable
+EventPreciseTimeStamp flag in spread.conf.
+
+5) Spuser program can send multi-line message.
+
+Internal API additions:
+1) Make internal DL_recv/send functions thread-safe and add DL_recvfrom
+function to provide source address of the packet.
+
+
+Fixes:
+1) Portability improved for Solaris 10, Windows, platforms with strict 
+alignment of ints.
+
+2) Fix crash caused by a wrapped sequence counter (32bit) by triggering
+a quick membership when the value gets close so that the sequence value is reset. 
+
+3) Fix crash bug when a membership configuration reload was triggered during
+an existing membership change. 
+
+4) Fix locking bug in spread library causing deadlock under certain error paths.
+
+5) Support for newer autoconf versions with better documentation of defines.
+Detailed changes in Changelog file.
+
+6) Fix yacc warning in the config file parser.
+
+7) Update to latest Stdutil release which incorporates several small bug and 
+compile fixes. 
+
 Thu Jun 18 16:07:43 2009  Jonathan Stanton  <jonathan at spreadconcepts.com>
 
 	* config_parse.y (%): Use MAXHOSTNAMELEN instead of fixed length

Modified: trunk/daemon/config_gram.l
===================================================================
--- trunk/daemon/config_gram.l	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/daemon/config_gram.l	2016-11-17 18:50:54 UTC (rev 862)
@@ -256,7 +256,7 @@
 {ipv4port}                      { if (parse_ip(&yylval, yytext, AF_INET,  TRUE))  { REJECT; } return IPPORT; }
 {ipv6addr}                      { if (parse_ip(&yylval, yytext, AF_INET6, FALSE)) { REJECT; } return IPADDR; }
 {ipv6port}                      { if (parse_ip(&yylval, yytext, AF_INET6, TRUE))  { REJECT; } return IPPORT; }
-[0-9]{1,6}                      { yylval.number = atoi(yytext); return NUMBER; }
+[0-9]{1,9}                      { yylval.number = atoi(yytext); return NUMBER; }
 {qstring}                       { if ((yylval.string = strdup(yytext + 1)) == NULL) { yyerror("strdup failed!"); } yylval.string[strlen(yylval.string) - 1] = 0; return STRING; }
 {string}                        { if ((yylval.string = strdup(yytext)) == NULL) { yyerror("strdup failed!"); } return STRING; }
 %%

Modified: trunk/daemon/config_parse.y
===================================================================
--- trunk/daemon/config_parse.y	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/daemon/config_parse.y	2016-11-17 18:50:54 UTC (rev 862)
@@ -91,9 +91,6 @@
 static  char   ConfStringRep[MAX_CONF_STRING + 1];
 static  int    ConfStringLen;
 
-static  int    IPv4_configured;
-static  int    IPv6_configured;
-
 /********************************************************************************
  ********************************************************************************/
 
@@ -106,8 +103,6 @@
     procs_interfaces = 0;    
     ConfStringRep[0] = 0;
     ConfStringLen    = 0;
-    IPv4_configured  = 0;
-    IPv6_configured  = 0;
 }
 
 /********************************************************************************
@@ -158,21 +153,6 @@
   char           *tmp;
   int             i;
 
-  /* sanity check ActiveIPVersion and the addresses we've already configured */
-  
-  if (family == AF_INET)
-    IPv4_configured = 1;
-
-  else if (family == AF_INET6)
-    IPv6_configured = 1;
-
-  else
-    Alarmp(SPLOG_FATAL, CONF_SYS, "set_daemon_name_and_addr: BUG! Configured family (%d) is neither AF_INET (%d) nor AF_INET6 (%d)!\n",
-           family, AF_INET, AF_INET6);
-
-  if (IPv4_configured && IPv6_configured)
-    yyerror("ActiveIPVersion changed in middle of configuration file!  Trying to configure both IPv4 and IPv6 daemon addresses in same configuration!");
-
   /* check for zero length daemon name: can happen with a quoted string */
   /* warn if name ends with a semicolon: user likely intended it to separate two daemon specs but stuck it on the end of the name without any intervening white space */
 
@@ -193,9 +173,6 @@
   {
     addr = &conf_addr->ipaddr;
 
-    if (spu_addr_family(addr) != family)
-      yyerror("A daemon's address is incompatible with ActiveIPVersion!");
-
     if (spu_addr_ip_is_unspecified(addr))
       yyerror("A daemon's address must not be the unspecified address!");
     
@@ -208,7 +185,7 @@
   {
     struct addrinfo hint = { 0 }, *rslt, *curr;
 
-    hint.ai_family   = PF_UNSPEC;  /* NOTE: not family bc family is an address family while this wants protocol family (paranoid, I know) */
+    hint.ai_family   = PF_UNSPEC;
     hint.ai_socktype = SOCK_DGRAM;
     hint.ai_protocol = IPPROTO_UDP;
     hint.ai_flags    = 0;
@@ -216,7 +193,11 @@
     if ((ret = getaddrinfo(name, NULL, &hint, &rslt)))
       yyerror(ret != EAI_SYSTEM ? gai_strerror(ret) : strerror(errno));
 
-    for (curr = rslt; curr != NULL && (curr->ai_addr == NULL || curr->ai_addr->sa_family != family); curr = curr->ai_next);  /* find first address of correct type */
+    /* find first address of correct type */
+    
+    for (curr = rslt;
+         curr != NULL && (curr->ai_addr == NULL || (curr->ai_addr->sa_family != AF_INET && curr->ai_addr->sa_family != AF_INET6) || (family != -1 && curr->ai_addr->sa_family != family));
+         curr = curr->ai_next);
 
     if (curr == NULL)
       yyerror("Couldn't find an appropriate address based on daemon name! Check that your ActiveIPVersion and DNS entries match or explicitly configure the address to use!");
@@ -229,10 +210,14 @@
   else
     yyerror("A daemon must have a name, an address or both!");
 
-  if (spu_addr_family(&Config->allprocs[num_procs].proc_addr) != family)
-    Alarmp(SPLOG_FATAL, CONF_SYS, "set_daemon_name_and_addr: BUG! Somehow addr's family (%d) didn't match (%d)?!\n",
-           spu_addr_family(&Config->allprocs[num_procs].proc_addr), family);
+  /* sanity check and default ActiveIPVersion */
 
+  if (family == -1)
+    Conf_set_active_ip_version(spu_addr_family(&Config->allprocs[num_procs].proc_addr));
+
+  else if (family != spu_addr_family(&Config->allprocs[num_procs].proc_addr))
+    yyerror("A daemon's address was of the wrong type!  It disagreed with ActiveIPVersion!");
+
   if (spu_addr_ip_is_multicast(&Config->allprocs[num_procs].proc_addr))
     yyerror("A daemon's address can't be a multicast address!");
   
@@ -810,17 +795,20 @@
 		;
 
 
-Daemonvid_opt	:	VIRTUALID EQUALS IPADDR
+Daemonvid_opt	:	VIRTUALID EQUALS NUMBER
 			{
-			  if (spu_addr_family(&$3.addr.ipaddr) != AF_INET || $3.addr.ipaddr.ipv4.sin_addr.s_addr == htonl(INADDR_ANY) || $3.addr.ipaddr.ipv4.sin_port != 0)
-			    yyerror("Virtual IDs must be specified as a non-zero IPv4 address without a port!");
+                          char idstr[MAX_ID_SIZE];
 
-                          Config->allprocs[num_procs].id = ntohl($3.addr.ipaddr.ipv4.sin_addr.s_addr);
+                          if ($3.number <= 0)
+                            yyerror("Virtual IDs must be specified as an integer greater than zero!");
+                          
+                          Config->allprocs[num_procs].id = $3.number;
 
-                          if (Config->allprocs[num_procs].id == 0)
-                            yyerror("Explicity configured virtual ID mapped to zero somehow?!");
-
-                          free($3.addr.ipstr);
+                          if (Config->allprocs[num_procs].id <= 0)
+                            yyerror("Explicity configured virtual ID mapped to a non-positive somehow?!");
+                          
+                          Alarmp(SPLOG_INFO, CONF_SYS, "Explicit virtual ID = '%s' for daemon '%s'\n",
+                                 Conf_id_to_str(Config->allprocs[num_procs].id, idstr), Config->allprocs[num_procs].name);
 			}
 		|
 		;

Modified: trunk/daemon/configuration.c
===================================================================
--- trunk/daemon/configuration.c	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/daemon/configuration.c	2016-11-17 18:50:54 UTC (rev 862)
@@ -127,8 +127,13 @@
 static  char    Conf_FileName[256];
 static  char    Conf_MyName_buf[256];
 static  char   *Conf_MyName;
-static  int     Conf_Active_IP_Version = AF_INET;
 
+#if AF_INET == -1 || AF_INET6 == -1
+#  error "Conf_Active_IP_Version assumes that neither AF_INET nor AF_INET6 is -1 but one of them is!"
+#endif
+
+static  int     Conf_Active_IP_Version = -1;
+
 char Conf_id_to_str_buf[MAX_ID_SIZE];
 
 void	Conf_init( char *file_name, char *my_name )
@@ -719,11 +724,7 @@
 
 char   *Conf_id_to_str( int32u id, char *str )
 {
-  snprintf(str, MAX_ID_SIZE, "%u.%u.%u.%u",
-           (unsigned) ((id >> 24) & 0xff),
-           (unsigned) ((id >> 16) & 0xff),
-           (unsigned) ((id >> 8)  & 0xff),
-           (unsigned) (id         & 0xff));
+  snprintf( str, MAX_ID_SIZE, "%lu", (unsigned long) id );
 
   return str;
 }
@@ -735,14 +736,17 @@
 
   /* NOTE: auto-generated vids must be a cross platform (in host byte order), deterministic function of proc.name only! */
                             
-  if (ret == 0)                   /* protect reserved proc id's: 0 ~1 in 2^32 chance */
+  if (ret == 0 || ret == (int32u) -1)  /* protect reserved proc id's: 0 and -1, ~2 in 2^32 chance */
   {
-    ret = (int32u) tlen << 16;    /* assume users will typically configure either most or least significant byte of VIDs; avoid them */
+    ret = (int32u) tlen << 16;         /* assume users will typically configure either most or least significant byte of VIDs; avoid them */
 
-    if (ret == 0)                 /* next to impossible: requires a tlen with lower 16 bits == 0 and that hashes to zero */
-      ret = (int32u) 0x1 << 16;   /* assume users will typically configure either most or least significant byte of VIDs; avoid them */
+    if (ret == 0)                      /* next to impossible: requires a tlen with lower 16 bits == 0 and that hashes to zero */
+      ret = (int32u) 0x1 << 16;        /* assume users will typically configure either most or least significant byte of VIDs; avoid them */
   }
 
+  if (ret == 0 || ret == (int32u) -1)
+    Alarmp(SPLOG_FATAL, CONF_SYS | EXIT, "Conf_str_to_id: BUG! A string mapped to 0 or -1 somehow?!\n");
+  
   return ret;  
 }
 
@@ -888,14 +892,19 @@
 
 void    Conf_set_active_ip_version(int ipver)
 {
+    if (Conf_Active_IP_Version != -1 && ipver != Conf_Active_IP_Version)
+        Alarmp(SPLOG_FATAL, CONF_SYS, "Conf_set_active_ip_version: active IP version already differently specified: %d vs. %d\n", Conf_Active_IP_Version, ipver);
+    
     switch( ipver )
     {
     case AF_INET:
     case AF_INET6:
         Conf_Active_IP_Version = ipver;
         break;
+    case -1:
     default:
         Alarmp(SPLOG_FATAL, CONF_SYS, "Conf_set_active_ip_version: Invalid IP version specified: %d\n", ipver);
+        break;
     }
 }
 

Modified: trunk/daemon/spread_params.h
===================================================================
--- trunk/daemon/spread_params.h	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/daemon/spread_params.h	2016-11-17 18:50:54 UTC (rev 862)
@@ -43,7 +43,7 @@
 
 #define         SPREAD_PROTOCOL         3
 
-#define         SPREAD_BUILD_DATE       "18/Apr/2016"
+#define         SPREAD_BUILD_DATE       "18/Nov/2016"
 
 #define		DEFAULT_SPREAD_PORT	4803
 
@@ -62,7 +62,7 @@
 
 #define		MAX_PROC_NAME		 20     /* including the nul terminator, so actually usable is one less, look for it if changed */
 
-#define         MAX_ID_SIZE              16     /* ids are 32b values presented in IPv4 address format */
+#define         MAX_ID_SIZE              16     /* ids are unsigned 32b integer values */
 
 #define		MAX_PROCS_SEGMENT	128
 #define		MAX_SEGMENTS		 20

Modified: trunk/libspread-util/configure.in
===================================================================
--- trunk/libspread-util/configure.in	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/libspread-util/configure.in	2016-11-17 18:50:54 UTC (rev 862)
@@ -1,4 +1,4 @@
-AC_INIT(Spread_Util, 4.3.0)
+AC_INIT(Spread_Util, 5.0.0)
 
 AC_CONFIG_AUX_DIR(buildtools)
 AC_CONFIG_HEADERS(src/config.h)

Modified: trunk/license.txt
===================================================================
--- trunk/license.txt	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/license.txt	2016-11-17 18:50:54 UTC (rev 862)
@@ -1,6 +1,6 @@
 Spread Open-Source License -- Version 1.0
 -----------------------------------------
-Copyright (c) 1993-2006 Spread Concepts LLC.  All rights reserved.
+Copyright (c) 1993-2016 Spread Concepts LLC.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are

Deleted: trunk/release_announcement_4.4.txt
===================================================================
--- trunk/release_announcement_4.4.txt	2016-11-14 17:40:56 UTC (rev 861)
+++ trunk/release_announcement_4.4.txt	2016-11-17 18:50:54 UTC (rev 862)
@@ -1,66 +0,0 @@
-Spread 4.4.0 http://www.spread.org
-
-Spread Concepts LLC is happy to announce the release of a 
-new version, 4.4.0, of The Spread Toolkit. 
-
-The Spread 4.4 version is an important release that incorporates a new,
-accelerated ring protocol.  This protocol is tailored for data center networks 
-and can provide 30%-50% higher throughput and 20-35% lower latency in modern 
-local area networks.  This version also supports Spread's regular ring protocol.
-
-The main new features of this release are:
-
-1) Accelerated ring protocol to improve both throughput and latency in local area networks.
-
-2) Redesigned message-packing, reducing overhead for small messages.
-
-3) Updated MSVS project files for Windows source builds.
-
-4) Several important bugfixes that make Spread more stable, especially under high loss.
-
-5) Expanded and improved logging.
-
-6) Binary executable releases for 64b OSX (10.6+) and Windows 8.
-
-For details check the Readme.txt file. 
-
-This release does not include any API changes, so applications should be able to be
-relinked or recompiled with the new Spread library without changes. 
-
-A new AcceleratedRing parameter has been added to Spread's configuration file.
-If this parameter is set to true, then the accelerated ring protocol will be used.  
-If it is set to false, then the regular ring protocol will be used.  If it is left 
-unspecified (the default), then Spread will try to determine which protocol is likely better 
-for your environment.  If your configuration looks like it might be a LAN (i.e. - all 
-daemon IPs are in the same /16 network) rather than a WAN, then Spread will use 
-the accelerated protocol.  Otherwise, it will use the regular protocol.  All the daemons 
-in a configuration must use the same ring protocol.  Daemons with different protocols 
-will refuse to communicate with one another.
-
-A new AcceleratedWindow parameter (default 15), with a value between 0 and the 
-value of the PersonalWindow parameter (default 20), can be specified as a flow 
-control parameter in the spread.conf file.  When the accelerated protocol is used,
-the higher the AcceleratedWindow parameter the more acceleration can be expected, 
-up to a point.  In our testing on an 8 daemon ring on 1Gb/s and 10Gb/s networks, we 
-achieved peak performance with both AcceleratedWindow and PersonalWindow 
-values of 20.  The accelerated protocol achieves peak performance with smaller values 
-of PersonalWindow than the regular protocol.  The sample.spread.conf file included in 
-this release has example settings for these parameters that enable the Accelerated 
-ring protocol, as well as a description of their functions.
-
-The Spread toolkit provides a high performance messaging service that is resilient 
-to faults across local and wide area networks. Spread functions as a unified message bus 
-for distributed applications, and provides highly tuned application-level multicast, group 
-communication, and point to point support. Spread services range from reliable messaging 
-to fully ordered messages with virtual synchrony delivery guarantees, even in case 
-of computer failures and network partitions.
-
-Please be aware, that under the Spread Open Source License, the toolkit may 
-be freely used only under some conditions. For example, the license includes 
-the requirement that all advertising materials (including web pages) 
-mentioning software that uses Spread display a specific acknowledgment. 
-Please review the license agreement for more details.
-http://www.spread.org/license/
-
-Other commercial licenses or other licensing arrangements are available. 
-Please contact info at spreadconcepts.com. 

Copied: trunk/release_announcement_5.0.txt (from rev 860, trunk/release_announcement_4.4.txt)
===================================================================
--- trunk/release_announcement_5.0.txt	                        (rev 0)
+++ trunk/release_announcement_5.0.txt	2016-11-17 18:50:54 UTC (rev 862)
@@ -0,0 +1,43 @@
+Spread 5.0.0 http://www.spread.org
+
+Spread Concepts LLC is happy to announce the release of a 
+new version, 5.0.0, of The Spread Toolkit. 
+
+Spread 5.0 is an important release that adds support for IPv6.
+
+For details check the Readme.IPv6 file. 
+
+This release maintains the previous client API, so applications should
+be able to be relinked or recompiled with the new Spread library
+without changes.  However, if you used functionality from
+libspread-util in your programs, then you will need to recompile as
+some header constants have changed.
+
+The Spread 5 daemon is not backwards compatible with previous
+versions.  Spread 4 and Spread 5 daemons will refuse to communicate
+with one another.
+
+Several new syntaxes and features have been added to the configuration
+file.  The configuration file is almost entirely backwards compatible.
+Please check the docs/sample.spread.conf file for details.
+
+=====================================================================
+
+The Spread Toolkit provides a high performance messaging service that
+is resilient to faults across local and wide area networks. Spread
+functions as a unified message bus for distributed applications, and
+provides highly tuned application-level multicast, group
+communication, and point to point support. Spread services range from
+reliable messaging to fully ordered messages with virtual synchrony
+delivery guarantees, even in case of computer failures and network
+partitions.
+
+Please be aware, that under the Spread Open Source License, the
+toolkit may be freely used only under some conditions. For example,
+the license includes the requirement that all advertising materials
+(including web pages) mentioning software that uses Spread display a
+specific acknowledgment.  Please review the license agreement for more
+details.  http://www.spread.org/license/
+
+Other commercial licenses or other licensing arrangements are
+available.  Please contact info at spreadconcepts.com.




More information about the Spread-cvs mailing list