]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: sample: let the cast functions set their output type
authorThierry FOURNIER <tfournier@exceliance.fr>
Tue, 26 Nov 2013 19:47:54 +0000 (20:47 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 2 Dec 2013 22:31:33 +0000 (23:31 +0100)
commitb805f71d1bb1487f01f78a6ffab26d44919e9944
tree8545f1e905f077bb53079e2013b4d49e034a068f
parent803685fa1239d2b1537973c300dd74ff814e5693
MEDIUM: sample: let the cast functions set their output type

This patch allows each sample cast function to specify the sample
output type. The goal is to be able to emit an output type IPv4 or
IPv6 depending on what is found in the input if the next converter
is able to process them both.

The patch also adds a new pseudo type called "ADDR". This type is an
alias for IPV4 and IPV6 which is only used as an input type by converters
who want to express their compatibility with both address formats. It may
not be emitted.

The goal is to unify as much as possible the processing of IPv4 and IPv6
in order not to add extra keywords for the maps which act as converters,
but will match samples like ACLs do with their patterns.
include/types/sample.h
src/sample.c
src/stick_table.c