crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

commit 8ecf2c1aed7ec5a79b161e2e2c482f3ab002e273
parent ab9232d2ce5ca02a923c0227caecf1b56358b94d
Author: finwo <finwo@pm.me>
Date:   Sat,  3 Jan 2026 19:33:22 +0100

1.54

Diffstat:
MChangeLog | 11+++++++++++
Mdoc/crossroads-mgr.1 | 5+++++
Mdoc/crossroads.html | 28+++++++++++++++++++++-------
Mdoc/crossroads.pdf | 0
Mdoc/main/intro.yo | 5++++-
Mdoc/main/tips/webinterface.yo | 19+++++++++++++++----
Mdoc/man/crossroads-mgr.yo | 4++++
Metc/Makefile.def | 2+-
Metc/svnrev.txt | 2+-
Msrc/crossroads-daemon/main.c | 2+-
Msrc/crossroads-mgr/crossroads-mgr.in | 13+++++++++++--
Msrc/crossroads-mgr/crossroads-mgr.usage | 2++
Msrc/crossroads-mgr/crossroads-mgr.xslt | 2+-
Msrc/crossroads.h | 2+-
Msrc/crossroads/main.c | 2+-
Msrc/lib/allocreporter.c | 2+-
Msrc/lib/ansistamp.c | 2+-
Msrc/lib/backendavailable.c | 2+-
Msrc/lib/backendconnect.c | 2+-
Msrc/lib/backendcount.c | 2+-
Msrc/lib/choosebackend.c | 2+-
Msrc/lib/configread.c | 2+-
Msrc/lib/configtest.c | 2+-
Msrc/lib/configwrite.c | 2+-
Msrc/lib/copysockets.c | 2+-
Msrc/lib/createcommandlinespace.c | 2+-
Msrc/lib/data.c | 2+-
Msrc/lib/deallocreporter.c | 2+-
Msrc/lib/decrclientcount.c | 2+-
Msrc/lib/dns.c | 2+-
Msrc/lib/error.c | 2+-
Msrc/lib/forktcpservicer.c | 2+-
Msrc/lib/hashpjw.c | 2+-
Msrc/lib/httpcopy.c | 2+-
Msrc/lib/httperror.c | 2+-
Msrc/lib/httpheaderaddheader.c | 2+-
Msrc/lib/httpheaderappendheader.c | 2+-
Msrc/lib/httpheaderconnectiontype.c | 2+-
Msrc/lib/httpheaderfree.c | 2+-
Msrc/lib/httpheaderhascookie.c | 2+-
Msrc/lib/httpheaderhttpver.c | 2+-
Msrc/lib/httpheadernew.c | 2+-
Msrc/lib/httpheaderread.c | 2+-
Msrc/lib/httpheaderremoveheader.c | 2+-
Msrc/lib/httpheadersetheader.c | 2+-
Msrc/lib/httpheaderval.c | 2+-
Msrc/lib/httpheaderwrite.c | 2+-
Msrc/lib/httpinsertheader.c | 2+-
Msrc/lib/httpserve.c | 2+-
Msrc/lib/httpserversocket.c | 2+-
Msrc/lib/httpwrite.c | 2+-
Msrc/lib/incrclientcount.c | 2+-
Msrc/lib/initsockaddr.c | 2+-
Msrc/lib/interrupt.c | 2+-
Msrc/lib/ipfaddallow.c | 2+-
Msrc/lib/ipfadddeny.c | 2+-
Msrc/lib/ipfallowed.c | 2+-
Msrc/lib/ipfdenied.c | 2+-
Msrc/lib/ipfloadfile.c | 2+-
Msrc/lib/ipfmatch.c | 2+-
Msrc/lib/ipfparse.c | 2+-
Msrc/lib/ishexdigit.c | 2+-
Msrc/lib/isspace.c | 2+-
Msrc/lib/lexer.c | 2+-
Msrc/lib/lockreporter.c | 2+-
Msrc/lib/logactivityany.c | 2+-
Msrc/lib/logactivitycontinuation.c | 2+-
Msrc/lib/logactivityend.c | 2+-
Msrc/lib/logactivitystart.c | 2+-
Msrc/lib/makesocket.c | 2+-
Msrc/lib/markactivity.c | 2+-
Msrc/lib/msg.c | 2+-
Msrc/lib/msgdumpbuf.c | 2+-
Msrc/lib/netbuffer.c | 2+-
Msrc/lib/netbufread.c | 2+-
Msrc/lib/netcopy.c | 2+-
Msrc/lib/netread.c | 2+-
Msrc/lib/netwrite.c | 2+-
Msrc/lib/parser.c | 2+-
Msrc/lib/parserclose.c | 4++--
Msrc/lib/parserfilename.c | 2+-
Msrc/lib/parserinput.c | 2+-
Msrc/lib/parseropen.c | 2+-
Msrc/lib/parserrun.c | 2+-
Msrc/lib/parserskipchar.c | 2+-
Msrc/lib/parserskipline.c | 2+-
Msrc/lib/restart.c | 2+-
Msrc/lib/runservice.c | 2+-
Msrc/lib/serve.c | 2+-
Msrc/lib/setproctitle.c | 2+-
Msrc/lib/showconfig.c | 2+-
Msrc/lib/showservices.c | 2+-
Msrc/lib/showstatus.c | 2+-
Msrc/lib/stagetostring.c | 2+-
Msrc/lib/statetostring.c | 2+-
Msrc/lib/stopdaemon.c | 2+-
Msrc/lib/strcasestr.c | 2+-
Msrc/lib/strexpandformat.c | 2+-
Msrc/lib/stringtostate.c | 2+-
Msrc/lib/strlcat.c | 2+-
Msrc/lib/strprintf.c | 2+-
Msrc/lib/strupr.c | 2+-
Msrc/lib/strvprintf.c | 2+-
Msrc/lib/symtabend.c | 2+-
Msrc/lib/symtablookup.c | 2+-
Msrc/lib/symtabset.c | 2+-
Msrc/lib/symtabstart.c | 2+-
Msrc/lib/sysrun.c | 2+-
Msrc/lib/tcpserve.c | 2+-
Msrc/lib/tellservice.c | 2+-
Msrc/lib/thruputlog.c | 2+-
Msrc/lib/trafficlog.c | 2+-
Msrc/lib/uidassume.c | 2+-
Msrc/lib/uidrestore.c | 2+-
Msrc/lib/unlockreporter.c | 2+-
Msrc/lib/usage.c | 2+-
Msrc/lib/vsyslog.c | 2+-
Msrc/lib/wakeuphandler.c | 2+-
Msrc/lib/warning.c | 2+-
Msrc/lib/writelog.c | 2+-
Msrc/lib/xcalloc.c | 2+-
Msrc/lib/xmalloc.c | 2+-
Msrc/lib/xrealloc.c | 2+-
Msrc/lib/xstrcat.c | 2+-
Msrc/lib/xstrcatch.c | 2+-
Msrc/lib/xstrdup.c | 2+-
Mtest/virtpoolmgr | 149++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
127 files changed, 313 insertions(+), 159 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,6 +1,17 @@ ChangeLog for Crossroads ------------------------------------------------------------------------------ +1.54 [KK 2007-07-30] + - Changed copyright to GPL V3. + +1.53 [KK 2007-07-29] + - Misc small changes, thanks Simon Matter for all suggestions, + fixes and diffs! Changes include: ps fix for Linux systems in + crossroads-mgr, 'use POSIX' fix in Perl, C code fix for for + older gcc's. + - crossroads-mgr now supports a flag '-a address' to specify a + listening address (also suggested by Simon). + 1.52 [KK 2007-07-12] - Added list of keywords to the docs - Removed Log4Perl dependency in crossroads-mgr (easier for distro's) diff --git a/doc/crossroads-mgr.1 b/doc/crossroads-mgr.1 @@ -38,6 +38,11 @@ functionality as \fBcrossroads-mgr\fP\&. \fBcrossroads-mgr\fP recognizes the following flags: .PP .IP o +\fB-a ADDRESS\fP: Specifies the address to which the +manager binds\&. E\&.g\&., one may specify \fB-a 127\&.0\&.0\&.1\fP, after +which only requests originating from localhost will be served\&. +.IP +.IP o \fB-b UN:PW\fP: Viewing the status is protected using simple basic authentication, requiring username \fBUN\fP and password \fBPW\fP\&. diff --git a/doc/crossroads.html b/doc/crossroads.html @@ -1,12 +1,12 @@ <a name="../crossroads-defs"></a><a name="defs"></a><html><head> -<title>Crossroads 1.52</title> +<title>Crossroads 1.54</title> <link rel="stylesheet" type="text/css" href="http://www.e-tunity.com/css/yodl.css"> <link rel="stylesheet" type="text/css" href="http://www.e-tunity.com/css/yodl.css"> <link rev="made" href="mailto:info@e-tunity.com"> </head> <body> <hr> -<h1>Crossroads 1.52</h1> +<h1>Crossroads 1.54</h1> <h2>Karel Kubat <br> Maintained by Karel Kubat (karel@kubat.nl)</h2> @@ -249,7 +249,10 @@ or bug reports, always include the following: <p> Crossroads is distributed as-is, without assumptions of fitness or usability. You are free to use crossroads to your liking. It's free, -and as with everything that's free: there's also no warranty. +and as with everything that's free: there's also no +warranty. Crossroads is distibuted under the GNU General Public +Licence, version 3. See <a href="http://crossroads.e-tunity.com">http://crossroads.e-tunity.com</a> for more +information. <p> You are allowed to make modifications to the source code of crossroads, and you are allowed to (re)distribute crossroads, as long @@ -3544,10 +3547,21 @@ attention. Unless specified otherwise, anyone who points their browser to the balancer and the given port, can view back end states and even change them. This may be a too lax policy. <p> -The web interface daemon offers one method to limit access: it can -optionally enforce basic authentication (username and password) when -viewing the status, and/or when switching states. Enforcing basic -authentication is turned off using two command line flags: +The web interface daemon has two methods to limit access: a listening +address can be specified via the command line, and basic +authentication (username / password protection) can be turned on. +<p> +Specifying a listening address is done using the flag <code>-a</code>. E.g., +after +<p> +<center><code>crossroads-mgr -a 127.0.0.1 start 10000</code></center> +<p> +the manager is started to listen to port 10000, but only on the +address 127.0.0.1 which is localhost. Requests from other addresses +will not be served. +<p> +Enforcing basic authentication is turned on using two command line +flags: <p> <ul> <li> Flag <code>-b</code> turns on basic authentication to view the status. diff --git a/doc/crossroads.pdf b/doc/crossroads.pdf Binary files differ. diff --git a/doc/main/intro.yo b/doc/main/intro.yo @@ -69,7 +69,10 @@ subsect(Copyright and Disclaimer) Crossroads is distributed as-is, without assumptions of fitness or usability. You are free to use crossroads to your liking. It's free, -and as with everything that's free: there's also no warranty. +and as with everything that's free: there's also no +warranty. Crossroads is distibuted under the GNU General Public +Licence, version 3. See lurl(http://crossroads.e-tunity.com) for more +information. You are allowed to make modifications to the source code of crossroads, and you are allowed to (re)distribute crossroads, as long diff --git a/doc/main/tips/webinterface.yo b/doc/main/tips/webinterface.yo @@ -58,10 +58,21 @@ attention. Unless specified otherwise, anyone who points their browser to the balancer and the given port, can view back end states and even change them. This may be a too lax policy. -The web interface daemon offers one method to limit access: it can -optionally enforce basic authentication (username and password) when -viewing the status, and/or when switching states. Enforcing basic -authentication is turned off using two command line flags: +The web interface daemon has two methods to limit access: a listening +address can be specified via the command line, and basic +authentication (username / password protection) can be turned on. + +Specifying a listening address is done using the flag tt(-a). E.g., +after + +center(tt(crossroads-mgr -a 127.0.0.1 start 10000)) + +the manager is started to listen to port 10000, but only on the +address 127.0.0.1 which is localhost. Requests from other addresses +will not be served. + +Enforcing basic authentication is turned on using two command line +flags: itemization( it() Flag tt(-b) turns on basic authentication to view the status. diff --git a/doc/man/crossroads-mgr.yo b/doc/man/crossroads-mgr.yo @@ -33,6 +33,10 @@ manpageoptions() itemization( + it() bf(-a ADDRESS): Specifies the address to which the + manager binds. E.g., one may specify bf(-a 127.0.0.1), after + which only requests originating from localhost will be served. + it() bf(-b UN:PW): Viewing the status is protected using simple basic authentication, requiring username bf(UN) and password bf(PW). diff --git a/etc/Makefile.def b/etc/Makefile.def @@ -6,7 +6,7 @@ # Versioning. This defines the overall version ID and must match the topmost # entry in the ChangeLog. -VER = 1.52 +VER = 1.54 # Years that Crossroads has been 'round. YEARS = 2005-2007 diff --git a/etc/svnrev.txt b/etc/svnrev.txt @@ -1 +1 @@ -187 +190 diff --git a/src/crossroads-daemon/main.c b/src/crossroads-daemon/main.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/crossroads-mgr/crossroads-mgr.in b/src/crossroads-mgr/crossroads-mgr.in @@ -5,7 +5,7 @@ __WARNING__ use strict; use HTTP::Daemon; use Getopt::Std; -use Posix qw(:sys_wait_h setsid); +use POSIX qw(:sys_wait_h setsid); use MIME::Base64; # The built in XSLT. @@ -35,7 +35,7 @@ $daemon->start ($prog->port()); # doesn't return my %opts; # Get the commandline options. - ::getopts ('vfl:x:X:b:B:', \%opts) or usage(); + ::getopts ('vfl:x:X:b:B:a:', \%opts) or usage(); # Act according to argument; 'start' is handled here. if ($ARGV[0] eq 'stop') { @@ -55,6 +55,7 @@ $daemon->start ($prog->port()); # doesn't return $self->{foreground} = $opts{f} ? 1 : 0; $self->{isdaemon} = 0; $self->{xsltfile} = $opts{X} if ($opts{X}); + $self->{address} = $opts{a} if ($opts{a}); if ($opts{b}) { if ($opts{b} eq 'PROMPT') { print ("Enter username:password for status authentication: ") @@ -136,6 +137,7 @@ ENDUSAGE sub pids { my %ps = (Darwin => 'ps ax', linux => 'ps ax', + Linux => 'ps ax', SunOS => 'ps -eo \'pid args\''); my $uname = `uname`; chomp ($uname); @@ -160,6 +162,12 @@ ENDUSAGE return ($_[0]->{port}); } + # Get or set the listening address. + sub address { + $_[0]->{address} = $_[1] if ($_[1]); + return ($_[0]->{address}); + } + # Issue an error sub error { my $self = shift; @@ -273,6 +281,7 @@ ENDUSAGE my ($self, $port) = @_; $prog->msg ("Starting HTTP daemon on port $port"); my $daemon = HTTP::Daemon->new (LocalPort => $port, + LocalAddr => $prog->address(), ReuseAddr => 1) or $prog->error ("Failed to start HTTP daemon. ", "Maybe the address is in use?"); diff --git a/src/crossroads-mgr/crossroads-mgr.usage b/src/crossroads-mgr/crossroads-mgr.usage @@ -5,6 +5,8 @@ Usage: crossroads-mgr [flags] start PORT (starts on tcp port) Controls a mini-webserver to monitor Crossroads. Supported flags during 'start' are: + -a ADDR States the binding address for the monitor. Default is to listen + to all addresses. -b UN:PW Viewing the Crossroads status will be protected using basic authentication, UN is the username, PW is the password. Use PROMPT to be prompted for the username/password. diff --git a/src/crossroads-mgr/crossroads-mgr.xslt b/src/crossroads-mgr/crossroads-mgr.xslt @@ -124,7 +124,7 @@ </xsl:choose> <xsl:choose> <xsl:when test="availability/@id = 1"> - <option value="unavailable" selected="1">UNAVAILABLE</option> + <option value="unavailable" selected="1">unavailable</option> </xsl:when> <xsl:otherwise> <option value="unavailable">unavailable</option> diff --git a/src/crossroads.h b/src/crossroads.h @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/crossroads/main.c b/src/crossroads/main.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/allocreporter.c b/src/lib/allocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ansistamp.c b/src/lib/ansistamp.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendavailable.c b/src/lib/backendavailable.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendconnect.c b/src/lib/backendconnect.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/backendcount.c b/src/lib/backendcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/choosebackend.c b/src/lib/choosebackend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configread.c b/src/lib/configread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configtest.c b/src/lib/configtest.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/configwrite.c b/src/lib/configwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/copysockets.c b/src/lib/copysockets.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/createcommandlinespace.c b/src/lib/createcommandlinespace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/data.c b/src/lib/data.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/deallocreporter.c b/src/lib/deallocreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/decrclientcount.c b/src/lib/decrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/dns.c b/src/lib/dns.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/error.c b/src/lib/error.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/forktcpservicer.c b/src/lib/forktcpservicer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/hashpjw.c b/src/lib/hashpjw.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpcopy.c b/src/lib/httpcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httperror.c b/src/lib/httperror.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderaddheader.c b/src/lib/httpheaderaddheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderappendheader.c b/src/lib/httpheaderappendheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderconnectiontype.c b/src/lib/httpheaderconnectiontype.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderfree.c b/src/lib/httpheaderfree.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderhascookie.c b/src/lib/httpheaderhascookie.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderhttpver.c b/src/lib/httpheaderhttpver.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheadernew.c b/src/lib/httpheadernew.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderread.c b/src/lib/httpheaderread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderremoveheader.c b/src/lib/httpheaderremoveheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheadersetheader.c b/src/lib/httpheadersetheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderval.c b/src/lib/httpheaderval.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpheaderwrite.c b/src/lib/httpheaderwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpinsertheader.c b/src/lib/httpinsertheader.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpserve.c b/src/lib/httpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpserversocket.c b/src/lib/httpserversocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/httpwrite.c b/src/lib/httpwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/incrclientcount.c b/src/lib/incrclientcount.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/initsockaddr.c b/src/lib/initsockaddr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/interrupt.c b/src/lib/interrupt.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfaddallow.c b/src/lib/ipfaddallow.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfadddeny.c b/src/lib/ipfadddeny.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfallowed.c b/src/lib/ipfallowed.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfdenied.c b/src/lib/ipfdenied.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfloadfile.c b/src/lib/ipfloadfile.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfmatch.c b/src/lib/ipfmatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ipfparse.c b/src/lib/ipfparse.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/ishexdigit.c b/src/lib/ishexdigit.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/isspace.c b/src/lib/isspace.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/lexer.c b/src/lib/lexer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/lockreporter.c b/src/lib/lockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivityany.c b/src/lib/logactivityany.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivitycontinuation.c b/src/lib/logactivitycontinuation.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivityend.c b/src/lib/logactivityend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/logactivitystart.c b/src/lib/logactivitystart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/makesocket.c b/src/lib/makesocket.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/markactivity.c b/src/lib/markactivity.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/msg.c b/src/lib/msg.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/msgdumpbuf.c b/src/lib/msgdumpbuf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netbuffer.c b/src/lib/netbuffer.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netbufread.c b/src/lib/netbufread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netcopy.c b/src/lib/netcopy.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netread.c b/src/lib/netread.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/netwrite.c b/src/lib/netwrite.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parser.c b/src/lib/parser.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserclose.c b/src/lib/parserclose.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -7,9 +7,9 @@ #include "../crossroads.h" int parser_close () { - nparserstate--; int remaining = 0; + nparserstate--; if (nparserstate > 0) { /* We still have files in the parserstate stack. Set up yyin and * yylineno, and return 0 to signal that yyin has been set up diff --git a/src/lib/parserfilename.c b/src/lib/parserfilename.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserinput.c b/src/lib/parserinput.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parseropen.c b/src/lib/parseropen.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserrun.c b/src/lib/parserrun.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserskipchar.c b/src/lib/parserskipchar.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/parserskipline.c b/src/lib/parserskipline.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/restart.c b/src/lib/restart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/runservice.c b/src/lib/runservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/serve.c b/src/lib/serve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/setproctitle.c b/src/lib/setproctitle.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/showconfig.c b/src/lib/showconfig.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/showservices.c b/src/lib/showservices.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/showstatus.c b/src/lib/showstatus.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/stagetostring.c b/src/lib/stagetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/statetostring.c b/src/lib/statetostring.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/stopdaemon.c b/src/lib/stopdaemon.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strcasestr.c b/src/lib/strcasestr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strexpandformat.c b/src/lib/strexpandformat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/stringtostate.c b/src/lib/stringtostate.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strlcat.c b/src/lib/strlcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strprintf.c b/src/lib/strprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strupr.c b/src/lib/strupr.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/strvprintf.c b/src/lib/strvprintf.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabend.c b/src/lib/symtabend.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtablookup.c b/src/lib/symtablookup.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabset.c b/src/lib/symtabset.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/symtabstart.c b/src/lib/symtabstart.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/sysrun.c b/src/lib/sysrun.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/tcpserve.c b/src/lib/tcpserve.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/tellservice.c b/src/lib/tellservice.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/thruputlog.c b/src/lib/thruputlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/trafficlog.c b/src/lib/trafficlog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/uidassume.c b/src/lib/uidassume.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/uidrestore.c b/src/lib/uidrestore.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/unlockreporter.c b/src/lib/unlockreporter.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/usage.c b/src/lib/usage.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/vsyslog.c b/src/lib/vsyslog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/wakeuphandler.c b/src/lib/wakeuphandler.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/warning.c b/src/lib/warning.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/writelog.c b/src/lib/writelog.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xcalloc.c b/src/lib/xcalloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xmalloc.c b/src/lib/xmalloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xrealloc.c b/src/lib/xrealloc.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrcat.c b/src/lib/xstrcat.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrcatch.c b/src/lib/xstrcatch.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/src/lib/xstrdup.c b/src/lib/xstrdup.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.52, a load balancer and fail over + * This file is part of Crosroads 1.54, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ diff --git a/test/virtpoolmgr b/test/virtpoolmgr @@ -2,14 +2,123 @@ use strict; -# Configuration: +# Crossroads control package +# -------------------------- +package Crossroads; + +# Instantiate object. Argument can be a Crossroads calling command, defaults +# to plain 'crossroads'. +sub new { + my ($proto, $xrbin) = @_; + my $self = {}; + + # Get a snapshot of the state. + $self->{xrbin} = $xrbin || "crossroads"; + my $cmd = $self->{xrbin} . ' -x status |'; + open (my $if, $cmd) or die ("Cannot run '$cmd'"); + my ($curservice, $curbackend, + %service, %servicedata, %backend, %backenddata, @services, @backends); + while (my $line = <$if>) { + chomp ($line); + my $tag = _xtag($line); + if ($tag eq 'service') { + $curservice = _xatt ($line, "name"); + push (@services, $curservice); + @backends = (); + %backenddata = (); + } elsif ($tag eq 'connections') { + if ($curbackend eq '') { + $service{connections} = _xdata($line); + } else { + $backend{connections} = _xdata($line); + } + } elsif ($tag =~ /^backends_/) { + $service{$tag} = _xdata($line); + } elsif ($tag eq 'backend') { + $curbackend = _xatt ($line, 'name'); + push (@backends, $curbackend); + %backend = (); + } elsif ($tag eq 'availability') { + $backend{availability} = _xdata($line); + $backend{availability_id} = _xatt($line, 'id'); + } elsif ($tag eq '/backend') { + $backenddata{$curbackend} = \%backend; + } elsif ($tag eq '/service') { + $servicedata{$curservice} = [ \@backends, \%backenddata ]; + } + } + + $self->{services} = \@services; + $self->{servicedata} = \%servicedata; + + bless ($self, $proto); + return ($self); +} -# How to call Crossroads -my $crossroads = "/usr/local/bin/crossroads " . - "-c /usr/local/src/crossroads/test/t14.conf"; +# Return array of available services. +sub services { + return ( @{ $_[0]->{services} } ); +} + +# Return back ends of a given service. +sub backends { + my %servicedata = %{ $_[0]->{servicedata} }; + my $data = $servicedata{$_[1]}; + return (undef) unless ($data); + my ($backendsref, $backenddataref) = @{ $data }; + return (@{ $backendsref }); +} -# The service we are managing, must match the conf. -my $service = "vpool"; +# Wrappers for back end details of a given service. +sub availability { _backenddata(@_, 'availability'); } + +# Access stored data from XML document +sub _backenddata { + my ($self, $service, $backend, $detail) = @_; + my %servicedata = %{ $self->{servicedata} } or return (undef); + my $data = $servicedata{$service} or return (undef); + my ($backendsref, $backenddataref) = @{ $data }; + my %backenddata = %{ $backenddataref } or return (undef); + my %backenddetail = %{ $backenddata{$backend} } or return (undef); + return ($backenddetail{$detail}); +} + +# Simple XML support functions. All classless! +sub _xtag ($) { + my $line = shift; + for my $p (split (/[ <>]/, $line)) { + if ($p ne '') { + # print ("tag of $line: $p\n"); + return ($p); + } + } + return (undef); +} +sub _xatt ($$) { + my ($line, $att) = @_; + my $ret = $line; + $ret =~ s/.*$att=\"//; + $ret =~ s/\".*//; + # print ("att $att of $line: $ret\n"); + return ($ret); +} +sub _xdata ($) { + my $line = shift; + my $ret = $line; + $ret =~ s/<\/.*//; + $ret =~ s/.*>//; + # print ("data of $line: $ret\n"); + return ($ret); +} + + +# Main programs is below here +# --------------------------- + +package main; + +# Configuration: +# -------------- # What to call when requesting a pool worker. This program is expected # to output an IP address, a : and a port. @@ -19,26 +128,12 @@ my $getip = "/usr/local/src/crossroads/test/virtpoolhelper get"; # program gets an IP address, a : and a port as its only argument. my $releaseip = "/usr/local/src/crossroads/test/virtpoolhelper release"; -# Debugging on or of? -my $verbose = 1; - -# Main starts here -# ---------------- -msg ("Start of run\n"); - -# Get a snapshot of the current balancer state. -snapshot(); +print ("Start of run at ", scalar(localtime()), "\n"); +my $xr = new Crossroads ('crossroads -c /sw/src/crossroads/test/t14.conf'); -# Verbose messaging -# ----------------- -sub msg { - return unless ($verbose); - print ("virtpoolmgr: ", @_); -} - -# Get snapshot -# ------------ -sub snapshot() { - open (my $if, "$crossroads -x status |") - or die ("Cannot start Crossroads status: $!\n"); +for my $s ($xr->services()) { + print ("Service: $s\n"); + for my $b ($xr->backends ($s)) { + print (" Back end: $b, ", $xr->availability ($s, $b), "\n"); + } }