haproxy/include/common
Thierry FOURNIER 511e9475f2 MEDIUM: acl/pattern: standardisation "of pat_parse_int()" and "pat_parse_dotted_ver()"
The goal of these patch is to simplify the prototype of
"pat_pattern_*()" functions. I want to replace the argument "char
**args" by a simple "char *arg" and remove the "opaque" argument.

"pat_parse_int()" and "pat_parse_dotted_ver()" are the unique pattern
parser using the "opaque" argument and using more than one string
argument of the char **args. These specificities are only used with ACL.
Other systems using this pattern parser (MAP and CLI) just use one
string for describing a range.

This two functions can read a range, but the min and the max must y
specified. This patch extends the syntax to describe a range with
implicit min and max. This is used for operators like "lt", "le", "gt",
and "ge". the syntax is the following:

   ":x" -> no min to "x"
   "x:" -> "x" to no max

This patch moves the parsing of the comparison operator from the
functions "pat_parse_int()" and "pat_parse_dotted_ver()" to the acl
parser. The acl parser read the operator and the values and build a
volatile string readable by the functions "pat_parse_int()" and
"pat_parse_dotted_ver()". The transformation is done with these rules:

If the parser is "pat_parse_int()":

   "eq x" -> "x"
   "le x" -> ":x"
   "lt x" -> ":y" (with y = x - 1)
   "ge x" -> "x:"
   "gt x" -> "y:" (with y = x + 1)

If the parser is "pat_parse_dotted_ver()":

   "eq x.y" -> "x.y"
   "le x.y" -> ":x.y"
   "lt x.y" -> ":w.z" (with w.z = x.y - 1)
   "ge x.y" -> "x.y:"
   "gt x.y" -> "w.z:" (with w.z = x.y + 1)

Note that, if "y" is not present, assume that is "0".

Now "pat_parse_int()" and "pat_parse_dotted_ver()" accept only one
pattern and the variable "opaque" is no longer used. The prototype of
the pattern parsers can be changed.
2014-03-17 18:06:06 +01:00
..
accept4.h BUILD: listener: fix recent accept4() again 2014-01-15 16:45:17 +01:00
appsession.h [MINOR] Make appsess{,ion}_refresh static 2011-06-25 21:07:01 +02:00
base64.h [MINOR] add encode/decode function for 30-bit integers from/to base64 2010-10-30 19:04:33 +02:00
buffer.h OPTIM: buffer: remove one jump in buffer_count() 2013-04-02 01:25:57 +02:00
cfgparse.h MINOR: config: make str2listener() use memprintf() to report errors. 2012-09-24 10:53:16 +02:00
chunk.h MINOR: chunks: centralize the trash chunk allocation 2012-12-23 21:46:07 +01:00
compat.h MEDIUM: http: add IPv6 support for "set-tos" 2013-06-23 18:01:38 +02:00
compiler.h CLEANUP: ebtree: clarify licence and update to 6.0.6 2011-12-02 17:09:49 +01:00
config.h
debug.h
defaults.h MEDIUM: counters: stop relying on session flags at all 2014-01-28 23:34:45 +01:00
epoll.h MAJOR: polling: replace epoll with sepoll and remove sepoll 2012-11-11 20:53:30 +01:00
errors.h [MINOR] errors: provide new status codes for config parsing functions 2010-08-10 14:01:15 +02:00
hash.h MEDIUM: backend: add support for the wt6 hash 2013-11-14 16:37:50 +01:00
memory.h MINOR: cli: add the new "show pools" command 2014-01-28 16:50:35 +01:00
mini-clist.h BUG/MEDIUM: prevent gcc from moving empty keywords lists into BSS 2013-06-21 23:29:02 +02:00
rbtree.h
regex.h MINOR: regex: Copy the original regex expression into string. 2013-12-12 15:43:34 +01:00
sessionhash.h
splice.h [REORG] build: move syscall redefinition to specific places 2011-08-23 00:11:25 +02:00
standard.h MEDIUM: acl/pattern: standardisation "of pat_parse_int()" and "pat_parse_dotted_ver()" 2014-03-17 18:06:06 +01:00
syscall.h BUILD/MINOR: syscall: add definition of NR_accept4 for ARM 2013-03-04 07:38:08 +01:00
template.h
ticks.h
time.h BUILD: time: adapt the type of TV_ETERNITY to the local system 2013-12-13 09:22:23 +01:00
tools.h [MINOR] tools: add two macros MID_RANGE and MAX_RANGE 2011-03-28 15:55:43 +02:00
uri_auth.h [REORG] http: move the http-request rules to proto_http 2011-03-13 22:00:24 +01:00
version.h [CLEANUP] reference product branch 1.5 2010-08-27 11:09:17 +02:00