]> git.kaiwu.me - haproxy.git/commit
MINOR: stconn: add a new pair of sf functions {bs,fs}.debug_str
authorWilly Tarreau <w@1wt.eu>
Tue, 30 Jul 2024 15:57:37 +0000 (17:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Aug 2024 12:07:41 +0000 (14:07 +0200)
commit921e04bf87a94b410287a85d2397a0502520348c
tree64e3de9abfcd1914bf9c9723dcc70f2a0b196a8a
parentb681a9e48813742850299fb5207766ac6f15007d
MINOR: stconn: add a new pair of sf functions {bs,fs}.debug_str

These are passed to the underlying mux to retrieve debug information
at the mux level (stream/connection) as a string that's meant to be
added to logs.

The API is quite complex just because we can't pass any info to the
bottom function. So we construct a union and pass the argument as an
int, and expect the callee to fill that with its buffer in return.

Most likely the mux->ctl and ->sctl API should be reworked before
the release to simplify this.

The functions take an optional argument that is a bit mask of the
layers to dump:
  muxs=1
  muxc=2
  xprt=4
  conn=8
  sock=16

The default (0) logs everything available.
doc/configuration.txt
include/haproxy/connection-t.h
src/stconn.c