MINOR: connection: Add function to get src/dst without updating the connection
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Oct 2021 14:33:28 +0000 (16:33 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Oct 2021 09:34:21 +0000 (11:34 +0200)
commitcc6fc26bfe796b79f5355ddd35f85e32630fb07a
treeb10a7e91f24ff19dc2124a9479f3cf570fd0f0b3
parente6465b3b758a214d25b89d495dc34d8a549cacd1
MINOR: connection: Add function to get src/dst without updating the connection

conn_get_src() and conn_get_dst() functions are used to fill the source and
destination addresses of a connection. On success, ->src and ->dst
connection fields can be safely used.

For convenience, 2 new functions are added here: conn_src() and conn_dst().
These functions return the corresponding address, as a const and only if it
is already set. Otherwise NULL is returned.
include/haproxy/connection.h