]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sample: Add le2dec (little endian to decimal) sample fetch
authorAlexander Stephan <alexander.stephan@sap.com>
Fri, 14 Mar 2025 11:17:09 +0000 (11:17 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Aug 2025 11:47:53 +0000 (13:47 +0200)
commitffbb3cc3067c7826b634fcb4cab2b5194101bdf1
tree0238c815b0ed5b374ee5aaa4069a0da33ff7310a
parentaeff2a3b2a87ae5572e73944eb56e732bb98295f
MINOR: sample: Add le2dec (little endian to decimal) sample fetch

This commit introduces a sample fetch, `le2dec`, to convert
little-endian binary input samples into their decimal representations.
The function converts the input into a string containing unsigned
integer numbers, with each number derived from a specified number of
input bytes. The numbers are separated using a user-defined separator.

This new sample is achieved by adding a parametrized sample_conv_2dec
function, unifying the logic for be2dec and le2dec converters.

Co-authored-by: Christian Norbert Menges <christian.norbert.menges@sap.com>
[wt: tracked as GH issue #2915]
Signed-off-by: Willy Tarreau <w@1wt.eu>
doc/configuration.txt
reg-tests/converter/le2dec.vtc [new file with mode: 0644]
src/sample.c