From 3f619478f796eddbba6e39502fe941b285dd97b1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:00:34 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- sql/proxy_protocol.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sql/proxy_protocol.h (limited to 'sql/proxy_protocol.h') diff --git a/sql/proxy_protocol.h b/sql/proxy_protocol.h new file mode 100644 index 00000000..0f873e24 --- /dev/null +++ b/sql/proxy_protocol.h @@ -0,0 +1,19 @@ +#include "my_net.h" + +struct proxy_peer_info +{ + struct sockaddr_storage peer_addr; + int port; + bool is_local_command; +}; + +extern bool has_proxy_protocol_header(NET *net); +extern int parse_proxy_protocol_header(NET *net, proxy_peer_info *peer_info); +extern bool is_proxy_protocol_allowed(const sockaddr *remote_addr); + +extern int init_proxy_protocol_networks(const char *spec); +extern void destroy_proxy_protocol_networks(); + +extern int set_proxy_protocol_networks(const char *spec); +extern bool proxy_protocol_networks_valid(const char *spec); + -- cgit v1.2.3