]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: samples: provide a "crc32" converter
authorWilly Tarreau <w@1wt.eu>
Tue, 20 Jan 2015 18:35:24 +0000 (19:35 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jan 2015 18:48:08 +0000 (19:48 +0100)
commit8059977d3ecf19ab7f288b59ea4fb501b3a041ca
tree6c22b16d1c361b6ad85be92a032af05ae16d8f97
parentc829ee48c772856ec450c81f96193a92f53ac5bc
MINOR: samples: provide a "crc32" converter

This converter hashes a binary input sample into an unsigned 32-bit quantity
using the CRC32 hash function. Optionally, it is possible to apply a full
avalanche hash function to the output if the optional <avalanche> argument
equals 1. This converter uses the same functions as used by the various hash-
based load balancing algorithms, so it will provide exactly the same results.
It is provided for compatibility with other software which want a CRC32 to be
computed on some input keys, so it follows the most common implementation as
found in Ethernet, Gzip, PNG, etc... It is slower than the other algorithms
but may provide a better or at least less predictable distribution.
doc/configuration.txt
src/sample.c