commit ab9232d2ce5ca02a923c0227caecf1b56358b94d parent 219e1f9fcec93927c76825db1d59e1adcdaa1804 Author: finwo <finwo@pm.me> Date: Sat, 3 Jan 2026 19:33:20 +0100 1.52 Diffstat:
130 files changed, 812 insertions(+), 515 deletions(-)
diff --git a/ChangeLog b/ChangeLog @@ -1,6 +1,10 @@ ChangeLog for Crossroads ------------------------------------------------------------------------------ +1.52 [KK 2007-07-12] + - Added list of keywords to the docs + - Removed Log4Perl dependency in crossroads-mgr (easier for distro's) + 1.51 [KK 2007-07-10] - Removed global MAX_BACKEND setting. The number of back ends per service is now totally dynamic - derived from the diff --git a/doc/Makefile b/doc/Makefile @@ -2,7 +2,7 @@ include ../etc/Makefile.def YODLINC = -I.:/usr/local/share/yodl:/usr/share/yodl:$(BASE)/doc/main -foo: defs +foo: defs main/keywords.yo find main -type f -name '*.yo' -exec ../tools/untab {} \; cd man && yo2man crossroads mv man/crossroads.man crossroads.1 @@ -16,6 +16,9 @@ foo: defs cd main && yo2html crossroads mv main/*.html . +main/keywords.yo: $(BASE)/src/lib/parser.y + $(BASE)/tools/getkeywords < $< > $@ + defs: echo 'redef(VER)(1)($(VER))' > crossroads-defs.yo echo 'redef(YEARS)(1)($(YEARS))' >> crossroads-defs.yo diff --git a/doc/crossroads.conf.7 b/doc/crossroads.conf.7 @@ -92,12 +92,67 @@ service web { \fBKeywords, numbers, identifiers, generic strings\fP .PP In a configuration file, statements are identified by \fIkeywords\fP, -such as \f(CWservice\fP, \f(CWverbosity\fP\&. These are reserved words\&. +which are reserved words\&. The list of the keywords of the Crossroads +grammar is: +\f(CWservice\fP +\f(CWport\fP +\f(CWverbosity\fP +\f(CWmaxconnections\fP +\f(CWtype\fP +\f(CWany\fP +\f(CWhttp\fP +\f(CWbackend\fP +\f(CWserver\fP +\f(CWbindto\fP +\f(CWconnectiontimeout\fP +\f(CWon\fP +\f(CWoff\fP +\f(CWdispatchmode\fP +\f(CWroundrobin\fP +\f(CWrandom\fP +\f(CWbyduration\fP +\f(CWbysize\fP +\f(CWbyconnections\fP +\f(CWbyorder\fP +\f(CWbyclientip\fP +\f(CWover\fP +\f(CWdecay\fP +\f(CWrevivinginterval\fP +\f(CWcheckinterval\fP +\f(CWretries\fP +\f(CWshmkey\fP +\f(CWweight\fP +\f(CWonstart\fP +\f(CWonfail\fP +\f(CWbacklog\fP +\f(CWthroughputlog\fP +\f(CWtrafficlog\fP +\f(CWstickycookie\fP +\f(CWaddclientheader\fP +\f(CWsetclientheader\fP +\f(CWappendclientheader\fP +\f(CWaddserverheader\fP +\f(CWsetserverheader\fP +\f(CWappendserverheader\fP +\f(CWallowfrom\fP +\f(CWdenyfrom\fP +\f(CWallowfile\fP +\f(CWdenyfile\fP +\f(CWexternalhandler\fP +\f(CWuseraccount\fP +\f(CWonend\fP +\f(CWheaderinspection\fP +\f(CWdeep\fP +\f(CWshallow\fP +\f(CWstate\fP +\f(CWavailable\fP +\f(CWunavailable\fP +\f(CWdown\fP .PP Many keywords require an \fIidentifier\fP as the argument\&. E\&.g, a service has a unique name, which must start with a letter or underscore, followed by zero or more letters, underscores, or -digits\&. Therefore, in the statement \f(CWservice myservice\fP, the keyword is +digits\&. E\&.g\&., in the statement \f(CWservice myservice\fP, the keyword is \f(CWservice\fP and the identifier is \f(CWmyservice\fP\&. .PP Other keywords require a numeric argument\&. Crossroads knows only 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.51</title> +<title>Crossroads 1.52</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.51</h1> +<h1>Crossroads 1.52</h1> <h2>Karel Kubat <br> Maintained by Karel Kubat (karel@kubat.nl)</h2> @@ -785,12 +785,67 @@ service web { <strong>4.1.3: Keywords, numbers, identifiers, generic strings</strong> <p> In a configuration file, statements are identified by <em>keywords</em>, -such as <code>service</code>, <code>verbosity</code>. These are reserved words. +which are reserved words. The list of the keywords of the Crossroads +grammar is: +<a name="keywords.yo"></a><code>service</code> +<code>port</code> +<code>verbosity</code> +<code>maxconnections</code> +<code>type</code> +<code>any</code> +<code>http</code> +<code>backend</code> +<code>server</code> +<code>bindto</code> +<code>connectiontimeout</code> +<code>on</code> +<code>off</code> +<code>dispatchmode</code> +<code>roundrobin</code> +<code>random</code> +<code>byduration</code> +<code>bysize</code> +<code>byconnections</code> +<code>byorder</code> +<code>byclientip</code> +<code>over</code> +<code>decay</code> +<code>revivinginterval</code> +<code>checkinterval</code> +<code>retries</code> +<code>shmkey</code> +<code>weight</code> +<code>onstart</code> +<code>onfail</code> +<code>backlog</code> +<code>throughputlog</code> +<code>trafficlog</code> +<code>stickycookie</code> +<code>addclientheader</code> +<code>setclientheader</code> +<code>appendclientheader</code> +<code>addserverheader</code> +<code>setserverheader</code> +<code>appendserverheader</code> +<code>allowfrom</code> +<code>denyfrom</code> +<code>allowfile</code> +<code>denyfile</code> +<code>externalhandler</code> +<code>useraccount</code> +<code>onend</code> +<code>headerinspection</code> +<code>deep</code> +<code>shallow</code> +<code>state</code> +<code>available</code> +<code>unavailable</code> +<code>down</code> <p> Many keywords require an <em>identifier</em> as the argument. E.g, a service has a unique name, which must start with a letter or underscore, followed by zero or more letters, underscores, or -digits. Therefore, in the statement <code>service myservice</code>, the keyword is +digits. E.g., in the statement <code>service myservice</code>, the keyword is <code>service</code> and the identifier is <code>myservice</code>. <p> Other keywords require a numeric argument. Crossroads knows only @@ -4009,7 +4064,7 @@ crossroads, follow these steps. <p> <li> In order to use the web interface <code>crossroads-mgr</code>, make sure that the following Perl modules are available: - <code>HTTP::Daemon</code>, <code>Getopt::Std</code>, <code>Log::Log4perl</code>, + <code>HTTP::Daemon</code>, <code>Getopt::Std</code>, <code>MIME::Base64</code>. When in doubt, start the commandline tool <code>cpan</code> and enter <code>install HTTP::Daemon</code>, which will install the named module if necessary. You can repeat this for diff --git a/doc/crossroads.pdf b/doc/crossroads.pdf Binary files differ. diff --git a/doc/main/compiling.yo b/doc/main/compiling.yo @@ -72,7 +72,7 @@ itemization( it() In order to use the web interface tt(crossroads-mgr), make sure that the following Perl modules are available: - tt(HTTP::Daemon), tt(Getopt::Std), tt(Log::Log4perl), + tt(HTTP::Daemon), tt(Getopt::Std), tt(MIME::Base64). When in doubt, start the commandline tool tt(cpan) and enter tt(install HTTP::Daemon), which will install the named module if necessary. You can repeat this for diff --git a/doc/main/config.yo b/doc/main/config.yo @@ -76,12 +76,14 @@ service web { confsubsect(Keywords, numbers, identifiers, generic strings) In a configuration file, statements are identified by em(keywords), -such as tt(service), tt(verbosity). These are reserved words. +which are reserved words. The list of the keywords of the Crossroads +grammar is: +includefile(keywords.yo) Many keywords require an em(identifier) as the argument. E.g, a service has a unique name, which must start with a letter or underscore, followed by zero or more letters, underscores, or -digits. Therefore, in the statement tt(service myservice), the keyword is +digits. E.g., in the statement tt(service myservice), the keyword is tt(service) and the identifier is tt(myservice). Other keywords require a numeric argument. Crossroads knows only diff --git a/doc/main/keywords.yo b/doc/main/keywords.yo @@ -0,0 +1,54 @@ +tt(service) +tt(port) +tt(verbosity) +tt(maxconnections) +tt(type) +tt(any) +tt(http) +tt(backend) +tt(server) +tt(bindto) +tt(connectiontimeout) +tt(on) +tt(off) +tt(dispatchmode) +tt(roundrobin) +tt(random) +tt(byduration) +tt(bysize) +tt(byconnections) +tt(byorder) +tt(byclientip) +tt(over) +tt(decay) +tt(revivinginterval) +tt(checkinterval) +tt(retries) +tt(shmkey) +tt(weight) +tt(onstart) +tt(onfail) +tt(backlog) +tt(throughputlog) +tt(trafficlog) +tt(stickycookie) +tt(addclientheader) +tt(setclientheader) +tt(appendclientheader) +tt(addserverheader) +tt(setserverheader) +tt(appendserverheader) +tt(allowfrom) +tt(denyfrom) +tt(allowfile) +tt(denyfile) +tt(externalhandler) +tt(useraccount) +tt(onend) +tt(headerinspection) +tt(deep) +tt(shallow) +tt(state) +tt(available) +tt(unavailable) +tt(down) 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.51 +VER = 1.52 # Years that Crossroads has been 'round. YEARS = 2005-2007 diff --git a/etc/svnrev.txt b/etc/svnrev.txt @@ -1 +1 @@ -185 +187 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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,6 @@ __WARNING__ use strict; use HTTP::Daemon; use Getopt::Std; -use Log::Log4perl qw(:easy); use Posix qw(:sys_wait_h setsid); use MIME::Base64; @@ -90,9 +89,8 @@ $daemon->start ($prog->port()); # doesn't return if ($self->{call} eq ''); } die ("Argument $ARGV[0] is not a port number\n") unless ($self->{port}); - my $file = "/tmp/crossroads-mgr.log"; - $file = $opts{l} if ($opts{l}); - Log::Log4perl->easy_init ({level => $::DEBUG, file => $file}); + $self->{logfile} = "/tmp/crossroads-mgr.log"; + $self->{logfile} = $opts{l} if ($opts{l}); bless ($self, $proto); return ($self); @@ -168,7 +166,7 @@ ENDUSAGE if (! $self->{isdaemon}) { die (@_, "\n"); } else { - ::ERROR (@_); + $self->sendlog ('ERROR', @_); die (@_); } } @@ -192,10 +190,18 @@ ENDUSAGE if (! $self->{isdaemon}) { print (@_, "\n"); } else { - ::DEBUG (@_); + $self->sendlog ('DEBUG', @_); } } + # Log a line + sub sendlog { + my $self = shift; + my $type = shift; + open (my $of, '>>' . $self->{logfile}) or return; + print $of (scalar (localtime()), ' ', $type, ' ', @_, "\n"); + } + # Get/set verbosity sub verbose { $_[0]->{verbose} = $_[1] if ($_[1]); diff --git a/src/crossroads.h b/src/crossroads.h @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, a load balancer and fail over * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL. * Visit http://crossroads.e-tunity.com for information. *************************************************************************/ @@ -8,59 +8,59 @@ #define YYBISON 1 /* Identify Bison output. */ -# define SERVICE 257 -# define IDENTIFIER 258 -# define PORT 259 -# define NUMBER 260 -# define BACKEND 261 +# define IDENTIFIER 257 +# define NUMBER 258 +# define STRING 259 +# define SERVICE 260 +# define PORT 261 # define VERBOSITY 262 -# define SERVER 263 -# define ON 264 -# define OFF 265 -# define DISPATCHMODE 266 -# define ROUNDROBIN 267 -# define REVIVINGINTERVAL 268 -# define SHMKEY 269 -# define WEIGHT 270 -# define ONSTART 271 -# define ONFAIL 272 -# define STRING 273 -# define BACKLOG 274 +# define MAXCONNECTIONS 263 +# define TYPE 264 +# define ANY 265 +# define HTTP 266 +# define BACKEND 267 +# define SERVER 268 +# define BINDTO 269 +# define CONNECTIONTIMEOUT 270 +# define ON 271 +# define OFF 272 +# define DISPATCHMODE 273 +# define ROUNDROBIN 274 # define RANDOM 275 # define BYDURATION 276 # define BYSIZE 277 # define BYCONNECTIONS 278 -# define CONNECTIONTIMEOUT 279 -# define MAXCONNECTIONS 280 -# define BYORDER 281 -# define TRAFFICLOG 282 -# define OVER 283 -# define DECAY 284 -# define BINDTO 285 -# define THROUGHPUTLOG 286 -# define TYPE 287 -# define ANY 288 -# define HTTP 289 -# define STICKYCOOKIE 290 -# define ADDCLIENTHEADER 291 -# define SETCLIENTHEADER 292 -# define APPENDCLIENTHEADER 293 -# define ADDSERVERHEADER 294 -# define SETSERVERHEADER 295 -# define APPENDSERVERHEADER 296 -# define ALLOWFROM 297 -# define DENYFROM 298 -# define ALLOWFILE 299 -# define DENYFILE 300 -# define EXTERNALHANDLER 301 -# define ONEND 302 -# define USERACCOUNT 303 -# define BYCLIENTIP 304 -# define RETRIES 305 -# define HEADERINSPECTION 306 -# define DEEP 307 -# define SHALLOW 308 -# define CHECKINTERVAL 309 +# define BYORDER 279 +# define BYCLIENTIP 280 +# define OVER 281 +# define DECAY 282 +# define REVIVINGINTERVAL 283 +# define CHECKINTERVAL 284 +# define RETRIES 285 +# define SHMKEY 286 +# define WEIGHT 287 +# define ONSTART 288 +# define ONFAIL 289 +# define BACKLOG 290 +# define THROUGHPUTLOG 291 +# define TRAFFICLOG 292 +# define STICKYCOOKIE 293 +# define ADDCLIENTHEADER 294 +# define SETCLIENTHEADER 295 +# define APPENDCLIENTHEADER 296 +# define ADDSERVERHEADER 297 +# define SETSERVERHEADER 298 +# define APPENDSERVERHEADER 299 +# define ALLOWFROM 300 +# define DENYFROM 301 +# define ALLOWFILE 302 +# define DENYFILE 303 +# define EXTERNALHANDLER 304 +# define USERACCOUNT 305 +# define ONEND 306 +# define HEADERINSPECTION 307 +# define DEEP 308 +# define SHALLOW 309 # define STATE 310 # define AVAILABLE 311 # define UNAVAILABLE 312 @@ -269,41 +269,41 @@ static const short yyprhs[] = static const short yyrhs[] = { 63, 64, 0, 64, 0, 65, 66, 60, 67, 61, - 0, 138, 3, 0, 146, 4, 0, 67, 68, 0, + 0, 138, 6, 0, 146, 3, 0, 67, 68, 0, 68, 0, 140, 69, 0, 70, 0, 71, 0, 75, 0, 77, 0, 86, 0, 87, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 97, 0, 100, 0, 102, 0, 101, 0, 103, 0, 84, 0, 105, - 0, 5, 73, 74, 0, 31, 72, 74, 0, 148, - 19, 0, 136, 6, 0, 141, 62, 0, 8, 142, - 76, 74, 0, 10, 0, 11, 0, 12, 82, 78, - 74, 0, 79, 0, 81, 0, 0, 29, 80, 0, - 136, 6, 0, 123, 0, 143, 83, 0, 13, 0, - 21, 0, 22, 0, 23, 0, 27, 0, 24, 0, - 47, 0, 50, 0, 49, 85, 74, 0, 152, 19, - 0, 14, 73, 88, 74, 0, 55, 73, 88, 74, - 0, 89, 0, 0, 47, 123, 0, 20, 73, 74, - 0, 15, 73, 74, 0, 25, 73, 74, 0, 26, - 73, 74, 0, 33, 95, 74, 0, 149, 96, 0, - 34, 0, 35, 0, 52, 98, 74, 0, 150, 99, - 0, 53, 0, 54, 0, 43, 104, 74, 0, 44, - 104, 74, 0, 45, 124, 74, 0, 46, 124, 74, - 0, 151, 19, 0, 7, 106, 60, 107, 61, 0, - 147, 4, 0, 107, 108, 0, 108, 0, 139, 109, + 0, 7, 73, 74, 0, 15, 72, 74, 0, 148, + 5, 0, 136, 4, 0, 141, 62, 0, 8, 142, + 76, 74, 0, 17, 0, 18, 0, 19, 82, 78, + 74, 0, 79, 0, 81, 0, 0, 27, 80, 0, + 136, 4, 0, 123, 0, 143, 83, 0, 20, 0, + 21, 0, 22, 0, 23, 0, 25, 0, 24, 0, + 50, 0, 26, 0, 51, 85, 74, 0, 152, 5, + 0, 29, 73, 88, 74, 0, 30, 73, 88, 74, + 0, 89, 0, 0, 50, 123, 0, 36, 73, 74, + 0, 32, 73, 74, 0, 16, 73, 74, 0, 9, + 73, 74, 0, 10, 95, 74, 0, 149, 96, 0, + 11, 0, 12, 0, 53, 98, 74, 0, 150, 99, + 0, 54, 0, 55, 0, 46, 104, 74, 0, 47, + 104, 74, 0, 48, 124, 74, 0, 49, 124, 74, + 0, 151, 5, 0, 13, 106, 60, 107, 61, 0, + 147, 3, 0, 107, 108, 0, 108, 0, 139, 109, 0, 110, 0, 70, 0, 75, 0, 118, 0, 120, 0, 119, 0, 121, 0, 122, 0, 111, 0, 112, 0, 93, 0, 125, 0, 127, 0, 128, 0, 129, 0, 130, 0, 131, 0, 132, 0, 114, 0, 115, - 0, 9, 137, 113, 74, 0, 16, 73, 74, 0, - 30, 73, 74, 0, 19, 0, 51, 73, 74, 0, + 0, 14, 137, 113, 74, 0, 33, 73, 74, 0, + 28, 73, 74, 0, 5, 0, 31, 73, 74, 0, 56, 116, 74, 0, 153, 117, 0, 57, 0, 58, - 0, 59, 0, 17, 123, 74, 0, 18, 123, 74, - 0, 48, 123, 74, 0, 28, 124, 74, 0, 32, - 124, 74, 0, 144, 19, 0, 145, 19, 0, 36, - 126, 74, 0, 135, 19, 0, 37, 133, 74, 0, - 38, 133, 74, 0, 39, 133, 74, 0, 40, 133, - 74, 0, 41, 133, 74, 0, 42, 133, 74, 0, - 134, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 59, 0, 34, 123, 74, 0, 35, 123, 74, + 0, 52, 123, 74, 0, 38, 124, 74, 0, 37, + 124, 74, 0, 144, 5, 0, 145, 5, 0, 39, + 126, 74, 0, 135, 5, 0, 40, 133, 74, 0, + 41, 133, 74, 0, 42, 133, 74, 0, 43, 133, + 74, 0, 44, 133, 74, 0, 45, 133, 74, 0, + 134, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -314,21 +314,21 @@ static const short yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const short yyrline[] = { - 0, 146, 149, 153, 190, 195, 206, 209, 213, 218, - 227, 233, 239, 249, 257, 264, 270, 276, 282, 288, - 294, 300, 306, 312, 318, 324, 331, 506, 518, 530, - 539, 546, 551, 564, 568, 574, 583, 585, 587, 591, - 608, 615, 625, 634, 638, 642, 646, 650, 654, 658, - 662, 668, 680, 689, 707, 725, 727, 731, 740, 752, - 764, 776, 788, 800, 805, 809, 815, 827, 832, 836, - 842, 854, 866, 878, 890, 899, 909, 921, 929, 935, - 942, 947, 952, 957, 962, 967, 972, 977, 982, 987, - 992, 997, 1002, 1007, 1012, 1017, 1022, 1027, 1032, 1037, - 1044, 1057, 1069, 1081, 1087, 1099, 1111, 1116, 1120, 1124, - 1130, 1142, 1154, 1166, 1178, 1190, 1199, 1208, 1220, 1229, - 1241, 1253, 1265, 1277, 1289, 1301, 1310, 1315, 1320, 1325, - 1330, 1335, 1340, 1345, 1350, 1355, 1360, 1365, 1370, 1375, - 1380, 1385, 1390, 1395, 1400, 1405 + 0, 155, 158, 162, 199, 204, 215, 218, 222, 227, + 236, 242, 248, 258, 266, 273, 279, 285, 291, 297, + 303, 309, 315, 321, 327, 333, 340, 515, 527, 539, + 548, 555, 560, 573, 577, 583, 592, 594, 596, 600, + 617, 624, 634, 643, 647, 651, 655, 659, 663, 667, + 671, 677, 689, 698, 716, 734, 736, 740, 749, 761, + 773, 785, 797, 809, 814, 818, 824, 836, 841, 845, + 851, 863, 875, 887, 899, 908, 918, 930, 938, 944, + 951, 956, 961, 966, 971, 976, 981, 986, 991, 996, + 1001, 1006, 1011, 1016, 1021, 1026, 1031, 1036, 1041, 1046, + 1053, 1066, 1078, 1090, 1096, 1108, 1120, 1125, 1129, 1133, + 1139, 1151, 1163, 1175, 1187, 1199, 1208, 1217, 1229, 1238, + 1250, 1262, 1274, 1286, 1298, 1310, 1319, 1324, 1329, 1334, + 1339, 1344, 1349, 1354, 1359, 1364, 1369, 1374, 1379, 1384, + 1389, 1394, 1399, 1404, 1409, 1414 }; #endif @@ -338,26 +338,26 @@ static const short yyrline[] = /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { - "$", "error", "$undefined.", "SERVICE", "IDENTIFIER", "PORT", "NUMBER", - "BACKEND", "VERBOSITY", "SERVER", "ON", "OFF", "DISPATCHMODE", - "ROUNDROBIN", "REVIVINGINTERVAL", "SHMKEY", "WEIGHT", "ONSTART", - "ONFAIL", "STRING", "BACKLOG", "RANDOM", "BYDURATION", "BYSIZE", - "BYCONNECTIONS", "CONNECTIONTIMEOUT", "MAXCONNECTIONS", "BYORDER", - "TRAFFICLOG", "OVER", "DECAY", "BINDTO", "THROUGHPUTLOG", "TYPE", "ANY", - "HTTP", "STICKYCOOKIE", "ADDCLIENTHEADER", "SETCLIENTHEADER", - "APPENDCLIENTHEADER", "ADDSERVERHEADER", "SETSERVERHEADER", - "APPENDSERVERHEADER", "ALLOWFROM", "DENYFROM", "ALLOWFILE", "DENYFILE", - "EXTERNALHANDLER", "ONEND", "USERACCOUNT", "BYCLIENTIP", "RETRIES", - "HEADERINSPECTION", "DEEP", "SHALLOW", "CHECKINTERVAL", "STATE", - "AVAILABLE", "UNAVAILABLE", "DOWN", "'{'", "'}'", "';'", "input", - "element", "service", "servicename", "servicestatements", - "servicestatement", "servicebody", "portstatement", "bindstatement", - "ipaddress", "number", "semicol", "verbositystatement", "onoff", - "dispatchmodestatement", "dispatchtail", "dispatchover", "overnumber", - "dispatchext", "dispatchmethod", "dispatchmethodspec", - "useraccountstatement", "useraccount", "revivingintervalstatement", - "checkintervalstatement", "opt_externalhandler", "externalhandler", - "backlogstatement", "shmkeystatement", "connectiontimeoutstatement", + "$", "error", "$undefined.", "IDENTIFIER", "NUMBER", "STRING", "SERVICE", + "PORT", "VERBOSITY", "MAXCONNECTIONS", "TYPE", "ANY", "HTTP", "BACKEND", + "SERVER", "BINDTO", "CONNECTIONTIMEOUT", "ON", "OFF", "DISPATCHMODE", + "ROUNDROBIN", "RANDOM", "BYDURATION", "BYSIZE", "BYCONNECTIONS", + "BYORDER", "BYCLIENTIP", "OVER", "DECAY", "REVIVINGINTERVAL", + "CHECKINTERVAL", "RETRIES", "SHMKEY", "WEIGHT", "ONSTART", "ONFAIL", + "BACKLOG", "THROUGHPUTLOG", "TRAFFICLOG", "STICKYCOOKIE", + "ADDCLIENTHEADER", "SETCLIENTHEADER", "APPENDCLIENTHEADER", + "ADDSERVERHEADER", "SETSERVERHEADER", "APPENDSERVERHEADER", "ALLOWFROM", + "DENYFROM", "ALLOWFILE", "DENYFILE", "EXTERNALHANDLER", "USERACCOUNT", + "ONEND", "HEADERINSPECTION", "DEEP", "SHALLOW", "STATE", "AVAILABLE", + "UNAVAILABLE", "DOWN", "'{'", "'}'", "';'", "input", "element", + "service", "servicename", "servicestatements", "servicestatement", + "servicebody", "portstatement", "bindstatement", "ipaddress", "number", + "semicol", "verbositystatement", "onoff", "dispatchmodestatement", + "dispatchtail", "dispatchover", "overnumber", "dispatchext", + "dispatchmethod", "dispatchmethodspec", "useraccountstatement", + "useraccount", "revivingintervalstatement", "checkintervalstatement", + "opt_externalhandler", "externalhandler", "backlogstatement", + "shmkeystatement", "connectiontimeoutstatement", "maxconnectionsstatement", "typestatement", "typespec", "typespecifier", "inspectionstatement", "shallowdeepspec", "shallowdeepspecifier", "allowfromstatement", "denyfromstatement", "allowfilestatement", @@ -427,135 +427,135 @@ static const short yyr2[] = static const short yydefact[] = { 130, 130, 2, 138, 0, 1, 0, 0, 4, 132, - 5, 132, 7, 0, 3, 6, 128, 139, 134, 135, - 128, 128, 128, 128, 128, 140, 141, 143, 143, 137, - 137, 144, 142, 128, 8, 9, 10, 11, 12, 25, + 5, 132, 7, 0, 3, 6, 128, 134, 128, 141, + 139, 140, 128, 135, 128, 128, 128, 128, 143, 143, + 137, 137, 144, 142, 8, 9, 10, 11, 12, 25, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, - 22, 24, 26, 133, 0, 0, 0, 0, 38, 0, - 56, 133, 133, 133, 133, 133, 0, 133, 0, 133, - 0, 133, 133, 0, 133, 133, 0, 133, 0, 56, - 27, 0, 30, 131, 76, 33, 34, 133, 128, 133, - 36, 37, 41, 0, 43, 44, 45, 46, 48, 47, - 49, 50, 42, 136, 133, 55, 59, 58, 60, 61, - 28, 29, 62, 64, 65, 63, 70, 74, 71, 72, - 116, 73, 51, 52, 66, 68, 69, 67, 133, 31, - 131, 78, 0, 32, 39, 0, 35, 115, 57, 53, - 54, 75, 77, 129, 128, 136, 136, 137, 128, 137, - 127, 126, 126, 126, 126, 126, 126, 136, 128, 145, + 22, 24, 26, 133, 0, 0, 133, 133, 0, 0, + 0, 133, 0, 133, 38, 0, 56, 56, 133, 133, + 133, 0, 133, 133, 0, 133, 133, 0, 133, 0, + 27, 0, 30, 33, 34, 133, 61, 62, 64, 65, + 63, 131, 76, 28, 29, 60, 128, 133, 36, 37, + 41, 0, 43, 44, 45, 46, 48, 47, 50, 49, + 42, 136, 133, 55, 133, 59, 58, 70, 74, 71, + 72, 116, 73, 51, 52, 66, 68, 69, 67, 31, + 32, 131, 78, 0, 39, 0, 35, 115, 57, 53, + 54, 75, 77, 129, 128, 128, 128, 136, 136, 137, + 137, 127, 126, 126, 126, 126, 126, 126, 136, 145, 81, 82, 90, 79, 80, 88, 89, 98, 99, 83, 85, 84, 86, 87, 91, 92, 93, 94, 95, 96, 97, 40, 0, 133, 133, 133, 133, 133, 133, 133, - 0, 133, 0, 133, 133, 133, 133, 133, 133, 133, - 133, 0, 103, 133, 101, 110, 111, 113, 102, 114, - 117, 118, 119, 125, 120, 121, 122, 123, 124, 112, - 104, 105, 107, 108, 109, 106, 100, 0, 0 + 133, 0, 133, 0, 133, 133, 133, 133, 133, 133, + 133, 0, 103, 133, 102, 104, 101, 110, 111, 114, + 113, 117, 118, 119, 125, 120, 121, 122, 123, 124, + 112, 105, 107, 108, 109, 106, 100, 0, 0 }; static const short yydefgoto[] = { - 1, 2, 3, 6, 11, 12, 34, 35, 36, 65, - 53, 80, 37, 87, 38, 89, 90, 134, 91, 58, - 102, 39, 75, 40, 41, 104, 105, 42, 43, 44, - 45, 46, 67, 115, 47, 77, 127, 48, 49, 50, - 51, 69, 52, 55, 130, 131, 163, 164, 165, 166, + 1, 2, 3, 6, 11, 12, 34, 35, 36, 61, + 53, 80, 37, 85, 38, 97, 98, 134, 99, 64, + 110, 39, 76, 40, 41, 112, 113, 42, 43, 44, + 45, 46, 57, 90, 47, 78, 128, 48, 49, 50, + 51, 70, 52, 59, 131, 132, 163, 164, 165, 166, 203, 167, 168, 200, 225, 169, 170, 171, 172, 173, - 92, 72, 174, 189, 175, 176, 177, 178, 179, 180, - 191, 192, 190, 54, 182, 4, 132, 13, 81, 57, - 59, 93, 73, 7, 56, 66, 68, 78, 70, 76, + 100, 73, 174, 190, 175, 176, 177, 178, 179, 180, + 192, 193, 191, 54, 182, 4, 133, 13, 81, 55, + 65, 101, 74, 7, 60, 62, 58, 79, 71, 77, 201 }; static const short yypact[] = { - -32768, 7,-32768,-32768, 6,-32768, -33, 27,-32768,-32768, - -32768, -22,-32768, 139,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, 11,-32768,-32768, 9,-32768, -54, 15,-32768,-32768, + -32768, -40,-32768, 146,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768, 40, -11, 47, 34, -4, 55, - 8,-32768,-32768,-32768,-32768,-32768, 52,-32768, 23,-32768, - 54,-32768,-32768, 62,-32768,-32768, 64,-32768, 16, 8, - -32768, -9,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768, 65,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768, 19, 17,-32768,-32768, 40, -35, + 24,-32768, 37,-32768, -1, 66, 3, 3,-32768,-32768, + -32768, 44,-32768,-32768, 54,-32768,-32768, 56,-32768, 0, + -32768, 13,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, 60,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 13,-32768, 24,-32768,-32768, 79,-32768,-32768,-32768,-32768, + -32768, 16,-32768, 29,-32768, 72,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768, 67,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 68,-32768, 69,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768, -35,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768, 73,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, 74,-32768, 75,-32768,-32768,-32768,-32768,-32768,-32768, + -32768, -49,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768,-32768,-32768, 89,-32768 + -32768,-32768,-32768,-32768,-32768,-32768,-32768, 82,-32768 }; static const short yypgoto[] = { - -32768, 90,-32768,-32768,-32768, 81,-32768, -42,-32768,-32768, - -3, -61, -39,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768,-32768,-32768,-32768,-32768, 15,-32768,-32768,-32768,-32768, + -32768, 83,-32768,-32768,-32768, 84,-32768, -50,-32768,-32768, + 6, -56, -39,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -32768,-32768,-32768,-32768,-32768, 26,-32768,-32768,-32768,-32768, -37,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -32768, 70,-32768,-32768,-32768, -34,-32768,-32768,-32768,-32768, + -32768, 68,-32768,-32768,-32768, -33,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -98, -18,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -118,-32768,-32768, 9,-32768,-32768,-32768,-32768,-32768,-32768, + -108, -29,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -109,-32768,-32768, 4,-32768,-32768,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -32768 }; -#define YYLAST 194 +#define YYLAST 199 static const short yytable[] = { - 106, 107, 108, 109, 110, 138, 112, 227, 116, 8, - 118, 119, 74, 121, 122, -136, 124, 60, 61, 62, - 63, 64, 222, 223, 224, 88, 133, 9, 136, 16, - 79, 10, 18, 143, 193, 194, 195, 196, 197, 14, - 144, 145, 146, 139, 85, 86, 82, 184, 185, 83, - 24, 84, 147, 129, 148, 103, 149, 113, 114, 198, - 150, 151, 152, 153, 154, 155, 156, 140, 94, 125, - 126, 111, 157, 117, 141, 158, 95, 96, 97, 98, - 159, 120, 99, 123, 137, 181, 202, 211, 213, 228, - 160, 5, 15, 161, 128, 162, 142, 135, 71, 0, - 0, 0, 100, 0, 0, 101, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 204, 205, 206, 207, 208, 209, 210, 186, - 212, 188, 214, 215, 216, 217, 218, 219, 220, 221, - 0, 183, 226, 0, 16, 187, 17, 18, 0, 0, - 0, 19, 0, 20, 21, 199, 0, 0, 0, 22, - 0, 0, 0, 0, 23, 24, 0, 0, 0, 0, - 25, 0, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 27, 28, 29, 30, 0, 0, 31, 0, - 0, 32, 0, 0, 33 + 86, 87, 75, 138, -136, 93, 9, 95, 222, 223, + 224, 227, 115, 116, 117, 8, 119, 120, 10, 122, + 123, 14, 125, 82, 56, 91, 96, 92, 63, 130, + 66, 67, 68, 69, 83, 84, 16, 17, 18, 186, + 187, 136, 94, 143, 194, 195, 196, 197, 198, 118, + 199, 88, 89, 111, 126, 127, 139, 144, 140, 121, + 145, 124, 146, 147, 148, 137, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 129, 181, 141, 202, 212, + 214, 158, 228, 160, 5, 159, 102, 103, 104, 105, + 106, 107, 108, 114, 161, 15, 162, 72, 142, 0, + 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 109, 0, 0, 0, + 188, 189, 0, 0, 0, 0, 0, 204, 205, 206, + 207, 208, 209, 210, 211, 0, 213, 0, 215, 216, + 217, 218, 219, 220, 221, 0, 0, 226, 0, 0, + 183, 184, 185, 16, 17, 18, 19, 0, 0, 20, + 0, 21, 22, 0, 0, 23, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 24, 25, 0, 26, 0, + 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 29, 30, 31, 0, 32, 0, 33 }; static const short yycheck[] = { - 61, 62, 63, 64, 65, 103, 67, 0, 69, 3, - 71, 72, 30, 74, 75, 19, 77, 20, 21, 22, - 23, 24, 57, 58, 59, 29, 87, 60, 89, 5, - 33, 4, 8, 9, 152, 153, 154, 155, 156, 61, - 16, 17, 18, 104, 10, 11, 6, 145, 146, 60, - 26, 4, 28, 62, 30, 47, 32, 34, 35, 157, - 36, 37, 38, 39, 40, 41, 42, 128, 13, 53, - 54, 19, 48, 19, 61, 51, 21, 22, 23, 24, - 56, 19, 27, 19, 19, 6, 19, 19, 19, 0, - 132, 1, 11, 132, 79, 132, 130, 88, 28, -1, - -1, -1, 47, -1, -1, 50, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 183, 184, 185, 186, 187, 188, 189, 147, - 191, 149, 193, 194, 195, 196, 197, 198, 199, 200, - -1, 144, 203, -1, 5, 148, 7, 8, -1, -1, - -1, 12, -1, 14, 15, 158, -1, -1, -1, 20, - -1, -1, -1, -1, 25, 26, -1, -1, -1, -1, - 31, -1, 33, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 43, 44, 45, 46, -1, -1, 49, -1, - -1, 52, -1, -1, 55 + 56, 57, 31, 111, 5, 61, 60, 63, 57, 58, + 59, 0, 68, 69, 70, 6, 72, 73, 3, 75, + 76, 61, 78, 4, 18, 60, 27, 3, 22, 85, + 24, 25, 26, 27, 17, 18, 7, 8, 9, 147, + 148, 97, 5, 14, 153, 154, 155, 156, 157, 5, + 158, 11, 12, 50, 54, 55, 112, 28, 114, 5, + 31, 5, 33, 34, 35, 5, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 62, 4, 61, 5, 5, + 5, 52, 0, 133, 1, 56, 20, 21, 22, 23, + 24, 25, 26, 67, 133, 11, 133, 29, 131, -1, + 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, + 149, 150, -1, -1, -1, -1, -1, 183, 184, 185, + 186, 187, 188, 189, 190, -1, 192, -1, 194, 195, + 196, 197, 198, 199, 200, -1, -1, 203, -1, -1, + 144, 145, 146, 7, 8, 9, 10, -1, -1, 13, + -1, 15, 16, -1, -1, 19, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 29, 30, -1, 32, -1, + -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 46, 47, 48, 49, -1, 51, -1, 53 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/sw/share/bison/bison.simple" @@ -1265,7 +1265,7 @@ yyreduce: switch (yyn) { case 3: -#line 158 "parser.y" +#line 167 "parser.y" { /* Verify the service description, supply defaults * and so on. @@ -1298,7 +1298,7 @@ case 3: ; break;} case 5: -#line 197 "parser.y" +#line 206 "parser.y" { psmsg ("service:", SYMBOL); for (i = 0; i < nservice; i++) @@ -1308,7 +1308,7 @@ case 5: ; break;} case 9: -#line 219 "parser.y" +#line 228 "parser.y" { pimsg ("sevice port:", yyvsp[0].set[0].v.ival); for (i = 0; i < nservice; i++) @@ -1319,7 +1319,7 @@ case 9: ; break;} case 10: -#line 228 "parser.y" +#line 237 "parser.y" { psmsg ("service binding:", yyvsp[0].set[0].v.sval); cur_service.bind = yyvsp[0].set[0].v.sval; @@ -1327,7 +1327,7 @@ case 10: ; break;} case 11: -#line 234 "parser.y" +#line 243 "parser.y" { pimsg ("service verbosity:", yyvsp[0].set[0].v.ival); cur_service.verbosity = yyvsp[0].set[0].v.ival; @@ -1335,7 +1335,7 @@ case 11: ; break;} case 12: -#line 240 "parser.y" +#line 249 "parser.y" { pimsg ("service dispatch mode:", yyvsp[0].set[0].v.ival); pimsg ("service dispatch over:", lastovernr); @@ -1347,7 +1347,7 @@ case 12: ; break;} case 13: -#line 250 "parser.y" +#line 259 "parser.y" { pimsg ("service revival interval:", yyvsp[0].set[0].v.ival); psmsg ("service revival cmd:", yyvsp[0].set[1].v.sval); @@ -1357,7 +1357,7 @@ case 13: ; break;} case 14: -#line 258 "parser.y" +#line 267 "parser.y" { pimsg ("service check interval:", yyvsp[0].set[0].v.ival); psmsg ("service check cmd:", yyvsp[0].set[1].v.sval); @@ -1366,7 +1366,7 @@ case 14: ; break;} case 15: -#line 265 "parser.y" +#line 274 "parser.y" { pimsg ("service backlog:", yyvsp[0].set[0].v.ival); cur_service.backlog = yyvsp[0].set[0].v.ival; @@ -1374,7 +1374,7 @@ case 15: ; break;} case 16: -#line 271 "parser.y" +#line 280 "parser.y" { pimsg ("service shmkey:", yyvsp[0].set[0].v.ival); cur_service.shmkey = yyvsp[0].set[0].v.ival; @@ -1382,7 +1382,7 @@ case 16: ; break;} case 17: -#line 277 "parser.y" +#line 286 "parser.y" { pimsg ("connection timout:", yyvsp[0].set[0].v.ival); cur_service.connectiontimeout = yyvsp[0].set[0].v.ival; @@ -1390,7 +1390,7 @@ case 17: ; break;} case 18: -#line 283 "parser.y" +#line 292 "parser.y" { pimsg ("max clients in service:", yyvsp[0].set[0].v.ival); cur_service.maxconnections = yyvsp[0].set[0].v.ival; @@ -1398,7 +1398,7 @@ case 18: ; break;} case 19: -#line 289 "parser.y" +#line 298 "parser.y" { pimsg ("service type: ", yyvsp[0].set[0].v.ival); cur_service.type = yyvsp[0].set[0].v.ival; @@ -1406,7 +1406,7 @@ case 19: ; break;} case 20: -#line 295 "parser.y" +#line 304 "parser.y" { pimsg ("service header inspection: ", yyvsp[0].set[0].v.ival); cur_service.inspection = yyvsp[0].set[0].v.ival; @@ -1414,7 +1414,7 @@ case 20: ; break;} case 21: -#line 301 "parser.y" +#line 310 "parser.y" { psmsg ("allow from: ", yyvsp[0].set[0].v.sval); add_allowfrom (yyvsp[0].set[0].v.sval); @@ -1422,7 +1422,7 @@ case 21: ; break;} case 22: -#line 307 "parser.y" +#line 316 "parser.y" { psmsg ("allow file: ", yyvsp[0].set[0].v.sval); cur_service.allowfile = yyvsp[0].set[0].v.sval; @@ -1430,7 +1430,7 @@ case 22: ; break;} case 23: -#line 313 "parser.y" +#line 322 "parser.y" { psmsg ("deny from: ", yyvsp[0].set[0].v.sval); add_denyfrom (yyvsp[0].set[0].v.sval); @@ -1438,7 +1438,7 @@ case 23: ; break;} case 24: -#line 319 "parser.y" +#line 328 "parser.y" { psmsg ("deny file: ", yyvsp[0].set[0].v.sval); cur_service.denyfile = yyvsp[0].set[0].v.sval; @@ -1446,7 +1446,7 @@ case 24: ; break;} case 25: -#line 325 "parser.y" +#line 334 "parser.y" { psmsg ("user account: ", yyvsp[0].set[0].v.sval); setuseraccount (yyvsp[0].set[0].v.sval); @@ -1455,7 +1455,7 @@ case 25: ; break;} case 26: -#line 332 "parser.y" +#line 341 "parser.y" { pimsg ("converting backend statements, count is", yyvsp[0].n); for (i = 0; i < yyvsp[0].n; i++) @@ -1630,7 +1630,7 @@ case 26: ; break;} case 27: -#line 509 "parser.y" +#line 518 "parser.y" { pimsg ("port statement:", lastnr); yyval.n = 1; @@ -1640,7 +1640,7 @@ case 27: ; break;} case 28: -#line 521 "parser.y" +#line 530 "parser.y" { psmsg ("bindto statement:", laststr); yyval.n = 1; @@ -1650,7 +1650,7 @@ case 28: ; break;} case 29: -#line 532 "parser.y" +#line 541 "parser.y" { setlaststr (laststring); free (laststring); @@ -1658,13 +1658,13 @@ case 29: ; break;} case 30: -#line 541 "parser.y" +#line 550 "parser.y" { setlastnr (SYMBOL); ; break;} case 32: -#line 555 "parser.y" +#line 564 "parser.y" { pimsg ("verbosity statement:", lastnr); yyval.n = 1; @@ -1674,25 +1674,25 @@ case 32: ; break;} case 33: -#line 565 "parser.y" +#line 574 "parser.y" { lastnr = 1; ; break;} case 34: -#line 569 "parser.y" +#line 578 "parser.y" { lastnr = 0; ; break;} case 35: -#line 578 "parser.y" +#line 587 "parser.y" { yyval = yyvsp[-2]; ; break;} case 39: -#line 593 "parser.y" +#line 602 "parser.y" { pimsg ("dispatch mode statement:", lastnr); yyval.n = 1; @@ -1708,13 +1708,13 @@ case 39: ; break;} case 40: -#line 610 "parser.y" +#line 619 "parser.y" { setlastovernr (SYMBOL); ; break;} case 41: -#line 616 "parser.y" +#line 625 "parser.y" { psmsg ("external handler:", laststr); if (lastnr != ds_externalhandler) @@ -1724,7 +1724,7 @@ case 41: ; break;} case 42: -#line 627 "parser.y" +#line 636 "parser.y" { yyval.n = 1; yyval.set = xmalloc (sizeof(Confset)); @@ -1732,55 +1732,55 @@ case 42: ; break;} case 43: -#line 635 "parser.y" +#line 644 "parser.y" { lastnr = ds_roundrobin; ; break;} case 44: -#line 639 "parser.y" +#line 648 "parser.y" { lastnr = ds_random; ; break;} case 45: -#line 643 "parser.y" +#line 652 "parser.y" { lastnr = ds_byduration; ; break;} case 46: -#line 647 "parser.y" +#line 656 "parser.y" { lastnr = ds_bysize; ; break;} case 47: -#line 651 "parser.y" +#line 660 "parser.y" { lastnr = ds_byorder; ; break;} case 48: -#line 655 "parser.y" +#line 664 "parser.y" { lastnr = ds_byconnections; ; break;} case 49: -#line 659 "parser.y" +#line 668 "parser.y" { lastnr = ds_externalhandler; ; break;} case 50: -#line 663 "parser.y" +#line 672 "parser.y" { lastnr = ds_byclientip; ; break;} case 51: -#line 671 "parser.y" +#line 680 "parser.y" { psmsg ("user account statement:", laststr); yyval.n = 1; @@ -1790,7 +1790,7 @@ case 51: ; break;} case 52: -#line 682 "parser.y" +#line 691 "parser.y" { setlaststr (laststring); free (laststring); @@ -1798,7 +1798,7 @@ case 52: ; break;} case 53: -#line 693 "parser.y" +#line 702 "parser.y" { pimsg ("reviving interval statement:", lastnr); yyval.n = 2; @@ -1813,7 +1813,7 @@ case 53: ; break;} case 54: -#line 711 "parser.y" +#line 720 "parser.y" { pimsg ("check interval:", lastnr); yyval.n = 2; @@ -1828,7 +1828,7 @@ case 54: ; break;} case 57: -#line 733 "parser.y" +#line 742 "parser.y" { yyval.n = 1; yyval.set = xmalloc (sizeof(Confset)); @@ -1836,7 +1836,7 @@ case 57: ; break;} case 58: -#line 743 "parser.y" +#line 752 "parser.y" { pimsg ("backlog statement:", lastnr); yyval.n = 1; @@ -1846,7 +1846,7 @@ case 58: ; break;} case 59: -#line 755 "parser.y" +#line 764 "parser.y" { pimsg ("shmkey statement:", lastnr); yyval.n = 1; @@ -1856,7 +1856,7 @@ case 59: ; break;} case 60: -#line 767 "parser.y" +#line 776 "parser.y" { pimsg ("connection timeout statement:", lastnr); yyval.n = 1; @@ -1866,7 +1866,7 @@ case 60: ; break;} case 61: -#line 779 "parser.y" +#line 788 "parser.y" { pimsg ("max clients statement (service):", lastnr); yyval.n = 1; @@ -1876,7 +1876,7 @@ case 61: ; break;} case 62: -#line 791 "parser.y" +#line 800 "parser.y" { pimsg ("service type:", lastnr); yyval.n = 1; @@ -1886,19 +1886,19 @@ case 62: ; break;} case 64: -#line 806 "parser.y" +#line 815 "parser.y" { lastnr = type_any; ; break;} case 65: -#line 810 "parser.y" +#line 819 "parser.y" { lastnr = type_http; ; break;} case 66: -#line 818 "parser.y" +#line 827 "parser.y" { pimsg ("service header inspection: ", lastnr); yyval.n = 1; @@ -1908,19 +1908,19 @@ case 66: ; break;} case 68: -#line 833 "parser.y" +#line 842 "parser.y" { lastnr = ins_deep; ; break;} case 69: -#line 837 "parser.y" +#line 846 "parser.y" { lastnr = ins_shallow; ; break;} case 70: -#line 845 "parser.y" +#line 854 "parser.y" { psmsg ("allow from: ", laststr); yyval.n = 1; @@ -1930,7 +1930,7 @@ case 70: ; break;} case 71: -#line 857 "parser.y" +#line 866 "parser.y" { psmsg ("allow from: ", laststr); yyval.n = 1; @@ -1940,7 +1940,7 @@ case 71: ; break;} case 72: -#line 869 "parser.y" +#line 878 "parser.y" { psmsg ("allow file: ", laststr); yyval.n = 1; @@ -1950,7 +1950,7 @@ case 72: ; break;} case 73: -#line 881 "parser.y" +#line 890 "parser.y" { psmsg ("allow file: ", laststr); yyval.n = 1; @@ -1960,7 +1960,7 @@ case 73: ; break;} case 74: -#line 892 "parser.y" +#line 901 "parser.y" { setlaststr (laststring); free (laststring); @@ -1968,13 +1968,13 @@ case 74: ; break;} case 75: -#line 904 "parser.y" +#line 913 "parser.y" { yyval = yyvsp[-1]; ; break;} case 76: -#line 911 "parser.y" +#line 920 "parser.y" { psmsg ("backend name:", SYMBOL); for (i = 0; i < cur_service.nbackend; i++) @@ -1985,7 +1985,7 @@ case 76: ; break;} case 77: -#line 923 "parser.y" +#line 932 "parser.y" { yyvsp[-1].n++; yyvsp[-1].set = xrealloc (yyvsp[-1].set, yyvsp[-1].n * sizeof(Confset)); @@ -1994,159 +1994,159 @@ case 77: ; break;} case 78: -#line 930 "parser.y" +#line 939 "parser.y" { yyval = yyvsp[0]; ; break;} case 79: -#line 937 "parser.y" +#line 946 "parser.y" { yyval = yyvsp[0]; ; break;} case 80: -#line 943 "parser.y" +#line 952 "parser.y" { psmsg ("backend server:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 81: -#line 948 "parser.y" +#line 957 "parser.y" { pimsg ("backend port:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 82: -#line 953 "parser.y" +#line 962 "parser.y" { pimsg ("backend verbosity:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 83: -#line 958 "parser.y" +#line 967 "parser.y" { psmsg ("backend onstart:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 84: -#line 963 "parser.y" +#line 972 "parser.y" { psmsg ("backend onend:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 85: -#line 968 "parser.y" +#line 977 "parser.y" { psmsg ("backend onfail:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 86: -#line 973 "parser.y" +#line 982 "parser.y" { psmsg ("backend trafficlog:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 87: -#line 978 "parser.y" +#line 987 "parser.y" { psmsg ("backend trafficlog:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 88: -#line 983 "parser.y" +#line 992 "parser.y" { pimsg ("backend weight:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 89: -#line 988 "parser.y" +#line 997 "parser.y" { pimsg ("backend decay:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 90: -#line 993 "parser.y" +#line 1002 "parser.y" { pimsg ("backend maxconnections:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 91: -#line 998 "parser.y" +#line 1007 "parser.y" { psmsg ("backend sticky cookie:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 92: -#line 1003 "parser.y" +#line 1012 "parser.y" { psmsg ("addclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 93: -#line 1008 "parser.y" +#line 1017 "parser.y" { psmsg ("setclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 94: -#line 1013 "parser.y" +#line 1022 "parser.y" { psmsg ("appendclientheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 95: -#line 1018 "parser.y" +#line 1027 "parser.y" { psmsg ("addserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 96: -#line 1023 "parser.y" +#line 1032 "parser.y" { psmsg ("setserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 97: -#line 1028 "parser.y" +#line 1037 "parser.y" { psmsg ("appendserverheader:", yyvsp[0].set[0].v.sval); yyval = yyvsp[0]; ; break;} case 98: -#line 1033 "parser.y" +#line 1042 "parser.y" { pimsg ("backend retries:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 99: -#line 1038 "parser.y" +#line 1047 "parser.y" { pimsg ("backend state:", yyvsp[0].set[0].v.ival); yyval = yyvsp[0]; ; break;} case 100: -#line 1048 "parser.y" +#line 1057 "parser.y" { psmsg ("server statement:", laststr); yyval.n = 1; @@ -2156,7 +2156,7 @@ case 100: ; break;} case 101: -#line 1060 "parser.y" +#line 1069 "parser.y" { pimsg ("weight statement", lastnr); yyval.n = 1; @@ -2166,7 +2166,7 @@ case 101: ; break;} case 102: -#line 1072 "parser.y" +#line 1081 "parser.y" { pimsg ("decay statement", lastnr); yyval.n = 1; @@ -2176,13 +2176,13 @@ case 102: ; break;} case 103: -#line 1082 "parser.y" +#line 1091 "parser.y" { setlaststr (laststring); ; break;} case 104: -#line 1090 "parser.y" +#line 1099 "parser.y" { pimsg ("retries:", lastnr); yyval.n = 1; @@ -2192,7 +2192,7 @@ case 104: ; break;} case 105: -#line 1102 "parser.y" +#line 1111 "parser.y" { pimsg ("state:", lastnr); yyval.n = 1; @@ -2202,25 +2202,25 @@ case 105: ; break;} case 107: -#line 1117 "parser.y" +#line 1126 "parser.y" { lastnr = st_available; ; break;} case 108: -#line 1121 "parser.y" +#line 1130 "parser.y" { lastnr = st_unavailable; ; break;} case 109: -#line 1125 "parser.y" +#line 1134 "parser.y" { lastnr = st_down; ; break;} case 110: -#line 1133 "parser.y" +#line 1142 "parser.y" { psmsg ("onstart statement:", laststr); yyval.n = 1; @@ -2230,7 +2230,7 @@ case 110: ; break;} case 111: -#line 1145 "parser.y" +#line 1154 "parser.y" { psmsg ("onfail statement:", laststr); yyval.n = 1; @@ -2240,7 +2240,7 @@ case 111: ; break;} case 112: -#line 1157 "parser.y" +#line 1166 "parser.y" { psmsg ("onend statement:", laststr); yyval.n = 1; @@ -2250,7 +2250,7 @@ case 112: ; break;} case 113: -#line 1169 "parser.y" +#line 1178 "parser.y" { psmsg ("trafficlog statement:", laststr); yyval.n = 1; @@ -2260,7 +2260,7 @@ case 113: ; break;} case 114: -#line 1181 "parser.y" +#line 1190 "parser.y" { psmsg ("throughputlog statement:", laststr); yyval.n = 1; @@ -2270,7 +2270,7 @@ case 114: ; break;} case 115: -#line 1192 "parser.y" +#line 1201 "parser.y" { setlaststr (laststring); free (laststring); @@ -2278,7 +2278,7 @@ case 115: ; break;} case 116: -#line 1201 "parser.y" +#line 1210 "parser.y" { setlaststr (laststring); free (laststring); @@ -2286,7 +2286,7 @@ case 116: ; break;} case 117: -#line 1211 "parser.y" +#line 1220 "parser.y" { psmsg ("insertcookie statement:", laststr); yyval.n = 1; @@ -2296,7 +2296,7 @@ case 117: ; break;} case 118: -#line 1222 "parser.y" +#line 1231 "parser.y" { setlaststr (laststring); free (laststring); @@ -2304,7 +2304,7 @@ case 118: ; break;} case 119: -#line 1232 "parser.y" +#line 1241 "parser.y" { psmsg ("addclientheader statement:", laststr); yyval.n = 1; @@ -2314,7 +2314,7 @@ case 119: ; break;} case 120: -#line 1244 "parser.y" +#line 1253 "parser.y" { psmsg ("setclientheader statement:", laststr); yyval.n = 1; @@ -2324,7 +2324,7 @@ case 120: ; break;} case 121: -#line 1256 "parser.y" +#line 1265 "parser.y" { psmsg ("appendclientheader statement:", laststr); yyval.n = 1; @@ -2334,7 +2334,7 @@ case 121: ; break;} case 122: -#line 1268 "parser.y" +#line 1277 "parser.y" { psmsg ("addserverheader statement:", laststr); yyval.n = 1; @@ -2344,7 +2344,7 @@ case 122: ; break;} case 123: -#line 1280 "parser.y" +#line 1289 "parser.y" { psmsg ("setserverheader statement:", laststr); yyval.n = 1; @@ -2354,7 +2354,7 @@ case 123: ; break;} case 124: -#line 1292 "parser.y" +#line 1301 "parser.y" { psmsg ("appendserverheader statement:", laststr); yyval.n = 1; @@ -2364,7 +2364,7 @@ case 124: ; break;} case 125: -#line 1303 "parser.y" +#line 1312 "parser.y" { setlaststr (laststring); free (laststring); @@ -2372,121 +2372,121 @@ case 125: ; break;} case 126: -#line 1310 "parser.y" +#line 1319 "parser.y" { yyerrmsg = "HTTP header specifier expected"; ; break;} case 127: -#line 1315 "parser.y" +#line 1324 "parser.y" { yyerrmsg = "cookie specifier expected"; ; break;} case 128: -#line 1320 "parser.y" +#line 1329 "parser.y" { yyerrmsg = "number expected"; ; break;} case 129: -#line 1325 "parser.y" +#line 1334 "parser.y" { yyerrmsg = "hostname or IP address expected"; ; break;} case 130: -#line 1330 "parser.y" +#line 1339 "parser.y" { yyerrmsg = "'service' expected"; ; break;} case 131: -#line 1335 "parser.y" +#line 1344 "parser.y" { yyerrmsg = "backend definition statement expected"; ; break;} case 132: -#line 1340 "parser.y" +#line 1349 "parser.y" { yyerrmsg = "service body statement expected"; ; break;} case 133: -#line 1345 "parser.y" +#line 1354 "parser.y" { yyerrmsg = "semicolon (;) expected"; ; break;} case 134: -#line 1350 "parser.y" +#line 1359 "parser.y" { yyerrmsg = "'on' or 'off' expetcted"; ; break;} case 135: -#line 1355 "parser.y" +#line 1364 "parser.y" { yyerrmsg = "dispatch method expected"; ; break;} case 136: -#line 1360 "parser.y" +#line 1369 "parser.y" { yyerrmsg = "command line expected"; ; break;} case 137: -#line 1365 "parser.y" +#line 1374 "parser.y" { yyerrmsg = "file name expected"; ; break;} case 138: -#line 1370 "parser.y" +#line 1379 "parser.y" { yyerrmsg = "service name (identifier) expected"; ; break;} case 139: -#line 1375 "parser.y" +#line 1384 "parser.y" { yyerrmsg = "backend name (identifier) expected"; ; break;} case 140: -#line 1380 "parser.y" +#line 1389 "parser.y" { yyerrmsg = "IP address such as 1.2.3.4 or 'any' expected"; ; break;} case 141: -#line 1385 "parser.y" +#line 1394 "parser.y" { yyerrmsg = "Service type expected ('any', 'stickyhttp', ...)"; ; break;} case 142: -#line 1390 "parser.y" +#line 1399 "parser.y" { yyerrmsg = "Header inspection mode mode expected ('shallow' or 'deep')"; ; break;} case 143: -#line 1395 "parser.y" +#line 1404 "parser.y" { yyerrmsg = "IP filter(s) expected"; ; break;} case 144: -#line 1400 "parser.y" +#line 1409 "parser.y" { yyerrmsg = "username expected"; ; break;} case 145: -#line 1405 "parser.y" +#line 1414 "parser.y" { yyerrmsg = "state definition expected"; ; @@ -2724,4 +2724,4 @@ yyreturn: #endif return yyresult; } -#line 1409 "parser.y" +#line 1418 "parser.y" diff --git a/src/lib/parser.h b/src/lib/parser.h @@ -5,59 +5,59 @@ # define YYSTYPE int # define YYSTYPE_IS_TRIVIAL 1 # endif -# define SERVICE 257 -# define IDENTIFIER 258 -# define PORT 259 -# define NUMBER 260 -# define BACKEND 261 +# define IDENTIFIER 257 +# define NUMBER 258 +# define STRING 259 +# define SERVICE 260 +# define PORT 261 # define VERBOSITY 262 -# define SERVER 263 -# define ON 264 -# define OFF 265 -# define DISPATCHMODE 266 -# define ROUNDROBIN 267 -# define REVIVINGINTERVAL 268 -# define SHMKEY 269 -# define WEIGHT 270 -# define ONSTART 271 -# define ONFAIL 272 -# define STRING 273 -# define BACKLOG 274 +# define MAXCONNECTIONS 263 +# define TYPE 264 +# define ANY 265 +# define HTTP 266 +# define BACKEND 267 +# define SERVER 268 +# define BINDTO 269 +# define CONNECTIONTIMEOUT 270 +# define ON 271 +# define OFF 272 +# define DISPATCHMODE 273 +# define ROUNDROBIN 274 # define RANDOM 275 # define BYDURATION 276 # define BYSIZE 277 # define BYCONNECTIONS 278 -# define CONNECTIONTIMEOUT 279 -# define MAXCONNECTIONS 280 -# define BYORDER 281 -# define TRAFFICLOG 282 -# define OVER 283 -# define DECAY 284 -# define BINDTO 285 -# define THROUGHPUTLOG 286 -# define TYPE 287 -# define ANY 288 -# define HTTP 289 -# define STICKYCOOKIE 290 -# define ADDCLIENTHEADER 291 -# define SETCLIENTHEADER 292 -# define APPENDCLIENTHEADER 293 -# define ADDSERVERHEADER 294 -# define SETSERVERHEADER 295 -# define APPENDSERVERHEADER 296 -# define ALLOWFROM 297 -# define DENYFROM 298 -# define ALLOWFILE 299 -# define DENYFILE 300 -# define EXTERNALHANDLER 301 -# define ONEND 302 -# define USERACCOUNT 303 -# define BYCLIENTIP 304 -# define RETRIES 305 -# define HEADERINSPECTION 306 -# define DEEP 307 -# define SHALLOW 308 -# define CHECKINTERVAL 309 +# define BYORDER 279 +# define BYCLIENTIP 280 +# define OVER 281 +# define DECAY 282 +# define REVIVINGINTERVAL 283 +# define CHECKINTERVAL 284 +# define RETRIES 285 +# define SHMKEY 286 +# define WEIGHT 287 +# define ONSTART 288 +# define ONFAIL 289 +# define BACKLOG 290 +# define THROUGHPUTLOG 291 +# define TRAFFICLOG 292 +# define STICKYCOOKIE 293 +# define ADDCLIENTHEADER 294 +# define SETCLIENTHEADER 295 +# define APPENDCLIENTHEADER 296 +# define ADDSERVERHEADER 297 +# define SETSERVERHEADER 298 +# define APPENDSERVERHEADER 299 +# define ALLOWFROM 300 +# define DENYFROM 301 +# define ALLOWFILE 302 +# define DENYFILE 303 +# define EXTERNALHANDLER 304 +# define USERACCOUNT 305 +# define ONEND 306 +# define HEADERINSPECTION 307 +# define DEEP 308 +# define SHALLOW 309 # define STATE 310 # define AVAILABLE 311 # define UNAVAILABLE 312 diff --git a/src/lib/parser.y b/src/lib/parser.y @@ -128,17 +128,26 @@ static void setuseraccount (char *username) { %} -/* Declarations */ -%token SERVICE IDENTIFIER PORT NUMBER BACKEND VERBOSITY SERVER - ON OFF DISPATCHMODE ROUNDROBIN REVIVINGINTERVAL SHMKEY WEIGHT - ONSTART ONFAIL STRING BACKLOG RANDOM BYDURATION BYSIZE - BYCONNECTIONS CONNECTIONTIMEOUT MAXCONNECTIONS BYORDER TRAFFICLOG - OVER DECAY BINDTO THROUGHPUTLOG TYPE ANY HTTP +/* Tokens: the meta tokens */ +%token IDENTIFIER NUMBER STRING + + /* Tokens: the literal ones (these go automatically into the docs) */ +%token SERVICE PORT VERBOSITY MAXCONNECTIONS + TYPE ANY HTTP + BACKEND SERVER BINDTO CONNECTIONTIMEOUT + ON OFF + DISPATCHMODE ROUNDROBIN RANDOM BYDURATION BYSIZE BYCONNECTIONS + BYORDER BYCLIENTIP + OVER DECAY + REVIVINGINTERVAL CHECKINTERVAL RETRIES SHMKEY WEIGHT + ONSTART ONFAIL BACKLOG + THROUGHPUTLOG TRAFFICLOG STICKYCOOKIE ADDCLIENTHEADER SETCLIENTHEADER APPENDCLIENTHEADER ADDSERVERHEADER SETSERVERHEADER APPENDSERVERHEADER - ALLOWFROM DENYFROM ALLOWFILE DENYFILE EXTERNALHANDLER ONEND - USERACCOUNT BYCLIENTIP RETRIES HEADERINSPECTION DEEP SHALLOW - CHECKINTERVAL STATE AVAILABLE UNAVAILABLE DOWN + ALLOWFROM DENYFROM ALLOWFILE DENYFILE + EXTERNALHANDLER USERACCOUNT ONEND + HEADERINSPECTION DEEP SHALLOW + STATE AVAILABLE UNAVAILABLE DOWN %% /* Config file grammar rules */ diff --git a/src/lib/parserclose.c b/src/lib/parserclose.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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/parserfilename.c b/src/lib/parserfilename.c @@ -1,5 +1,5 @@ /************************************************************************* - * This file is part of Crosroads 1.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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.51, a load balancer and fail over + * This file is part of Crosroads 1.52, 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/t14.conf b/test/t14.conf @@ -0,0 +1,42 @@ +/* Example of a virtual server pool - see also virtpoolmgr */ + +service vpool { + port 80; + dispatchmode byconnections; + revivinginterval 3; + + /* Backend on localhost, always present */ + backend real { + server localhost:8000; + } + + /* The virtual pool: 30 on standby. The initial server setting + * is but a dymmy, it will get set using virtpoolmgr */ + backend v00 { server localhost:8000; state down; } + backend v02 { server localhost:8000; state down; } + backend v03 { server localhost:8000; state down; } + backend v04 { server localhost:8000; state down; } + backend v05 { server localhost:8000; state down; } + backend v06 { server localhost:8000; state down; } + backend v07 { server localhost:8000; state down; } + backend v08 { server localhost:8000; state down; } + backend v09 { server localhost:8000; state down; } + backend v10 { server localhost:8000; state down; } + backend v12 { server localhost:8000; state down; } + backend v13 { server localhost:8000; state down; } + backend v14 { server localhost:8000; state down; } + backend v15 { server localhost:8000; state down; } + backend v16 { server localhost:8000; state down; } + backend v17 { server localhost:8000; state down; } + backend v18 { server localhost:8000; state down; } + backend v19 { server localhost:8000; state down; } + backend v20 { server localhost:8000; state down; } + backend v22 { server localhost:8000; state down; } + backend v23 { server localhost:8000; state down; } + backend v24 { server localhost:8000; state down; } + backend v25 { server localhost:8000; state down; } + backend v26 { server localhost:8000; state down; } + backend v27 { server localhost:8000; state down; } + backend v28 { server localhost:8000; state down; } + backend v29 { server localhost:8000; state down; } +} diff --git a/test/virtpoolmgr b/test/virtpoolmgr @@ -0,0 +1,44 @@ +#!/usr/bin/perl + +use strict; + +# Configuration: + +# How to call Crossroads +my $crossroads = "/usr/local/bin/crossroads " . + "-c /usr/local/src/crossroads/test/t14.conf"; + +# The service we are managing, must match the conf. +my $service = "vpool"; + +# What to call when requesting a pool worker. This program is expected +# to output an IP address, a : and a port. +my $getip = "/usr/local/src/crossroads/test/virtpoolhelper get"; + +# What to call when returning (deactivating) a pool worker. This +# 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(); + +# 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"); +} diff --git a/tools/getkeywords b/tools/getkeywords @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +use strict; + +# Filter that reads parser.y and dumps the keywords on stdout. +# Each keyword appears in tt(..) for Yodl. + +my $active = 0; +while (my $line = <STDIN>) { + chomp ($line); + if ($active == 0 and $line =~ /Tokens/ and $line =~ /literal/) { + $active++; + } elsif ($line =~ /^\s*$/) { + $active = 0; + } elsif ($active) { + for my $k (split /\s+/, $line) { + next if ($k eq '' or $k =~ /%/); + print ("tt(", lc($k), ")\n"); + } + } +} + +