MCPcopy Create free account
hub / github.com/MariaDB/server / has_proxy_protocol_header

Function has_proxy_protocol_header

sql/proxy_protocol.cc:155–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153
154
155bool has_proxy_protocol_header(NET *net)
156{
157 compile_time_assert(NET_HEADER_SIZE < sizeof(PROXY_PROTOCOL_V1_SIGNATURE));
158 compile_time_assert(NET_HEADER_SIZE < sizeof(PROXY_PROTOCOL_V2_SIGNATURE));
159
160 const uchar *preread_bytes= net->buff + net->where_b;
161 return !memcmp(preread_bytes, PROXY_PROTOCOL_V1_SIGNATURE, NET_HEADER_SIZE)||
162 !memcmp(preread_bytes, PROXY_PROTOCOL_V2_SIGNATURE, NET_HEADER_SIZE);
163}
164
165
166/**

Callers 1

handle_proxy_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected