]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add PROXYv2 header utilities
authorArtem Boldariev <artem@boldariev.com>
Fri, 3 Mar 2023 14:42:47 +0000 (16:42 +0200)
committerArtem Boldariev <artem@boldariev.com>
Wed, 6 Dec 2023 13:15:24 +0000 (15:15 +0200)
commit2c767178816b4e175fe70c54a03e9775c1af2e53
tree8eb7a193c6b97d7e87d72ce7d0db13ff7d966d75
parent2653e668e34652a7c40d6ff4cb2f80aaf607081a
Add PROXYv2 header utilities

This commit adds a set of utilities for dealing with PROXYv2 headers,
both parsing and generating them. The code has no dependencies from
the networking code and is (for the most part) a "separate library".

The part responsible for handling incoming PROXYv2 headers is
structured as a state machine which accepts data as input and calls a
callback to notify the upper-level code about the data processing
status.

Such a design, among other things, makes it easy to write a thorough
unit test suite for that, as there are fewer dependencies as well as
will not stand in the way of any changes in the networking code.
lib/isc/Makefile.am
lib/isc/include/isc/proxy2.h [new file with mode: 0644]
lib/isc/proxy2.c [new file with mode: 0644]